This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bool ligado(int n, int j) | |
| { | |
| if(n & (1 << j)) return true; | |
| else return false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| int main() | |
| { | |
| int n, k; | |
| while(cin >> n >> k) | |
| { | |
| int casca = 0; | |
| int pao = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| typedef long long ll; | |
| const ll MAXN = 20, MAXM = (1 << 18) + 10, INF = (1 << 30); | |
| ll n, m; | |
| ll mat[MAXN][MAXN], dp[MAXM][MAXN]; | |
| ll solve(ll bitmask, ll v) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| const int maxn = 1e5 + 10; | |
| vector<int> G[maxn]; | |
| bool vis[maxn]; | |
| void connect(int a, int b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| a.cpp:7:7: error: 'i' was not declared in this scope | |
| int t[i]; | |
| ^ | |
| a.cpp: In function 'int main()': | |
| a.cpp:18:10: error: 't' was not declared in this scope | |
| cin >> t[i]; | |
| ^ | |
| a.cpp:23:15: error: 't' was not declared in this scope | |
| v.push_back(t[i - 1] - t[i]); | |
| ^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| const int maxn = 1e4 + 10; | |
| struct node | |
| { | |
| node* b[26]; | |
| bool fim = false; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| using namespace std; | |
| mt19937 rd(random_device{}()); | |
| struct node | |
| { | |
| int v, w; | |
| node *l, *r; | |
| node(int v_ = 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Program Instrumentation Options | |
| GCC supports a number of command-line options that control adding run-time instrumentation to the code it normally generates. For example, one purpose of instrumentation is collect profiling statistics for use in finding program hot spots, code coverage analysis, or profile-guided optimizations. Another class of program instrumentation is adding run-time checking to detect programming errors like invalid pointer dereferences or out-of-bounds array accesses, as well as deliberately hostile attacks such as stack smashing or C++ vtable hijacking. There is also a general hook which can be used to implement other forms of tracing or function-level instrumentation for debug or program analysis purposes. | |
| -p | |
| Generate extra code to write profile information suitable for the analysis program prof. You must use this option when compiling the source files you want data about, and you must also use it when linking. | |
| -pg | |
| Generate extra code to write profile information suitable for the ana |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // By Lawrence Melo | |
| // https://szkopul.edu.pl/problemset/problem/tX0rS-7EjatV5bZ8pmijgiHZ/site/?key=statement | |
| #include <bits/stdc++.h> | |
| using namespace std; | |
| vector<int> ans; | |
| bool is_triangle(int a, int b, int c) | |
| { | |
| bool ok1 = false,ok2 = false,ok3 = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // By Lawrence Melo | |
| #include <bits/stdc++.h> | |
| using namespace std; | |
| const int maxc = 5e4 + 10; | |
| #define x first | |
| #define y second | |
| typedef pair<int,int> pii; | |
| vector<int> coins; |