submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s855353857 | p03954 | C++ | #include<bits/stdc++.h>
using namespace std;
int n,a[20000010];
bool x(int i,int j,int k) {
return a[i]<=k&&a[j]<=k;
}
bool y(int i,int j,int k){
return a[i]>k&&a[j]>k;
}
bool check(int a){
for(int i=0;i<n-1;i++){
if(y(n+i,n+i+1,a)||y(n-i,n-i-1,a)) return 0;
if(x(n+i,n+i+1,a)||x(n-i,n-i-1,a... | a.cc: In function 'bool check(int)':
a.cc:15:24: error: 'k' was not declared in this scope
15 | return smaller(1,1,k);
| ^
a.cc:15:12: error: 'smaller' was not declared in this scope
15 | return smaller(1,1,k);
| ^~~~~~~
|
s392833847 | p03954 | C++ | #include<bits/stdc++.h>
const int maxn=200005;
int n,a[maxn],b[maxn];
inline bool check(int k){
for(int i=1;i<=2*n-1;i++) b[i]=(a[i]>=k);
int l=n,r=n;
while(l>1&&b[l-1]!=b[l]) l--;
while(r<2*n-1&&b[r+1]!=b[r]) r++;
if(l==1&&r==2*n-1) return (n&1)?b[n]:(b[n]^1);
return n-l<r-n?b[l]:b[r];
}
int main(){
sacnf("%d",... | a.cc: In function 'int main()':
a.cc:13:21: error: 'd' was not declared in this scope
13 | sacnf("%d",&d);
| ^
a.cc:13:9: error: 'sacnf' was not declared in this scope; did you mean 'scanf'?
13 | sacnf("%d",&d);
| ^~~~~
| scanf
a.cc:14:12: erro... |
s633169759 | p03954 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <algorithm>
using namespace std;
#define Rep(i,l,r) for (int i = (l); i <= (r); ++ i)
#define RepD(i,r,l) for (int i = (r); i >= (l); -- i)
#define RepG(i,x) for (int i = hd[x]; i; i = e[i].nxt)
int ... | a.cc: In function 'int main()':
a.cc:15:16: error: 'n' was not declared in this scope; did you mean 'yn'?
15 | cin >> n; cout << n << endl;
| ^
| yn
|
s194281050 | p03954 | C++ | # include <cstdio>
# define REP(i, n) for (int i = 1; i <= n; ++ i)
# define REP_0(i, n) for (int i = 0; i < n; ++ i)
# define FOR(i, a, b) for (int i = a; i <= b; ++ i)
# define NR 201000
bool a[NR];
int w[NR], n, m;
bool calc_top () {
int p = 0;
//REP (i, n) printf ("%d ", a[i]); puts (" Beg");
FOR (i, 2, n)... | a.cc: In function 'bool calc_top()':
a.cc:32:28: error: 'len' was not declared in this scope
32 | int l = p + 1, r = len;
| ^~~
|
s109624334 | p03954 | C++ | # include <cstdio>
# define REP(i, n) for (int i = 1; i <= n; ++ i)
# define REP_0(i, n) for (int i = 0; i < n; ++ i)
# define FOR(i, a, b) for (int i = a; i <= b; ++ i)
# define NR 201000
bool a[NR];
int w[NR], n, m;
bool calc_top () {
int p = 0;
FOR (i, 2, n) {
if (s[i] == s[i - 1]) {
int l = p + 1, r = i ... | a.cc: In function 'bool calc_top()':
a.cc:15:21: error: 's' was not declared in this scope
15 | if (s[i] == s[i - 1]) {
| ^
|
s293370569 | p03954 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <set>
#include <map>
#include <unordered_map>
#include <vector>
#include <queue>
#include <string>
#include <iomanip>
#include <stdio.h>
#include <cstring>
#include <random>
#include <chrono>
#include <bitset>
#include <fstream>
#inclu... | a.cc: In function 'void solve()':
a.cc:78:24: error: no matching function for call to 'min(ll&, std::vector<long long int>::size_type)'
78 | for(ll c1 = 0; c1 < min(look,C.size()-1); c1++){
| ~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /us... |
s313158247 | p03954 | C++ | #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=(n)-1;i>=0;i--)
using namespace std;
int mid(int a, int b, int c)
{
if (a <= b && b <= c) {
return b;
} else if (b <= a && a <= c) {
return a;
} else {
... | a.cc: In function 'int main()':
a.cc:30:22: error: 'mid' cannot be used as a function
30 | int mid = mid(a[N], a[N - 1], a[N + 1]);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:31:24: error: 'mid' cannot be used as a function
31 | int right = mid(a[N], a[N + 1], a[N + 2]);
| ... |
s997137631 | p03954 | C++ | #include <sstream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
using namespace std;
int Median(int a,int b, int c){
if(a>b && b>c){
return b;
}e... | a.cc: In function 'int main()':
a.cc:58:60: error: expected ';' before ')' token
58 | ret=Median(next[1],next[2],next[3]));
| ^
| ;
a.cc: In function 'int Median(i... |
s498973668 | p03954 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
#define what_is(x) cerr << #x << " is " << x << endl
#define N 200005
#define newLine printf("\n");
#define sll(X) scanf("%lld", &X);
#define pll(X) printf("%lld", X);
#define printAll(X, n) for(int i=0;i<n;i++) printf("%lld ", ... | a.cc: In function 'int main()':
a.cc:73:9: error: 'else' without a previous 'if'
73 | else if(st.size() >= 2)
| ^~~~
|
s054941501 | p03954 | Java |
#include <string>
#include <sstream>
#include <iostream>
#include <vector>
#include <math.h>
#include <algorithm>
#include <functional>
#include <map>
#include <climits>
#include <queue>
using namespace std;
#define ll long long
#define MOD 1000000007LL
class Main {
public:
int topNum(vector<int>& as) {
vector... | Main.java:2: error: illegal character: '#'
#include <string>
^
Main.java:3: error: illegal character: '#'
#include <sstream>
^
Main.java:4: error: illegal character: '#'
#include <iostream>
^
Main.java:5: error: illegal character: '#'
#include <vector>
^
Main.java:6: error: illegal character: '#'
#include <math.h>
^
Ma... |
s157060322 | p03955 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double lf;
typedef pair<int,int> ii;
typedef pair<ii,int> iii;
#define REP(i,n) for(int i=0;i<n;i++)
#define REP1(i,n) for(int i=1;i<=n;i++)
#define RST(i,n) memset(i,n,sizeof i)
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(),a.end()
#def... | a.cc: In function 'int main()':
a.cc:89:9: error: reference to 'data' is ambiguous
89 | data.eb(cur,rev);
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,... |
s071554896 | p03955 | C++ | #include<bits/stdc++.h>
#define re register
using namespace std;
const int MAXN=1e5+5;
int N,swtch[2],matrix[5][MAXN],temp[MAXN];
int main(){
cin>>N;
for(re int i=1;i<=3;i++) for(re int j=1;j<=N;j++) cin>>matrix[i][j];
for(re int i=1;i<=N;i++){
temp[i]=matrix[2][i]/3+1;
if(!((matrix[1][i]-ma... | a.cc: In function 'int main()':
a.cc:8:16: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
8 | for(re int i=1;i<=3;i++) for(re int j=1;j<=N;j++) cin>>matrix[i][j];
| ^
a.cc:8:41: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregist... |
s228594677 | p03955 | C++ | #include<cstdio>
#include<algorithm>
#include<cstring>
#include<iostream>
#include<queue>
using namespace std;
void read(int &x){
char ch;bool ok;
for(ok=0,ch=getchar();!isdigit(ch);ch=getchar())if(ch=='-')ok=1;
for(x=0;isdigit(ch);x=x*10+ch-'0',ch=getchar());if(ok)x=-x;
}
#define rg register
const int maxn=1e5+10;b... | a.cc: In function 'void add(int)':
a.cc:17:28: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
17 | void add(int x){for(rg int i=x;i<=m;i+=lowbit(i))f[i]++;}
| ^
a.cc: In function 'int get(int)':
a.cc:18:37: warning: ISO C++17 does not allow 'registe... |
s021956815 | p03955 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
vector<int> stat(n);
vector<int> perm(n);
vector<bool> check(n,0);
for(int i = 0;i<n;i++)
{
int cin__;
cin >> cin__;
stat[i] = cin__%3;
perm[i] = cin__/3;
if(check[perm[i]]==... | a.cc: In function 'int main()':
a.cc:23:23: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
23 | check[perm[i]]++;
| ~~~~~~~~~~~~~~^~
|
s423449053 | p03955 | C++ | #include<cmath>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=1e5;
int n;
int a[maxn+8][3],move[2],rev[2];
int read()
{
int x=0,f=1;char ch=getchar();
for (;ch<'0'||ch>'9';ch=getchar()) if (ch=='-') f=-1;
for (;ch>='0'&&ch<='9';ch=getchar()) x... | a.cc: In function 'int main()':
a.cc:41:13: error: reference to 'move' is ambiguous
41 | move[i&1]+=max(0,(i-(x+2)/3)/2);
| ^~~~
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:5:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:353:1: note: candidates a... |
s269092522 | p03955 | C++ | #include<cstdio>
#include<algorithm>
using namespace std;
int n,t[2],a[5][100010],to[100010];
char buffer[10000010],*hed;
inline char Getchar(){
return *hed++;
}
inline int rd(){
register int x=0;
char c;
do c=Getchar();
while(!isdigit(c));
do{
x=(x<<1)+(x<<3)+(c^48);
c=Getchar()... | a.cc: In function 'int rd()':
a.cc:10:18: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
10 | register int x=0;
| ^
a.cc:13:12: error: 'isdigit' was not declared in this scope
13 | while(!isdigit(c));
| ^~~~~~~
a.cc: In function 'i... |
s767506075 | p03955 | C++ | #include<cstdio>
#include<algorithm>
using namespace std;
int n,t[2],a[5][100010],to[100010];
char buffer[10000010],*hed,*tal;
inline char Getchar(){
return *hed++;
}
inline int rd(){
register int x=0;
char c;
do c=Getchar();
while(!isdigit(c));
do{
x=(x<<1)+(x<<3)+(c^48);
c=Getchar();
}while(isdigit(c));
r... | a.cc: In function 'int rd()':
a.cc:10:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
10 | register int x=0;
| ^
a.cc:13:16: error: 'isdigit' was not declared in this scope
13 | while(!isdigit(c));
| ^~~~~~~
a.cc... |
s897326930 | p03955 | C++ | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 10;
int a[3][MAXN];
int f[2][MAXN];
void add(int p, int index) {
for (;p < MAXN; p += p&-p)
++f[index][p];
}
int find(int p, int index) {
int res = 0;
for (;p; p -= p&-p)
res += f[index][p];
return res;
}z
int32_t main ... | a.cc:15:2: error: 'z' does not name a type
15 | }z
| ^
|
s712833780 | p03955 | C++ | #include <bits/stdc++.h>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd... | a.cc: In function 'int main()':
a.cc:77:86: error: 'j' was not declared in this scope
77 | for(int i=0;i<n;i++) if(abs(a[0][i]-a[1][i])>1||abs(a[1][i]-a[2][i])>1||a[1][j]%3!=2) B=0;
| ^
|
s354890851 | p03955 | C++ |
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
#include <map>
#include <iterator>
#include <functional>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <fstream>
#include <iomanip>
#include <unordered_map>
#inclu... | a.cc: In function 'int main()':
a.cc:141:2: error: expected '}' at end of input
141 | }
| ^
a.cc:76:1: note: to match this '{'
76 | {
| ^
|
s240649722 | p03955 | C++ | #include <iostream>
#include <cstdlib>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <cstring>
#define rep(i,j,k) for(int i=(j);i<(k);i++)
using namespace std;
int data[3][100005];
int rdata[100005];
int _abs(int a)
{
return a>0?a:-a;
}
int main()
{
int n;
scanf("%d",&n);
rep(j,0,3)re... | a.cc: In function 'int main()':
a.cc:19:39: error: reference to 'data' is ambiguous
19 | rep(j,0,3)rep(i,1,n+1)scanf("%d",&data[j][i]);
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s851597287 | p03955 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define int long long
struct node{
int k, p, sz;
node * l;
node * r;
node(int k): k(k), p(rand()), l(NULL), r(NULL), sz(0){}
};
int sz(node *t){
if(t == NULL) return 0;
return t->sz;
}
void updsz(node *t){
if(t == NULL) return;
t->sz = sz(t->l)... | cc1plus: error: '::main' must return 'int'
|
s109073105 | p03955 | C++ | #include<stdio.h>
#include<vector>
#include<algorithm>
#include<set>
using namespace std;
int map[3][100000];
bool flag[100000];
int get(vector<int>v)
{
int r = 0;
for (int i = 0; i < v.size(); i++)if (v[i] < 0)r ^= 1, v[i] = -v[i];
for (int i = 0; i < v.size(); i++)v[i] = (v[i] - 1) / 2;
fill(flag, flag + 100000, ... | a.cc: In function 'int main()':
a.cc:62:9: error: jump to label 'l01'
62 | l01:;
| ^~~
a.cc:49:50: note: from here
49 | if (vec[i] % 2 == 0)goto l01;
| ^~~
a.cc:58:26: note: crosses initialization of 'int t'
... |
s609068896 | p03955 | C++ | #include<stdio.h>
#include<vector>
#include<algorithm>
#include<set>
using namespace std;
int map[3][100000];
bool flag[100000];
int get(vector<int>v)
{
int r = 0;
for (int i = 0; i < v.size(); i++)if (v[i] < 0)r ^= 1, v[i] = -v[i];
for (int i = 0; i < v.size(); i++)v[i] = (v[i] - 1) / 2;
fill(flag, flag + 100000, ... | a.cc: In function 'int main()':
a.cc:62:9: error: jump to label 'l01'
62 | l01:;
| ^~~
a.cc:49:50: note: from here
49 | if (vec[i] % 2 == 0)goto l01;
| ^~~
a.cc:58:26: note: crosses initialization of 'int t'
... |
s336918289 | p03955 | C++ | #include <stdio.h>
int main()
{
char name[21];
printf("お名前を入力して下さい\t");
gets(name);
printf("\nあなたのお名前は %s です。\n", name);
return 0;
} | a.cc: In function 'int main()':
a.cc:7:7: error: 'gets' was not declared in this scope; did you mean 'getw'?
7 | gets(name);
| ^~~~
| getw
|
s419251821 | p03955 | C++ | #include<stdio.h>
#include <stdlib.h>
int main()
{
char str[100];
char *p = gets(str);
printf("%s\n",str);
return 0;
} | a.cc: In function 'int main()':
a.cc:6:16: error: 'gets' was not declared in this scope; did you mean 'getw'?
6 | char *p = gets(str);
| ^~~~
| getw
|
s567257279 | p03955 | C++ | #include <iostream>
#include <string>
#include <sstream>
#include <cassert>
int permutation(int *a, int n) {
bool *b = new bool[n];
for (int i=0;i<n;++i){
b[i] = false;
}
int sign = 1;
for (int i=0;i<n;++i) {
int local_sign = 1;
int j = i;
while (!b[j]) {
... | a.cc:118:1: error: extended character is not valid in an identifier
118 | assert(false);
| ^
a.cc:118:1: error: extended character is not valid in an identifier
a.cc: In function 'int main()':
a.cc:118:1: error: '\U00003000\U00003000assert' was not declared in this scope
118 | assert(false);
| ^... |
s321560902 | p03955 | C++ | #include <iostream>
#include <string>
#include <sstream>
int permutation(int *a, int n) {
bool *b = new bool[n];
for (int i=0;i<n;++i){
b[i] = false;
}
int sign = 1;
for (int i=0;i<n;++i) {
int local_sign = 1;
int j = i;
while (!b[j]) {
b[j] = true;
... | a.cc:117:1: error: extended character is not valid in an identifier
117 | assert(false);
| ^
a.cc:117:1: error: extended character is not valid in an identifier
a.cc:117:1: error: extended character is not valid in an identifier
a.cc: In function 'int main()':
a.cc:117:1: error: '\U00003000\U00003000\U... |
s413326649 | p03955 | C++ | #include <iostream>
#include <vector>
#include <list>
#include <set>
#include <bitset>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
using namespace std;
#define dfor(i,a,b) for(int i=(a);i<(b);++i)
#define drfor(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define drep(i,n) dfor(i,0,n)... | a.cc:20:19: error: 'acos' was not declared in this scope
20 | const double PI = acos(-1.0);
| ^~~~
|
s679188379 | p03956 | C++ |
#include<bits/stdc++.h>
using namespace std;
int n,m,head[100100],cnt,col[100100],tot[3],TE;
typedef long long ll;
ll res;
struct node{
int to,next,val;
}edge[200100];
void ae(int u,int v){
edge[cnt].next=head[u],edge[cnt].to=v,edge[cnt].val=1,head[u]=cnt++;
edge[cnt].next=head[v],edge[cnt].to=u,edge[cnt].val=-1,he... | a.cc: In function 'int main()':
a.cc:37:10: error: expected '}' at end of input
37 | }
| ^
a.cc:27:11: note: to match this '{'
27 | int main(){
| ^
|
s412579652 | p03956 | C++ | #include<bits/stdc++.h>
clock_t t=clock();
namespace IO
{
using namespace std;
char buf[1<<22],Out[1<<22],*p1=buf,*p2=buf;
int p3=-1,f=0;
inline void file()
{
#ifdef NTFOrz
freopen("file.in","r",stdin);
#endif
}
inline char getchar()
{
return (p1==p2)&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*... | a.cc: In function 'void dfs(int)':
a.cc:87:9: error: reference to 'size' is ambiguous
87 | size++,cnt[col[u]]++;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc+... |
s252943571 | p03956 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<set>
#include<queue>
#include<stack>
#include<bitset>
#include<functional>
#include<map>
#include<unordered_set>
using namespace std;
//int p = 998244353;
long long p = 1000000007;
#define int long long
#define vel vector<long long>
#defi... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s304399875 | p03956 | C++ | #include <bits/stdc++.h>
using namespace std;
constexpr int max_n = 1e5 + 5;
vector<pair<int, int> > graf[max_n];
long long wynik, zliczanie[5];
int odwiedzony[max_n];
void bfs(int x){
bool crush = false, = false;
zliczanie[1] = 1;
zliczanie[2] = 0;
zliczanie[0] = 0;
odwiedzony[x] = 1;
... | a.cc: In function 'void bfs(int)':
a.cc:12:26: error: expected unqualified-id before '=' token
12 | bool crush = false, = false;
| ^
a.cc:21:13: error: 'cykl' was not declared in this scope
21 | cykl = true;
| ^~~~
a.cc:42:17: error: 'cykl' was not... |
s688111072 | p03956 | C++ | #include<bits/stdc++.h>
using namespace std;
#define LL long long
#define ULL unsigned long long
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define pll pair<LL,LL>
#define x first
#define y second
#define pi acos(-1)
#define sqr(x) ((x)*(x))
#define pdd pair<double,double>
#define MEMS(x) memse... | a.cc: In function 'int main()':
a.cc:74:21: error: expected ';' before 'break'
74 | break;
| ^~~~~
|
s738288763 | p03956 | C++ | //Ilm kave oi, you know ...
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const int MOD = (int)1e9 + 7;
const int MAXN = (int)1e5 + 3;
const int infint = (int)1e9 + 3;
const ll inf = (ll)1e12;
int n, m, sz, cyc, visited[MAXN], md0, md1, md2, e;
vector<pair<int, int> > H[MAX... | a.cc: In function 'int main()':
a.cc:60:28: error: 'mod0' was not declared in this scope; did you mean 'modf'?
60 | if(mod0 && mod1 && mod2)
| ^~~~
| modf
a.cc:60:36: error: 'mod1' was not declared in this scope; did you mean '... |
s260552066 | p03956 | C++ | #include <bits/stdc++.h>
using namespace std;
#define ref(i,x,y)for(int i=x;i<=y;++i)
const int N=100010;
int n,m,fg,d[N],t[3],S,w;long long ans;vector<pair<int,int> > e[N];
void dfs(int x){
t[d[x]]++;S++;
ref(i,0,((int)e[x].size())-1){
int y=e[x][i].first;w++;
int D=(3+d[x]+e[x][i].second)%3;
if(d[y]==-1)d[y]=... | a.cc: In function 'int main()':
a.cc:22:29: error: 'T' was not declared in this scope
22 | fg=d[i]=S=w=T[0]=T[1]=T[2]=0,dfs(i);
| ^
|
s673663892 | p03956 | C++ | #include <iostream>
#include <cstring>
#include <vector>
using namespace std;
typedef long long i64;
const int MAXN = 1e5 + 10;
i64 answer;
i64 totCnt;
i64 N, M;
i64 check[MAXN];
i64 cnt[3];
bool flag;
vector<pair<i64, i64> > Adj[MAXN];
inline void addEdge(i64 u, i64 v, i64 w)
{
Adj[u].emplace_back(v, w);
}
... | a.cc:87:11: error: redefinition of 'const int MAXN'
87 | const int MAXN = 1e5 + 10;
| ^~~~
a.cc:6:11: note: 'const int MAXN' previously defined here
6 | const int MAXN = 1e5 + 10;
| ^~~~
a.cc:89:5: error: redefinition of 'i64 answer'
89 | i64 answer;
| ^~~~~~
a.cc:8:5... |
s557683822 | p03956 | C++ | #include <bits/stdc++.h>
using namespace std;
const int maxn=1e5+10;
int n,m,k,t,cnt[3],c[maxn];
bool vis[maxn],flag,edge;
vector<pair<int,int>>e[maxn];
void dfs(int x)
{
cnt[c[x]]++;
for(int i=0;i<e[x].size();i++)
{
int to=e[x][i].first,w=e[x][i].second;
if(w==1)edge++;
if(!vis[to])... | a.cc: In function 'void dfs(int)':
a.cc:13:17: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
13 | if(w==1)edge++;
| ^~~~
a.cc: In function 'int main()':
a.cc:43:16: error: too many arguments to function 'void dfs(int)'
43 | dfs(i,0);
... |
s747708971 | p03956 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
using namespace std;
#define MAXN 100000
#define ll long long
#define rint register int
#define gc() getchar()
inline int read(int r=0,int s=0,int c=gc()){for(;c<48||c>57;s=c,c=gc());for(;c>=48&&c<=57;(r*=10)+=c-48,c=gc())... | a.cc:13:1: error: 'vector' does not name a type
13 | vector<int> e[MAXN+5], f[MAXN+5]; bool sl; int color[MAXN+5], n, m; ll Ans, c[3], s;
| ^~~~~~
a.cc: In function 'void DFS(int, int)':
a.cc:14:97: error: 'e' was not declared in this scope
14 | void DFS(int p, int x){if(~color[p]){sl |= color[p]^x; return;... |
s827746877 | p03956 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
using namespace std;
#define MAXN 100000
#define MOD 1000000007
#define rint register int
#define gc() getchar()
inline int read(int r=0,int s=0,int c=gc()){for(;c<48||c>57;s=c,c=gc());for(;c>=48&&c<=57;(r*=10)+=c-48,c=gc(... | a.cc:13:1: error: 'vector' does not name a type
13 | vector<int> e[MAXN+5], f[MAXN+5]; bool sl; int color[MAXN+5], c[3], s, n, m, Ans;
| ^~~~~~
a.cc: In function 'void DFS(int, int)':
a.cc:14:97: error: 'e' was not declared in this scope
14 | void DFS(int p, int x){if(~color[p]){sl |= color[p]^x; return;} c... |
s667587380 | p03956 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <map>
#include <vector>
#define pb push_back
#define pii pair<int, int>
#define mp make_pair
using namespace std;
map<pii, bool> hash;
const int Maxn = 100010;
int n, m, fa[Maxn], fg[Maxn], siz[Maxn], work[Maxn... | a.cc: In function 'int main()':
a.cc:58:17: error: reference to 'hash' is ambiguous
58 | hash[mp(u, v)] = 1;
| ^~~~
In file included from /usr/include/c++/14/string_view:50,
from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/... |
s676246451 | p03956 | C++ | #include<bits/stdc++.h>
using namespace std;
#define N 1111116
int n,m,x[N],y[N],z[N],w[N],next[N],p[N],h[N][3];
long long cnt,cmt,c[3],ans;
void travel(int x,int k){
if (!h[x][0]&&!h[x][1]&&!h[x][2]) cnt++;
h[x][k]=1;c[k]++;
for (int t=p[x];t;t=next[t])
if (!h[y[t]][(k+z[t])%3]){
if (!w[t]) cmt++;
travel(... | a.cc: In function 'void travel(int, int)':
a.cc:11:29: error: reference to 'next' is ambiguous
11 | for (int t=p[x];t;t=next[t])
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:66,
from /usr/include/c++/14/algorithm:60,
... |
s142159759 | p03956 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<queue>
#include<set>
using namespace std;
typedef long long LL;
const int N=2e5+100;
int gi() {
int w=0;bool q=1;char c=getchar();
while ((c<'0'||c>'9') && c!='-') c=ge... | a.cc: In function 'void dfs(int, int)':
a.cc:26:32: error: reference to 'next' is ambiguous
26 | for (int i=head[k];i;i=next[i],e++)
| ^~~~
In file included from /usr/include/c++/14/string:47,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s749984266 | p03956 | C++ | #include <iostream>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <stdio.h>
using namespace std;
int main(int argc, char* argv[])
{
char s[100];
gets(s);
cout<<s<<endl;
return 0;
} | a.cc: In function 'int main(int, char**)':
a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
10 | gets(s);
| ^~~~
| getw
|
s125897272 | p03956 | C++ | 1.#include <cstdio>
2.#include <cstring>
3.#include <cmath>
4.#include <algorithm>
5.#include <vector>
6.#include <string>
7.#include <map>
8.#include <set>
9.#include <cassert>
10.using namespace std;
11.#define rep(i,a,n) for (int i=a;i<n;i++)
12.#define per(i,a,n) for (int i=n-1;i>=a;i--)
13.#define pb push_back
14.... | a.cc:1:3: error: stray '#' in program
1 | 1.#include <cstdio>
| ^
a.cc:2:3: error: stray '#' in program
2 | 2.#include <cstring>
| ^
a.cc:3:3: error: stray '#' in program
3 | 3.#include <cmath>
| ^
a.cc:4:3: error: stray '#' in program
4 | 4.#include <algorithm>
| ^
a.cc:... |
s349379645 | p03956 | C++ | #include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
int N,M;
cin>>N>>M;
int i,j;
char **X=new char*[N];
for (i=0;i<N;i++){
X[i]=new char[N+1];
memset(X[i],'w',N);
X[i][N]='\0';
}
int a,b;
for (j=0;j<M;j++){
cin>>a>>b;
X[a-1][b-1]='b';
}
int x,y,z;
for (x=0;x<N;x++){
for (... | a.cc: In function 'int main(int, char**)':
a.cc:12:17: error: 'memset' was not declared in this scope
12 | memset(X[i],'w',N);
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
... |
s096235431 | p03956 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZER... | a.cc: In function 'void solve()':
a.cc:54:28: error: return-statement with a value, in function returning 'void' [-fpermissive]
54 | return ret += NL[0]*NL[1]+NL[1]*NL[2]+NL[2]*NL[0];
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
s407678309 | p03956 | C++ | #include<stdio.h>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<bitset>
#include<utility>
#include<functional>
#include<iomanip>
#include<sstream>
#include<ctime>
#include<cassert>
using namespace std;
#de... | a.cc: In function 'int main()':
a.cc:124:25: error: expected '}' before 'else'
124 | else su+=1ll*sz[i]*sz[i+n]+1ll*sz[i+n]*sz[i+2*n]+1ll*sz[i+2*n]*sz[i];
| ^~~~
a.cc:123:22: note: to match this '{'
123 | }else{
| ^
a.c... |
s532962762 | p03957 | C++ | #include<iostream>
#include<stdio.h>
//#include <bits/stdc++.h>
#include<vector>
#include<float.h>
#include<iomanip>
#include<algorithm>
#include<string>
#include<cstring>
#include<math.h>
#include<cmath>
#include<sstream>
#include<set>
#include<map>
#include<... | a.cc: In function 'int main()':
a.cc:46:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
46 | if(s[i] == "C")f = true;
a.cc:47:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
47 | if(s[i] == "F" && f){
|
s317082639 | p03957 | C++ | #include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define intll int long long
const intll INF = 100000000000000000;
const int MOD = 1e9 + 7;
int main() {
string s;
cin >> s ;
bool OK = false ;
rep(i,s.size()){
if(s.at(i)... | a.cc: In function 'int main()':
a.cc:24:2: error: expected '}' at end of input
24 | }
| ^
a.cc:10:12: note: to match this '{'
10 | int main() {
| ^
|
s573064056 | p03957 | C++ | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
string s;
int l;
int mian()
{
cin>>s;
l=s.size();
for(register int i=0;i<l;i++)
{
if(s[i]=='C')
{
for(register int j=i+1;j<l;j++)
{
if(s[j]=='F')
{
cout<<"Yes";
return 0;
}
}
}
}
cout<<"No";
return 0;
} | a.cc: In function 'int mian()':
a.cc:11:26: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
11 | for(register int i=0;i<l;i++)
| ^
a.cc:15:42: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
15 | ... |
s459317772 | p03957 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
for(int i=0;i< s.size();i++){
cin>>s[i];
if(S[i]=="C"){
for(int j=i+1;j<s.size();j++){
int s[j];
if(s[j]=="F"){
cout<<"Yes"<<endl;
}
else if(s[j]!="F"){
cout<<"No"<<endl... | a.cc: In function 'int main()':
a.cc:8:8: error: 'S' was not declared in this scope
8 | if(S[i]=="C"){
| ^
a.cc:11:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
11 | if(s[j]=="F"){
| ~~~~^~~~~
a.cc:14:21: error: ISO C++ forbids comparis... |
s084274318 | p03957 | C++ | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i,n) for(int i=0, i##_len=(int)(n); i<i##_len; i++)
#define reps(i,n) for(int i=1 , i##_len=(int)(n);i<=i##_len;i++)
#define rrep(i,n) for(int i=((int)(n)-1);i>=0;i--)
#define rreps(i,n) for(int i=((int)(n));i>0;i--)
#define repi(i,x) for(a... | a.cc: In function 'int main()':
a.cc:29:9: error: 'strin' was not declared in this scope; did you mean 'stdin'?
29 | strin s;
| ^~~~~
| stdin
a.cc:31:15: error: 's' was not declared in this scope
31 | cin >>s;
| ^
|
s345580571 | p03957 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using P = pair<string,int>;
const double PI = acos(-1);
int main() {
string s;
cin >> s;
bool flag1 = false,flag2 = false;
rep(i,n){
if(s.at(i)=='C')flag1 = true;
if(flag1&&s.at(i)=='F')flag2=tr... | a.cc: In function 'int main()':
a.cc:12:7: error: 'n' was not declared in this scope
12 | rep(i,n){
| ^
a.cc:3:45: note: in definition of macro 'rep'
3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
| ^
|
s191720926 | p03957 | C++ | #include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
#include <iomanip>
using namespace std;
#define intmax INT_MAX
#define lmax LO... | a.cc: In function 'int main()':
a.cc:61:5: error: 'else' without a previous 'if'
61 | else{
| ^~~~
|
s103493934 | p03957 | C++ | #include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
#include <iomanip>
using namespace std;
#define intmax INT_MAX
#define lmax LO... | a.cc: In function 'int main()':
a.cc:60:5: error: 'else' without a previous 'if'
60 | else{
| ^~~~
a.cc:70:11: error: expected '}' at end of input
70 | return 0;}
| ^
a.cc:48:11: note: to match this '{'
48 | int main(){
| ^
|
s739761247 | p03957 | C++ | #include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
#include <iomanip>
using namespace std;
#define intmax INT_MAX
#define lmax LO... | a.cc: In function 'int main()':
a.cc:60:5: error: 'else' without a previous 'if'
60 | else{
| ^~~~
a.cc:70:11: error: expected '}' at end of input
70 | return 0;}
| ^
a.cc:48:11: note: to match this '{'
48 | int main(){
| ^
|
s778611457 | p03957 | C++ | #include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
#include <iomanip>
using namespace std;
#define intmax INT_MAX
#define lmax LO... | a.cc: In function 'int main()':
a.cc:50:8: error: 'A' was not declared in this scope
50 | cin>>A>>B;
| ^
a.cc:50:11: error: 'B' was not declared in this scope
50 | cin>>A>>B;
| ^
a.cc:60:5: error: 'else' without a previous 'if'
60 | else{
| ^~~~
a.cc:70:11: error:... |
s702816825 | p03957 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
int a=s.length();
int i,j;
int k=0;
for(i=0;i<a;i++){
if(s[i]=="C"){
k=1;
break;
}
}
if(k==1){
for(j=i;j<a;j++){
if(s[j]=="F"){
cout<<"YES"<<endl;
return 0;
}
}
}
cout<<... | a.cc: In function 'int main()':
a.cc:10:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
10 | if(s[i]=="C"){
a.cc:17:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
17 | if(s[j]=="F"){
|
s265845482 | p03957 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string S;
cin>>S;
bool A=false;
bool B=false;
for(int i=0;i<S.size();i++){
if(S.at(i)=='C'&&A==false)A=true;
if(S.at(i)=='F'&&A==true){
cout<<"Yes"<<endl;
}
if(i==S.size()-1)B=true;
}
if(B==true){cout<<"No"<<endl;
}
| a.cc: In function 'int main()':
a.cc:16:2: error: expected '}' at end of input
16 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s285400711 | p03957 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string S;
cin>>S;
bool A=false;
bool B=false;
for(int i=0;i<S.size(),i++){
if(S.at(i)=='C'&&A==false)A=true;
if(S.at(i)=='F'&&A==true){
cout<<"Yes"<<endl;
}
if(i==S.size()-1)B=true;
}
if(B==true){cout<<"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:8:29: error: expected ';' before ')' token
8 | for(int i=0;i<S.size(),i++){
| ^
| ;
a.cc:16:2: error: expected '}' at end of input
16 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
... |
s312899686 | p03957 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string S;
cin>>S;
bool A=false;
bool B=false;
for(int i=0;i<S.size,i++){
if(S.at(i)=='C'&&A==false)A=true;
if(S.at(i)=='F'&&A==true){
cout<<"Yes"<<endl;
}
if(i==S.size()-1)B=true;
}
if(B==true){cout<<"No"<<endl;
} | a.cc: In function 'int main()':
a.cc:8:19: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsign... |
s691203175 | p03957 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll mod=1000000007;
const int MAX_N = 1000; // n の最大値
// nCk を取得
double nCk(int n, int k) {
double res=1.0;
for(int i=0; i<n; i++){
res*=0.5;}
for(int i=0; i<k; i++){
res*=(double)(n-i);
res/=(double)(k-... | a.cc:37:1: error: expected unqualified-id before 'else'
37 | else{
| ^~~~
a.cc:38:23: error: expected declaration before '}' token
38 | cout << "No" << endl;}}
| ^
|
s850585353 | p03957 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll mod=1000000007;
const int MAX_N = 1000; // n の最大値
// nCk を取得
double nCk(int n, int k) {
double res=1.0;
for(int i=0; i<n; i++){
res*=0.5;}
for(int i=0; i<k; i++){
res*=(double)(n-i);
res/=(double)(k-... | a.cc:37:1: error: expected unqualified-id before 'else'
37 | else{
| ^~~~
a.cc:38:23: error: expected declaration before '}' token
38 | cout << "No" << endl;}}
| ^
|
s120571550 | p03957 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void){
string s;
cin >> s;
bool a,b;
for( int i = 0; i<16;++i){
if(s[i]=='C')a = true;
if(s[i]=='F' && a ) b = true;
}
cout << b ? "Yes" : "No" << endl;
} | a.cc: In function 'int main()':
a.cc:17:26: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
17 | cout << b ? "Yes" : "No" << endl;
| ~~~~~^~~~~~~
|
s751660799 | p03957 | C | #include <iostream>
#include <string>
using namespace std;
int ans = 0;
string s;
int main()
{
cin >> s;
for(int i = 0; i < s.size(); i++)
{
if(s[i] == 'C')
{
ans++;
}
if(s[i] == 'F' && ans)
{
cout << "Yes";
return 0;
}
}
cout << "No";
return 0;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s210329235 | p03957 | C++ | #include <iostream>
#include <string>
using namespace std;
int ans = 0;
string s;
int main()
{
cin >> s;
for(int i = 0; i < s.size(); i++)
{
if(a[i] == 'c')
{
ans ++;
}
if(a[i] == 'f' && ans)
{
cout << "Yes";
return 0;
}
}
cout << "No";
return 0;
} | a.cc: In function 'int main()':
a.cc:11:20: error: 'a' was not declared in this scope
11 | if(a[i] == 'c')
| ^
a.cc:15:20: error: 'a' was not declared in this scope
15 | if(a[i] == 'f' && ans)
| ^
|
s640205412 | p03957 | C++ | using namespace std;
int main(){
string a;
cin>>a;
int cnt=0;
for(int i=0;i<a.size();i++){
if(a[i]=='C'){
cnt=1;
}
if(a[i]=='F'&&cnt==1){
cout<<"Yes";
return 0;
}
}
cout<<"No";
return 0;
} | a.cc: In function 'int main()':
a.cc:3:5: error: 'string' was not declared in this scope
3 | string a;
| ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
+++ |+#include <string>
1 | using namespace std;
a.cc:4:5: error: ... |
s950083736 | p03957 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s ;
cin >> s ;
int a = 0;
int b = 0 ;
int c = 0 ;
int d = 0 ;
for ( int i = 0 ; i < s.size() ; i++){
if (s.at(i) == 'C') {a = 1 ;
C = i ;
break;
}
}
for ( int i = 0 ; i < ... | a.cc: In function 'int main()':
a.cc:23:9: error: 'C' was not declared in this scope
23 | C = i ;
| ^
|
s245188697 | p03957 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string s ;
cin >> s ;
int a = 0;
int b = 0 ;
int c = 0 ;
int d = 0 ;
for ( int i = 0 ; i < s.size() ; i++){
if (s.at(i) == 'C') {a = 1 ;
C = i
break;
}
}
for ( int i = 0 ; i < s.... | a.cc: In function 'int main()':
a.cc:23:9: error: 'C' was not declared in this scope
23 | C = i
| ^
a.cc:37:14: error: expected ';' before '}' token
37 | d = i
| ^
| ;
38 |
39 | }
| ~
|
s252973049 | p03957 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string a;
cin>>a;
for(int i=0;i<a.size()){
if(a[i]=='c'){
for(int j=i+1;j<a.size();j++){
if(a[i]=='f'){
cout<<"Yes"<<endl; return 0;
}
}
}
}
cout<<"No"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:31: error: expected ';' before ')' token
6 | for(int i=0;i<a.size()){
| ^
| ;
|
s428061424 | p03957 | C++ | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
string s;
int l;
int mian()
{
cin>>s;
l=s.size();
for(register int i=0;i<l;i++)
{
if(s[i]=='C')
{
for(register int j=i+1;j<l;j++)
{
if(s[j]=='F')
{
... | a.cc: In function 'int mian()':
a.cc:11:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
11 | for(register int i=0;i<l;i++)
| ^
a.cc:15:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
15 | for(reg... |
s504048639 | p03957 | C++ | #include<iostream>
using namespace syd;
int main() {
bool flag = false;
char tmp;
while(cin >> tmp) {
if (flag && tmp == 'F') {
cout << "Yes" << endl;
return 0;
}
else if (!flag && tmp == 'C') {
flag = true;
}
}
cout << "No" << endl;
} | a.cc:2:17: error: 'syd' is not a namespace-name
2 | using namespace syd;
| ^~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | while(cin >> tmp) {
| ^~~
| std::cin
In file included from a.cc:1... |
s217452701 | p03957 | C++ | #include<iostream>
using namespace syd;
int main() {
bool flag = false;
char tmp;
while(cin >> tmp) {
if (flag && tmp == 'F') {
cout << "Yes" << endl;
return 0;
}
else if (!flag && tmp == 'C') {
flag = true;
}
}
cout << "No" << endl; | a.cc:2:17: error: 'syd' is not a namespace-name
2 | using namespace syd;
| ^~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | while(cin >> tmp) {
| ^~~
| std::cin
In file included from a.cc:1... |
s052973003 | p03957 | C++ | #include <bits/stdc++.h>
#define ll long long int
#define MOD 1000000007
#define INF 1e18
using namespace std;
int main(void){
string s;
cin >> s;
int state = 0;
for (int i = 0; i < s.size(); i++){
if (s == 0){
if (s[i] == 'C')
s++;
}
else if (s == 1)
if (s[i] == 'F')
... | a.cc: In function 'int main()':
a.cc:14:11: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
14 | if (s == 0){
| ~ ^~ ~
| | |
| | int
| std::string {aka std::__cxx11::basic_string<ch... |
s140056001 | p03957 | C++ | #include<stdio.h>
int main()
{char a[101];
int q=0;
int s=0;
scanf("%s",a);
int l=strlen(a);
int i,j;
for(i=0;i<l;i++)
{if(a[i]=='C'){
q=1;
for(j=i+1;j<l;j++)
{
if(a[j]=='F'){
printf("Yes");
s=1;
break;
}
}
if(s==0)printf("No");
}
}
if(q==0)
printf("No");
return 0;
} | a.cc: In function 'int main()':
a.cc:9:7: error: 'strlen' was not declared in this scope
9 | int l=strlen(a);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<stdio.h>
+++ |+#include <cstring>
2 |
|
s303877743 | p03957 | C++ | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
string s;
int l;
int mian()
{
cin>>s;
l=s.size();
for(register int i=0;i<l;i++)
{
if(s[i]=='C')
{
for(register int j=i+1;j<l;j++)
{
if(s[j]=='F')
{
... | a.cc: In function 'int mian()':
a.cc:11:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
11 | for(register int i=0;i<l;i++)
| ^
a.cc:15:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
15 | for(reg... |
s954856214 | p03957 | C++ | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
string s;
int l;
int mian()
{
cin>>s;
l=s.size();
for(register int i=0;i<l;i++)
{
if(s[i]=='C')
{
for(register int j=i+1;j<l;j++)
{
if(s[j]=='F')
{
... | a.cc: In function 'int mian()':
a.cc:11:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
11 | for(register int i=0;i<l;i++)
| ^
a.cc:15:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
15 | for(reg... |
s159869525 | p03957 | C++ | #include<iostream>
using namespace std;
bool flag[3];
int main(){
string a;
cin>>a;
for(int i=0;i<a.length();++i){
if(a[i]=='C')v[0]=1;
if(a[i]=='F'&&v[0])v[1]=1;
}
if(v[1])cout<<"Yes";
else cout<<"No";
return 0;
} | a.cc: In function 'int main()':
a.cc:8:22: error: 'v' was not declared in this scope
8 | if(a[i]=='C')v[0]=1;
| ^
a.cc:9:23: error: 'v' was not declared in this scope
9 | if(a[i]=='F'&&v[0])v[1]=1;
| ^
a.cc:11:8: error: 'v' was not declared ... |
s796994376 | p03957 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
using namespace std;
char s[205];
int flag;
int main(){
scanf("%s",s);
int n=strlen(s);
for(register int i=0;i<n;++i){
if(s[i]=='C')flag=1;
if(s[i]=='F'&&flag==1)cout<<"Yes\n";
else cout<<"No\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:11:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
11 | for(register int i=0;i<n;++i){
| ^
a.cc:16:2: error: expected '}' at end of input
16 | }
| ^
a.cc:8:11: note: to match this '{'
8 | int main(... |
s832777538 | p03957 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
using namespace std;
char s[205];
int flag;
int main(){
scanf("%s",s);
int n=strlen(s);
for(register int i=0;i<n;++i){
if(s[i]=='C')flag1=1;
if(s[i]=='F'&&flag1==1)cout<<"Yes\n";
else cout<<"No\n";
return 0;
} | a.cc: In function 'int main()':
a.cc:11:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
11 | for(register int i=0;i<n;++i){
| ^
a.cc:12:22: error: 'flag1' was not declared in this scope; did you mean 'flag'?
12 | if(s[i]=='C')flag1=1;
... |
s367820623 | p03957 | C++ | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
string s;
int l;
int mian()
{
cin>>s;
l=s.size();
for(register int i=0;i<l;i++)
{
if(s[i]=='C')
{
for(register int j=i+1;j<l;j++)
{
if(s[j]=='F')
{
... | a.cc: In function 'int mian()':
a.cc:11:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
11 | for(register int i=0;i<l;i++)
| ^
a.cc:15:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
15 | for(reg... |
s689358094 | p03957 | C++ | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
string s;
cin >> s;
string t = s;
reverse(t.begin(), t.end());
string ans = "No";
if (s.find != string::npos && s.find('F') != string::npos &&... | a.cc: In function 'int main()':
a.cc:13:16: error: invalid operands of types '<unresolved overloaded function type>' and 'const std::__cxx11::basic_string<char>::size_type' {aka 'const long unsigned int'} to binary 'operator!='
13 | if (s.find != string::npos && s.find('F') != string::npos && s.find('C') < t.siz... |
s412934337 | p03957 | C++ | int main(void)
{
char N[101];
int i,flag=0;
scanf("%s", &N);
for (i = 0; i < 100; i++) {
if (N[i] == 'C')
{
flag = 1; continue;
}
if(flag==1 &&N[i] == 'F')
{
printf("Yes"); return 0;
}
}
printf("No");
return 0;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf' was not declared in this scope
5 | scanf("%s", &N);
| ^~~~~
a.cc:13:25: error: 'printf' was not declared in this scope
13 | printf("Yes"); return 0;
| ^~~~~~
a.cc:1:1: note: 'print... |
s897885265 | p03957 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
bool flag1 = false;
bool flag2 = false;
for(char i:s){
if(i=='C') flag1 = true;
if(i=='F') flag2 = true;
}
if(flag1==true&&flag==true) cout << "Yes" << endl;
else cout << "No" << endl;
}
| a.cc: In function 'int main()':
a.cc:13:21: error: 'flag' was not declared in this scope; did you mean 'flag2'?
13 | if(flag1==true&&flag==true) cout << "Yes" << endl;
| ^~~~
| flag2
|
s198511784 | p03957 | C++ | v | a.cc:1:1: error: 'v' does not name a type
1 | v
| ^
|
s918029904 | p03957 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
string a;
cin>>a;
int ans=0;
for(int i=0;i<a.size();i++)
{
if(a[i]=='C')
{
ans=1;
}
if(a[i]=='F'&&cnt==1){
cout<<"Yes";
return 0;
}
}
cout<<"No";
return 0... | a.cc: In function 'int main()':
a.cc:14:23: error: 'cnt' was not declared in this scope; did you mean 'int'?
14 | if(a[i]=='F'&&cnt==1){
| ^~~
| int
|
s388638495 | p03957 | C++ | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
string s;
int l;
int mian()
{
cin>>s;
l=s.size();
for(register int i=0;i<l;i++)
{
if(s[i]=='C')
{
for(register int j=i+1;j<l;j++)
{
if(s[j]=='F')
{
... | a.cc: In function 'int mian()':
a.cc:11:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
11 | for(register int i=0;i<l;i++)
| ^
a.cc:15:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
15 | for(reg... |
s225852208 | p03957 | C++ | #include<bits/stdc++.h>
using namespace std;
string s;
int main(){
cin>>s;
if(s.find(‘C’)==-1||s.find(‘F’)==-1)cout<<“No”;
else if(s.find(’C’)<s.find(‘F’))cout<<“Yes”;
else cout<<“No”;
return 0;
} | a.cc:6:15: error: extended character ‘ is not valid in an identifier
6 | if(s.find(‘C’)==-1||s.find(‘F’)==-1)cout<<“No”;
| ^
a.cc:6:15: error: extended character ’ is not valid in an identifier
a.cc:6:32: error: extended character ‘ is not valid in an identifier
6 | if(s.find(‘C’)==-... |
s576747332 | p03957 | C++ | #include<bits/stdc++.h>
using namespace std;
string s;
int main{
cin>>s;
if(s.find(‘C’)==-1||s.find(‘F’)==-1)cout<<“No”;
else if(s.find(’C’)<s.find(‘F’))cout<<“Yes”;
else cout<<“No”;
return 0;
} | a.cc:6:15: error: extended character ‘ is not valid in an identifier
6 | if(s.find(‘C’)==-1||s.find(‘F’)==-1)cout<<“No”;
| ^
a.cc:6:15: error: extended character ’ is not valid in an identifier
a.cc:6:32: error: extended character ‘ is not valid in an identifier
6 | if(s.find(‘C’)==-... |
s358664645 | p03957 | C++ | #include<bits/c++.h>
using namespace std;
string s;
int main{
cin>>s;
if(s.find(‘C’)==-1||s.find(‘F’)==-1)cout<<“No”;
else if(s.find(’C’)<s.find(‘F’))cout<<“Yes”;
else cout<<“No”;
return 0;
} | a.cc:1:9: fatal error: bits/c++.h: No such file or directory
1 | #include<bits/c++.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s036116031 | p03957 | C++ | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
string s;
int l;
int mian()
{
cin>>s;
l=s.size();
for(register int i=0;i<l;i++)
if(s[i]=='C')
for(register int j=i+1;j<l;j++)
if(s[j]=='F')
{
cout<<"Yes";
... | a.cc: In function 'int mian()':
a.cc:11:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
11 | for(register int i=0;i<l;i++)
| ^
a.cc:13:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
13 | for(reg... |
s515329934 | p03957 | C++ | #include<iostream>
#include<cstdio>
#include<string>
using namespace std;
string s;
int l;
int mian()
{
cin>>s;
l=s.size();
for(register int i=0;i<l;i++)
if(s[i]=='C')
for(register int j=i+1;j<l;j++)
if(s[j]=='F')
{
cout<<"Yes";
... | a.cc: In function 'int mian()':
a.cc:11:22: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
11 | for(register int i=0;i<l;i++)
| ^
a.cc:13:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
13 | for(reg... |
s941150735 | p03957 | C++ | #include <bits/stdc++.h>
using namespace std;
string s;
int mian()
{
cin>>s;
for(int i=0;i<s.size();i++)
if(s[i]=='C')
for(int j=i+1;j<s.size();j++)
if(s[j]=='F')
{
cout<<"Yes";
return 0;
}
cout<<"No"... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s715703421 | p03957 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
char s;
cin>>s;
int len=strlen(s);
for(int i=0; i<len; i++)
for(int j=i+1; j<len; j++)
if(i=='C' && j=='F')
{
cout<<"YES";
return 0;
}
cout<<"NO";
return 0;
} | a.cc: In function 'int main()':
a.cc:8:20: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
8 | int len=strlen(s);
| ^
| |
| char
In file included from /usr/include/c++/14/cstring:43,
from /usr/inclu... |
s596451313 | p03957 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
int len=strlen(s);
for(int i=0; i<len; i++)
for(int j=i+1; j<len; j++)
if(i=='C' && j=='F')
{
cout<<"YES";
return 0;
}
cout<<"NO";
return 0;
... | a.cc: In function 'int main()':
a.cc:8:20: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
8 | int len=strlen(s);
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included... |
s499951301 | p03957 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
int len=strlen(s);
for(int i=0; i<len; i++)
for(int j=i+1; j<len; j++)
if(i=='C' && j=='F')
{
cout<<"YES";
return 0;
}
cout<<"NO";
return 0;
... | a.cc: In function 'int main()':
a.cc:8:20: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
8 | int len=strlen(s);
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included... |
s103026800 | p03957 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
gets(s);
int l=0;
for (int i=0;i<s.size();i++){
if (s[i]=='C') l=1;
if (s[i]=='F' && l==1){
printf("Yes\n");
return 0;
}
}
printf("No\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
5 | gets(s);
| ^~~~
| getw
|
s563968502 | p03957 | C++ | #include<bits/stdc++.h>
using namespace std;
inline int read()
{
int x=0,f=1;
char c=getchar();
while(c<'0'||c>'9') {if(c=='-') f=-1; c=getchar();}
while(c>='0'&&c<='9') {x=x*10+c-'0'; c=getchar();}
return f*x;
}
inline void write(int x)
{
if(x<0) {putchar('-'); x=-x;}
if(x>9) write(x/10);
... | a.cc: In function 'int main()':
a.cc:22:25: error: 'num' was not declared in this scope; did you mean 'enum'?
22 | num=1;
| ^~~
| enum
a.cc:24:32: error: 'num' was not declared in this scope; did you mean 'enum'?
24 | ... |
s430272081 | p03957 | C++ | #include<iostream>
using namespace std;
int main()
{
int temp=0;
char le;
while(cin>>le)
{
if(le=='C') temp++;
if(temp==1&&le=='F') temp++;
if(temp==2)
{
cout<<"Yes"<<endl;
num++;
return 0;
}
}
cout<<"No"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:25: error: 'num' was not declared in this scope; did you mean 'enum'?
14 | num++;
| ^~~
| enum
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.