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 mask = (1 << 8) - 1; | |
| int lowbit(int x) { | |
| return x & -x; | |
| } | |
| int ans; | |
| bool invalid[100]; | |
| void dfs(int x, int l, int r, int c) { | |
| if (x == mask) { |
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 m[2000]; | |
| int t; | |
| int n; | |
| int M[20]; | |
| void print(int y) { | |
| for (int i = 0; i < y; i++) { | |
| cout << M[i]; | |
| if (i != y - 1) |
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 MASK = (1 << 10) - 2; | |
| int row[10]; | |
| int col[10]; | |
| int subgrind[3][3]; | |
| string s; | |
| void fill_table(int idx, int num) { | |
| int r = idx % 9; | |
| int c = idx / 9; |
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 lowbits(int x) { | |
| return x & (-x); | |
| } | |
| int T, M, N; | |
| int Mask; | |
| int ans; | |
| void dfs(int total, int L1, int L2, int R1, int R2, int m, int n) { |
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 n; | |
| int m[1000001][20]; | |
| int main(){ | |
| cin >> n; | |
| m[0][n-1] = 0; | |
| m[1][n-1] = 1; | |
| int i=1; |
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 n; | |
| bool m[30]; | |
| void dfs(int i,bool move){ | |
| if (move && m[i]){ | |
| return; | |
| } | |
| if (i==1){ | |
| if (move){ |
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> | |
| #define inf 1e9 | |
| using namespace std; | |
| int m[30][3]; | |
| int g[5]; | |
| int dis = inf; | |
| int n; | |
| int count_dis(int a,int b,int c,int d,int e){ | |
| int total_dis = 0; | |
| for(int i=0;i<n;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; | |
| int n, m; | |
| int now[100]; | |
| int M[30]; | |
| int pt; | |
| void dfs(int i){ | |
| if(i==m){ | |
| for(int i=0;i<m;i++){ | |
| if (i != m-1) |
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; | |
| long long int total=0; | |
| int m1[10000001]; | |
| int m2[10000001]; | |
| void dfs(int i, int a, int b, int c){ | |
| if (i==0) | |
| return; | |
| dfs(i-1, a,c,b); | |
| m1[total] = a; |
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> | |
| #define inf 1e18 | |
| using namespace std; | |
| int n; | |
| long long int m[21]; | |
| long long int dif = inf; | |
| int main() { | |
| cin >> n; | |
| for (int i = 0; i < n; i++) { | |
| cin >> m[i]; |
NewerOlder