This file contains 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 <stdio.h> | |
int main() | |
{ | |
printf("Hello World\n"); | |
return 0; | |
} |
This file contains 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
int main() | |
{ | |
string s; cin >> s; | |
if(s.find("C") != string::npos && s.find("F") != string::npos && s.find("C") < s.find("F")) cout << "Yes" << endl; | |
else cout << "No" << endl; | |
return 0; | |
} |
This file contains 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
string isSquareFree(string s) { | |
for(int i = 1; i <= s.size()/2; i++) { | |
for(int j = 0; i + j <= s.size(); j++) { | |
string t = s.substr(j, i); | |
for(int k = j+i; i + k <= s.size(); k++) { | |
if(t == s.substr(k, i)) return "non square-free"; | |
} | |
} | |
} | |
return "square-free"; |
This file contains 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
int solve(int i, int bit, string N) | |
{ | |
if(i == N.size()) return 0; | |
int ret = solve(i+1, bit, N); | |
reps(j, i+1, N.size()) reps(k, j+1, N.size()) { | |
if(N[i] != '0' && N[j] == N[k]) { | |
if((bit >> i)&1 || (bit >> j)&1 || (bit >> k)&1) continue; | |
string s = ""; s += N[i]; s += N[j]; s += N[k]; | |
int next = bit | (1<<i) | (1<<j) | (1<<k); | |
int tmp = solve(i+1, next, N); |
This file contains 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
int main() | |
{ | |
int N; cin >> N; | |
string s, t; | |
cin >> s >> t; | |
string u = ""; | |
rep(i, N) u += s[i]; | |
int idx = -1; | |
rep(i, N) { | |
bool flag = true; |
This file contains 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; | |
#define int long long | |
#define all(v) begin(v), end(v) | |
#define rep(i, n) for(int i = 0; i < (int)(n); i++) | |
#define reps(i, s, n) for(int i = (int)(s); i < (int)(n); i++) | |
#define min(...) min({__VA_ARGS__}) | |
#define max(...) max({__VA_ARGS__}) |
This file contains 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; | |
#define int long long | |
#define all(v) begin(v), end(v) | |
#define rep(i, n) for(int i = 0; i < (int)(n); i++) | |
#define reps(i, s, n) for(int i = (int)(s); i < (int)(n); i++) | |
#define min(...) min({__VA_ARGS__}) | |
#define max(...) max({__VA_ARGS__}) |
This file contains 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; | |
#define int long long | |
#define all(v) begin(v), end(v) | |
#define rep(i, n) for(int i = 0; i < (int)(n); i++) | |
#define reps(i, s, n) for(int i = (int)(s); i < (int)(n); i++) | |
#define min(...) min({__VA_ARGS__}) | |
#define max(...) max({__VA_ARGS__}) |
This file contains 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; | |
#define int long long | |
#define all(v) begin(v), end(v) | |
#define rep(i, n) for(int i = 0; i < (int)(n); i++) | |
#define reps(i, s, n) for(int i = (int)(s); i < (int)(n); i++) | |
#define min(...) min({__VA_ARGS__}) | |
#define max(...) max({__VA_ARGS__}) |
This file contains 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; | |
#define int long long | |
#define all(v) begin(v), end(v) | |
#define rep(i, n) for(int i = 0; i < (int)(n); i++) | |
#define reps(i, s, n) for(int i = (int)(s); i < (int)(n); i++) | |
#define min(...) min({__VA_ARGS__}) | |
#define max(...) max({__VA_ARGS__}) |
OlderNewer