submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s237353111
p03970
C++
#include <iostream> #include <string> using namespace std; int main(){ string s; int k=0; cin>>s; if(s[0]!='C')k++; if(s[1]!='O')k++; if(s[2]!='D')k++; if(s[3]!='E')k++; if(s[4]!='F')k++;FESTIVAL2016CODE if(s[5]!='E')k++; if(s[6]!='S')k++; if(s[7]!='T')k++; if(s[8]!='I')k++; if(s[9]!='V')k++; if(s[10]!='A...
a.cc: In function 'int main()': a.cc:12:26: error: 'FESTIVAL2016CODE' was not declared in this scope 12 | if(s[4]!='F')k++;FESTIVAL2016CODE | ^~~~~~~~~~~~~~~~
s653998998
p03970
C++
#include <bits/stdc++> using namespace std; int main(){ string s; cin >> s; string t="CODEFESTIVAL2016"; int res=0; for(int i=0;i<t.size();++i){ if(s[i]!=t[i])res++; } cout<<res<<endl; }
a.cc:1:10: fatal error: bits/stdc++: No such file or directory 1 | #include <bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s811070935
p03970
C++
#include<bits/stdc++.h> #include<cmath> using namespace std; int main(){ string a,b; cin>>a; b="CODEFESTIVAL2016" int ans; ans=0; for(long long i=0;i<16;i++){ if(a[i]==b[i]){ ans++; } } cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:8:23: error: expected ';' before 'int' 8 | b="CODEFESTIVAL2016" | ^ | ; 9 | int ans; | ~~~ a.cc:10:1: error: 'ans' was not declared in this scope; did you mean 'abs'? 10 | ans=0; | ^...
s196667178
p03970
C++
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]){ int cnt = 0; string cf2016[] = "CODEFESTIVAL2016"; string s; cin >> s; for (int i = 0; i < cf2016.size(); ++i) { if(cf2016.at(i) != s.at(i)) ++cnt; } cout << cnt << endl; return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:6:27: error: array must be initialized with a brace-enclosed initializer 6 | string cf2016[] = "CODEFESTIVAL2016"; | ^~~~~~~~~~~~~~~~~~ a.cc:9:36: error: request for member 'size' in 'cf2016', which is of non-class type 's...
s868899292
p03970
C++
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]){ int cnt = 0; string cf2016[] = "CODEFESTIVAL2016"; string s(20); cin >> s; for (int i = 0; i < cf2016.size(); ++i) { if(cf2016.at(i) != s.at(i)) ++cnt; } cout << cnt << endl; return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:6:27: error: array must be initialized with a brace-enclosed initializer 6 | string cf2016[] = "CODEFESTIVAL2016"; | ^~~~~~~~~~~~~~~~~~ a.cc:7:20: error: no matching function for call to 'std::__cxx11::basic_string<char>::...
s704920849
p03970
C++
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]){ int cnt = 0; string cf2016[] = "CODEFESTIVAL2016"; string s[20]; cin >> s; for (int i = 0; i < cf2016.size(); ++i) { if(cf2016.at(i) != s.at(i)) ++cnt; } cout << cnt << endl; return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:6:27: error: array must be initialized with a brace-enclosed initializer 6 | string cf2016[] = "CODEFESTIVAL2016"; | ^~~~~~~~~~~~~~~~~~ a.cc:8:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'st...
s493520949
p03970
C++
#include<iostream> #include<string> using namespace std; int main(){ int idx=0; string s=(16,CODEFESTIVAL2016); string ss; cin>>ss; for(int i=16;i>0;i--){ if(s[i]!=ss[i])idx++; } cout<<idx<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:16: error: 'CODEFESTIVAL2016' was not declared in this scope 7 | string s=(16,CODEFESTIVAL2016); | ^~~~~~~~~~~~~~~~
s538604235
p03970
C++
#include<iostream> #include<string> using namespace std; int main(){ int idx=0; string s=CODEFESTIVAL2016; string ss; cin>>ss; for(int i=16;i>0;i--){ if(s[i]!=ss[i])idx++; } cout<<idx<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:12: error: 'CODEFESTIVAL2016' was not declared in this scope 7 | string s=CODEFESTIVAL2016; | ^~~~~~~~~~~~~~~~
s380036345
p03970
C++
#include<iostream> #include<string> using namespace std; int main(){ int idx=0; string s=CODEFESTIVAL2016; string ss; cin>>ss; for(int i=16;i>0;i--){ if(s[i]!=ss[i])idx++; } cout<<idx<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:12: error: 'CODEFESTIVAL2016' was not declared in this scope 7 | string s=CODEFESTIVAL2016; | ^~~~~~~~~~~~~~~~
s102081121
p03970
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string a = C0DEFESTIVAL2O16; int ans = 0; for(int i = 0; i < 16; i++) { if(s[i] != a[i]) ans++; } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:14: error: 'C0DEFESTIVAL2O16' was not declared in this scope 7 | string a = C0DEFESTIVAL2O16; | ^~~~~~~~~~~~~~~~
s299005707
p03970
C++
#include <bits/stdc++.h> #define int long long #define f(i,n) for(int i=0;i<n;i++) #define INF INT_MAX #define LINF LLONG_MAX #define mod 1000000007 #define pie 3.141592653589793238462643383279 #define P pair<int,int> #define prique priority_queue #define F first #define S second using namespace std; signed main(){ in...
a.cc: In function 'int main()': a.cc:15:18: error: 'CODEFESTIVAL2016' was not declared in this scope 15 | string s=CODEFESTIVAL2016,t; | ^~~~~~~~~~~~~~~~ a.cc:16:14: error: 't' was not declared in this scope 16 | cin>>t; | ^
s841100414
p03970
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin>>S; string S0="CODEFESTIVAL2016"; int cnt=0; rep(i,S.size()){ if(S[i]!=S0[i])cnt++; } cout<<cnt<<endl; }
a.cc: In function 'int main()': a.cc:9:13: error: 'i' was not declared in this scope 9 | rep(i,S.size()){ | ^ a.cc:9:9: error: 'rep' was not declared in this scope 9 | rep(i,S.size()){ | ^~~
s335146982
p03970
C++
#include<bits/stdc++.h> using namespace std; string s="CODEFESTIVAL2016a"; int ans=0; int main() { gets(a); for(int i=0;i<=15;i++) if(a[i]!=s[i]) ans++; cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:10: error: 'a' was not declared in this scope 9 | gets(a); | ^ a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 9 | gets(a); | ^~~~ | getw
s716969950
p03970
C++
#include<bits/stdc++.h> using namespace std; string s="CODEFESTIVAL2016a"; int ans=0; int main() { getline(cin,a); for(register ll i=0;i<=15i++) if(a[i]!=s[i]) ans++; cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:17: error: 'a' was not declared in this scope 9 | getline(cin,a); | ^ a.cc:10:18: error: 'll' does not name a type 10 | for(register ll i=0;i<=15i++) | ^~ a.cc:10:25: error: expected ';' before 'i' 10 | for(registe...
s589717649
p03970
C++
#include<bits/stdc++.h> using namespace std; string s="CODEFESTIVAL2016a; int ans=0; int main() { getline(cin,a); for(register ll i=0;i<=15i++) if(a[i]!=s[i]) ans++; cout<<ans<<endl; return 0; }
a.cc:4:10: warning: missing terminating " character 4 | string s="CODEFESTIVAL2016a; | ^ a.cc:4:10: error: missing terminating " character 4 | string s="CODEFESTIVAL2016a; | ^~~~~~~~~~~~~~~~~~~ a.cc:5:1: error: expected primary-expression before 'int' 5 | int ans=0; | ^~~...
s657603886
p03970
C++
#include <iostream> #include <string> #include <vector> typedef unsigned int UINT; using namespace std; int main(void) { const string CLECT = "CODEFESTIVAL2016"; string C; cin >> C; int ans = 0; for (int index = 0; i < CLECT.length(); ++index) { if (CLECT[index] != C[index]) an...
a.cc: In function 'int main()': a.cc:13:25: error: 'i' was not declared in this scope 13 | for (int index = 0; i < CLECT.length(); ++index) { | ^
s690931103
p03970
C++
#include <iostream> #include<string> using namespace std; int main() { string s;cin>>s; char s2[16]="CODEFESTIVAL2016"; int ans=0; for(int i=0;i<16;i++){ if(s2!=s)ans++; } cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:21: error: initializer-string for 'char [16]' is too long [-fpermissive] 7 | char s2[16]="CODEFESTIVAL2016"; | ^~~~~~~~~~~~~~~~~~
s452402799
p03970
C++
s1 = 'CODEFESTIVAL2016' print s2 ans = 0 for i in range(len(s1)): ans += [0, 1][s1[i] != s2[i]] print ans
a.cc:1:6: warning: multi-character literal with 16 characters exceeds 'int' size of 4 bytes 1 | s1 = 'CODEFESTIVAL2016' | ^~~~~~~~~~~~~~~~~~ a.cc:1:1: error: 's1' does not name a type 1 | s1 = 'CODEFESTIVAL2016' | ^~
s719022886
p03970
C++
#include<bits/stdc++.h> using namespace std; char s; int ans=0; int main() { cin>>s; if(s!='C')ans++; cin>>s; if(s!='O')ans++; cin>>s; if(s!='D')ans++; cin>>s; if(s!='E')ans++; cin>>s; if(s!='F')ans++; cin>>s; if(s!='E')ans++; cin>>s; if(s!='S')ans++; cin>>s; ...
a.cc: In function 'int main()': a.cc:29:12: error: 'ODEFESTIVAL2016' was not declared in this scope 29 | cin>>s;ODEFESTIVAL2016 | ^~~~~~~~~~~~~~~
s564356208
p03970
C++
#include<bits/stdc++.h> using namespace std; string st,st1; int main() { st1="CODEFESTIVAL2016"; cin>>st; for(int i=0;i<st.size();i++) if(st[i]!=st1[i])z++; cout<<z<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:28: error: 'z' was not declared in this scope 9 | if(st[i]!=st1[i])z++; | ^ a.cc:10:15: error: 'z' was not declared in this scope 10 | cout<<z<<endl; | ^
s436304120
p03970
C++
#include <bits/stdc++.h> //#include <Rem> using namespace std; string s,t="CODEFESTIVAL2016"; int count=0; int main() { cin>>s; for (int i=0; i<s.length(); i++) if(s[i]!=t[i]) count++; printf("%d\n",count); return 0; }
a.cc: In function 'int main()': a.cc:13:13: error: reference to 'count' is ambiguous 13 | count++; | ^~~~~ In file included from /usr/include/c++/14/algorithm:86, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/...
s084507616
p03970
C++
using namespace std; #define EACH(i,a) for (auto& i : a) #define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i) #define RFOR(i,a,b) for(int i=(int)b-1;i>=(int)a;--i) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define ALL(a) (a).begin(),(a).end() #define debug(x) cerr << #x << ":" << x << endl; #define OK(o...
a.cc: In function 'void CINT(Head&&, Tail&& ...)': a.cc:18:3: error: 'cin' was not declared in this scope 18 | cin >> head; CINT(move(tail)...); | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | ...
s571123811
p03970
Java
import java.util.Scanner; public class Signboard{ public static void main(String[] args) { Scanner sc =new Scanner(System.in); String s=sc.next(); //入力された文字列 String test="CODEFESTIVAL2016"; int num=0; //書き換えるかい回数 //1文字ずつ一致しているか確認 for(int i=0;i<s.length();i++) { char s_c=s.charAt(i); if(!(s_c==...
Main.java:3: error: class Signboard is public, should be declared in a file named Signboard.java public class Signboard{ ^ 1 error
s021929734
p03970
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; cin >> s; string str = "CODEFESTIVAL2016"; int num = 0; for(int = 0;i < str.size();i++){ if(s[i] != str[i]){ num++; } } cout << num << endl; }
a.cc: In function 'int main()': a.cc:11:11: error: expected unqualified-id before '=' token 11 | for(int = 0;i < str.size();i++){ | ^ a.cc:11:10: error: expected ';' before '=' token 11 | for(int = 0;i < str.size();i++){ | ^~ | ; a.cc:11:11: error: expected primar...
s162003317
p03970
C++
#include<iostream> #include<string> using namespace std; int main(){ string s; cin >> s; string str = "CODEFESTIVAL2016"; int num = 0; REP(i,str.size()){ if(s[i] != str[i]){ num++; } } cout << num << endl; }
a.cc: In function 'int main()': a.cc:11:7: error: 'i' was not declared in this scope 11 | REP(i,str.size()){ | ^ a.cc:11:3: error: 'REP' was not declared in this scope 11 | REP(i,str.size()){ | ^~~
s070605441
p03970
C
#include <iostream> #include <string> using namespace std; int main(void){ string s,t; int x=0,i; cin>>s; t="CODEFESTIVAL2016"; for(i=0;i<16;i++){ if(s[i]!=t[i]) x++; } cout<<x<<endl; return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s201068213
p03970
C
#include <iostream> using namespace std; int main(void){ string s,t; int x=0,i; cin>>s; t="CODEFESTIVAL2016"; for(i=0;i<16;i++){ if(s[i]!=t[i]) x++; } cout<<x<<endl; return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s361024284
p03970
C++
#include <bits/stdc++.h> // iostream is too mainstream #include <cstdio> // bitch please #include <iostream> #include <algorithm> #include <cstdlib> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <list> #include <cmath> #include <iomanip> #include <time.h> #define dibs reserv...
a.cc: In function 'int main()': a.cc:47:67: error: 'ans' was not declared in this scope; did you mean 'abs'? 47 | for(int i =0; i < (int)S.length(); i++) if(S[i] != Sc[i]) ans++; | ^~~ | ...
s194121562
p03970
C++
#include<bits/stdc++.h> using namespace std; #define vi vector<int> #define vvi vector<vi> #define vs vector<string> #define pb push_back #define P pair<int,int> #define vp vector<P> #define PP pair<P,int> #define vpp vector<PP> #define fi first #define se second #define INF 1e9 #define MOD 1000000007 #define REP(i,n) ...
a.cc: In function 'int main()': a.cc:25:18: error: 's' was not declared in this scope 25 | if(a[i]!=s[i])ans++; | ^
s646040642
p03970
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <math.h> #include <limits.h> #define swap(type,a,b) do{type t=a;a=b;b=t;}while(0); #define ll long long #define INF 100000000 #define MOD 1000000007 #define SIZE 100005 #define FOR(i,a,n) for(i=(a);i<(n);i++) int MAX(int a,int b){ ret...
main.c:18:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 18 | char s[17].t[17]="CODEFESTIVAL2016"; | ^ main.c: In function 'main': main.c:22:20: error: 's' undeclared (first use in this function) 22 | scanf("%s",s); | ^ main.c:22:20: n...
s134781133
p03970
C++
#include <bits/stdc++.h> using namespace std; char b[17] = "CODEFESTIVAL2016"; int main(){ char a[17]; scanf("%s", a); for(int i = 0; i < 16; i++) if(a[i] != b[i]) cnt++; printf("%d\n", cnt); }
a.cc: In function 'int main()': a.cc:8:50: error: 'cnt' was not declared in this scope; did you mean 'int'? 8 | for(int i = 0; i < 16; i++) if(a[i] != b[i]) cnt++; | ^~~ | int a.cc:9:20: error: 'cnt' wa...
s241050762
p03970
C++
#include <bits/stdc++.h> using namespace std; int b[17] = "CODEFESTIVAL2016"; int main(){ char a[17]; scanf("%s", a); for(int i = 0; i < 16; i++) if(a[i] != b[i]) cnt++; printf("%d\n", cnt); }
a.cc:4:13: error: array must be initialized with a brace-enclosed initializer 4 | int b[17] = "CODEFESTIVAL2016"; | ^~~~~~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:8:50: error: 'cnt' was not declared in this scope; did you mean 'int'? 8 | for(int i = 0; i < 16; i++) if(a[i] != b[i]...
s227188211
p03970
C++
S = raw_input() print sum(s!=t for s, t in zip(S, 'CODEFESTIVAL2016'))
a.cc:2:35: warning: multi-character literal with 16 characters exceeds 'int' size of 4 bytes 2 | print sum(s!=t for s, t in zip(S, 'CODEFESTIVAL2016')) | ^~~~~~~~~~~~~~~~~~ a.cc:1:1: error: 'S' does not name a type 1 | S = raw_input() | ^
s847892822
p03970
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s,t="CODEFESTIVAL2016"; cin>>s; int sum=0; for(int i=0;i<16;i++)if(s[I]!=t[I])sum++; cout<<sum<<endl; }
a.cc: In function 'int main()': a.cc:7:27: error: 'I' was not declared in this scope 7 | for(int i=0;i<16;i++)if(s[I]!=t[I])sum++; | ^
s016059992
p03970
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s,t="CODEFESTIVAL2016"; cin>>s; int sum=0; for(int I=0;i<16;i++)if(s[I]!=t[I])sum++; cout<<sum<<endl; }
a.cc: In function 'int main()': a.cc:7:13: error: 'i' was not declared in this scope 7 | for(int I=0;i<16;i++)if(s[I]!=t[I])sum++; | ^
s756170478
p03970
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <cstdlib> #include <cstring> #include <cmath> using namespace std; #define FOR(i,a,b) for (int i = (a); i < (b); i++) #define REP(i,n) FOR(i,0,n) //最大公約数 long gcd(long a, long b){ if (a%b==0){ return b; } else{ return gcd(b,a%b); } } //最小公...
a.cc: In function 'int main()': a.cc:35:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 35 | gets(str); | ^~~~ | getw
s296117326
p03970
C++
342
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 342 | ^~~
s486281618
p03970
C
#include<stdio.h> int main(){ char *seikai="CODEFESTIVAL2016"; char in[256]; int i,j=sizeof(seikai); int diff=0; scanf("%s",in); for(i=0;i<j;i++){ if(seikai[i]!=in[i]){ diff++; } } printf("%d",diff) return 0; }
main.c: In function 'main': main.c:16:26: error: expected ';' before 'return' 16 | printf("%d",diff) | ^ | ; 17 | return 0; | ~~~~~~
s313462973
p03970
Java
import java.util.Scanner; /** * Created by apple on 10/21/16. */ public class Main { public static void main(String[] args) { Scanner s1 = new Scanner(System.in); int N = s1.nextInt(); int A = s2.nextInt(); int B = s3.nextInt(); String S = s4.nextLine(); int count...
Main.java:10: error: cannot find symbol int A = s2.nextInt(); ^ symbol: variable s2 location: class Main Main.java:11: error: cannot find symbol int B = s3.nextInt(); ^ symbol: variable s3 location: class Main Main.java:12: error: cannot find symbol St...
s929690977
p03970
Java
public class Main { public static void main(String[] args) { Scanner s1 = new Scanner(System.in); int N = s1.nextInt(); if(N < 1 || N > 100000) { throw new IllegalArgumentException(); } Scanner s2 = new Scanner(System.in); int A = s2.nextInt(); if...
Main.java:3: error: cannot find symbol Scanner s1 = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner s1 = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:9: erro...
s359808937
p03970
C++
#include <iostream> #include <ctring> using namespace std; int main() { char* x="CODEFESTIVAL2016"; string a; cin>>a; int res = 0; char b[16]; strcpy(b,a.c_str()); for(int i=0;i<16;i++){ if(x[i]!=b[i]){ res+=1; } } cout<<res; return 0; }
a.cc:2:10: fatal error: ctring: No such file or directory 2 | #include <ctring> | ^~~~~~~~ compilation terminated.
s588068095
p03970
C++
#include <iostream> using namespace std; int main() { char* x="CODEFESTIVAL2016"; string a; cin>>a; int res = 0; char b[16]; strcpy(b,a.c_str()); for(int i=0;i<16;i++){ if(x[i]!=b[i]){ res+=1; } } cout<<res; return 0; }
a.cc: In function 'int main()': a.cc:7:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 7 | char* x="CODEFESTIVAL2016"; | ^~~~~~~~~~~~~~~~~~ a.cc:12:5: error: 'strcpy' was not declared in this scope 12 | strcpy(b,a.c_str()); | ^~~~~~ a.cc:...
s527692202
p03970
C++
#include <iostream> #include <string> using namespace std; int main(){ int num, a, b; scanf("%d %d %d", &num, &a, &b); char str[num+1]; scanf("%s", str); for(int i = 0; i < std::strlen(str); i++){ if(str[i] == 'a'){ if(a > 0) a--; else if(...
a.cc: In function 'int main()': a.cc:13:29: error: 'strlen' is not a member of 'std'; did you mean 'mbrlen'? 13 | for(int i = 0; i < std::strlen(str); i++){ | ^~~~~~ | mbrlen
s410283014
p03970
C++
#include <iostream> #include <string> using namespace std; int main(){ int num, a, b; scanf("%d %d %d", &num, &a, &b); char str[num+1]; scanf("%s", str); for(int i = 0; i < strlen(str); i++){ if(str[i] == 'a'){ if(a > 0) a--; else if( b > 0...
a.cc: In function 'int main()': a.cc:13:24: error: 'strlen' was not declared in this scope 13 | for(int i = 0; i < strlen(str); i++){ | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream...
s360996856
p03970
C++
#include <cstdio> string str="CODEFESTIVAL2016"; int main(void){ string s; cin >> s; int cnt=0; for(int i=0;i<16;i++){ if(s[i]!=str[i])cnt++; } printf("%d\n",cnt); return 0; }
a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'? 3 | string str="CODEFESTIVAL2016"; | ^~~~~~ | stdin a.cc: In function 'int main()': a.cc:6:9: error: 'string' was not declared in this scope; did you mean 'stdin'? 6 | string s; | ^~~~~~ | stdin...
s687203411
p03970
C++
#include<stdio.h> #include <string.h> int main(){ char a[17]; char b[17] ="CODEFESTIVAL2016"; int i; int x; scanf("%s",a); for(i=0;i<=15;i++){ if(strcmp(a[i+1],b[i+1])==0){ x++; }else{} } printf("%d",x); }
a.cc: In function 'int main()': a.cc:10:16: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 10 | if(strcmp(a[i+1],b[i+1])==0){ | ~~~~~^ | | | char In file included from a.cc:2: /usr/include/string.h:156:32: note: initializing argument ...
s191706725
p03970
C++
#include<stdio.h> int main(){ char a[17]; char b[17] ="CODEFESTIVAL2016"; int i; int x; scanf("%s",a); for(i=0;i<=15;i++){ if(strcmp(a[i+1],b[i+1])==0){ x++; }else{} } printf("%d",x); }
a.cc: In function 'int main()': a.cc:9:4: error: 'strcmp' was not declared in this scope 9 | if(strcmp(a[i+1],b[i+1])==0){ | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<stdio.h> +++ |+#include <cstring> 2 |...
s942766598
p03970
C++
#include<stdio.h> int main(){ char a[16]; char b[16] ="CODEFESTIVAL2016"; int i; int x; scanf("%s",&a); for(i=0;i<=15;i++){ if(strcmp(a[i+1],b[i+1])==0){ x++; }else{} } printf("%d",x); }
a.cc: In function 'int main()': a.cc:4:13: error: initializer-string for 'char [16]' is too long [-fpermissive] 4 | char b[16] ="CODEFESTIVAL2016"; | ^~~~~~~~~~~~~~~~~~ a.cc:9:4: error: 'strcmp' was not declared in this scope 9 | if(strcmp(a[i+1],b[i+1])==0){ | ^~~~~~ a.cc:2:1: note: ...
s126441940
p03970
C++
#include <iostream> using namespace std; #define pb push_back #define mp make_pair #define ll long long #define ull unsigned ll #define db double #define INF 0x3f3f3f3f #define MOD 1000000007 #define PII pair<int, int> string str; const string right = "CODEFESTIVAL2016"; int main() { cin >> str; int ans =...
a.cc: In function 'int main()': a.cc:21:25: error: reference to 'right' is ambiguous 21 | for (int i = 0; i < right.size(); i++) { | ^~~~~ In file included from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/1...
s502036580
p03970
Java
//セミコロンレスで書いた class Main{ public static void main(String[] args){ for(String[] str : new String[][]{{"CODEFESTIVAL2016", new java.util.Scanner(System.in).next()}}){ for(int[] var : new int[][]{{0, 0}}){ while(var[0] < str[0].length()){ if(str[0].c...
Main.java:17: error: reached end of file while parsing } ^ 1 error
s086011613
p03970
C++
#include<stdio.h> int main() { char x[20]="C0DEFESTIVAL2O16"; char y[20]; scanf("%s",y); int cnt=0; for(int i=0;i<16;i++) if(x[i]!=y[i])cnt++; printf("%d",cnt); return 0; }
a.cc:2:1: error: extended character   is not valid in an identifier 2 | int main() | ^ a.cc:2:1: error: ISO C++ forbids declaration of 'int\U00003000main' with no type [-fpermissive] 2 | int main() | ^~~~~~~~~
s118013920
p03970
Java
import java.util.*; import java.io.*; public class Main1 { public static void main(String [] args)throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); int ans = 0; String var = "CODEFESTIVAL2016"; for(int i = 0;i < str.length();i++){ if(str.charA...
Main.java:3: error: class Main1 is public, should be declared in a file named Main1.java public class Main1 { ^ 1 error
s822217541
p03970
C++
#include<iostream> #include<string> using namespace std; int main(){ string str; cin>>str; long long ans=0; string cf="CODEFESTIVAL2016"; for(int i=0;i<16;++i){ if(str[i]!=cfi]){ ++ans; } } cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:28: error: 'cfi' was not declared in this scope; did you mean 'cf'? 12 | if(str[i]!=cfi]){ | ^~~ | cf a.cc:12:31: error: expected ')' before ']' token 12 | if(str[i]!=cfi]){ ...
s433541869
p03970
C++
#include<iostream> #include<string> using namespace std; int main(){ string str; cin>>str; string ans="CODEFESTIVAL2016"; int count=0; for(int i=0;i<16;++i){ if(str[i]!=ans[i]) count++; } } cout<<count<<endl; return 0; }
a.cc:16:1: error: 'cout' does not name a type 16 | cout<<count<<endl; | ^~~~ a.cc:17:1: error: expected unqualified-id before 'return' 17 | return 0; | ^~~~~~ a.cc:18:1: error: expected declaration before '}' token 18 | } | ^
s661481651
p03970
C++
#include<iostream> #include<string> using namespace std; int main(){ string str; cin>>str:: string ans="CODEFESTIVAL2016"; int count=0; for(int i=0;i<16;++i){ if(str[i]!=ans[i]) count++; } } cout<<count<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:6: error: 'str' is not a class, namespace, or enumeration 8 | cin>>str:: | ^~~ a.cc:12:12: error: 'ans' was not declared in this scope; did you mean 'abs'? 12 | if(str[i]!=ans[i]) | ^~~ | abs a.cc: At global scope: a.cc:16:1: err...
s847611646
p03970
C++
#include<iostream> #include<string> using namespace std; int main() { string tmp; cin>>tmp; string s("CODEFESTIVAL2016"); int n = s.size(); int num = 0; for(int i =0 ;i<n;++i) if(tmp[i]!=s[i])num++ cout<<num<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:30: error: expected ';' before 'cout' 12 | if(tmp[i]!=s[i])num++ | ^ | ; 13 | cout<<num<<endl; | ~~~~
s486565817
p03970
C
#include <stdio.h> #include <stdlib.h> #define STRINGSIZE 16 int main (){ int noCharacters = 0; char string[STRINGSIZE]; char comparedTo[STRINGSIZE] = "CODEFESTIVAL2016"; scanf("%s",string); int i; for (i=0;i<STRINGSIZE;i++) { if (string[i] != comparedTo[i]) { noCharacters+...
main.c:23:12: error: expected declaration specifiers or '...' before string constant 23 | printf("%d",noCharacters); | ^~~~ main.c:23:17: error: unknown type name 'noCharacters' 23 | printf("%d",noCharacters); | ^~~~~~~~~~~~ main.c:24:5: error: expected identifier or...
s992671693
p03970
C++
use std::io; fn read_line() -> String { let mut s = String::new(); io::stdin().read_line(&mut s).unwrap(); s.trim().to_owned() } fn main() { let s = read_line(); let t = "CODEFESTIVAL2016"; let mut ans = 0; for (c, d) in s.chars().zip(t.chars()) { if c != d { ans += 1 ...
a.cc:1:1: error: 'use' does not name a type 1 | use std::io; | ^~~ a.cc:3:1: error: 'fn' does not name a type 3 | fn read_line() -> String { | ^~ a.cc:9:1: error: 'fn' does not name a type 9 | fn main() { | ^~
s186810024
p03970
C++
#include <bits/stdc++.h> using namespace std; int main(){ int i,c=0; char S[17]; char s[17] = {'C','O','D','E','F','E','S','T','I','V','A','L','2','0','1','6','\0'}; scanf("%s",S); for(i=0;i<16;i++;){ if(S[i] != s[i]){c++;} } cout << c << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:21: error: expected ')' before ';' token 9 | for(i=0;i<16;i++;){ | ~ ^ | ) a.cc:9:22: error: expected primary-expression before ')' token 9 | for(i=0;i<16;i++;){ | ^
s514124066
p03970
C++
#include <iostream> using namespace std; int main() { long W,H; int cost=0; int lastcost=-1; long long *P=new long long[W]; long long *Q=new long long[H]; cin >> W>>H; int **data = new int*[W+1]; for(int i=0;i<W+1;i++){ data[i] = new int [H+1]; } for(int i=0;i<W;i++){ cin >> P[i]; }...
a.cc: In function 'int main()': a.cc:102:17: error: 'cc' was not declared in this scope 102 | if(ii==0&&cc==0)lastcost=cost; | ^~ a.cc:106:17: error: 'cc' was not declared in this scope 106 | cout<<ii<<cc<<":"<<cost<<endl;/////////////////////////////// | ^~ a...
s429690302
p03970
C++
#include <bits/stdc++.h> using namespace std; int main(){ int i,c=0; char S[17]; char s[17] = {'C','O','D','E','F','E','S','T','I','V','A','L','2','0','1','6','\0'}; scanf("%s",S); for(i=0;i<16;i++;){ if(S[i] == s[i]){c++;} } cout << c << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:21: error: expected ')' before ';' token 9 | for(i=0;i<16;i++;){ | ~ ^ | ) a.cc:9:22: error: expected primary-expression before ')' token 9 | for(i=0;i<16;i++;){ | ^
s584215401
p03970
C++
#include <bits/stuck++.h> using namespace std; int main(){ int i,c=0; char S[17]; char s[17] = {'C','O','D','E','F','E','S','T','I','V','A','L','2','0','1','6','\0'}; scanf("%s",S); for(i=0;i<16;i++;){ if(S[i] == s[i]){c++;} } cout << c << endl; return 0; }
a.cc:1:10: fatal error: bits/stuck++.h: No such file or directory 1 | #include <bits/stuck++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s000911772
p03970
C++
int main() { const string word = "CODEFESTIVAL2016"; string str; cin >> str; int count = 0; for(int i = 0; i < word.size(); ++i) { if(word[i] != str[i]) count++; } cout << count; return 0; }
a.cc: In function 'int main()': a.cc:3:15: error: 'string' does not name a type 3 | const string word = "CODEFESTIVAL2016"; | ^~~~~~ a.cc:5:9: error: 'string' was not declared in this scope 5 | string str; | ^~~~~~ a.cc:7:9: error: 'cin' was not declared in this...
s044800220
p03970
C++
#include <iostream> #include <string> using namespace std; #define INF 1e9 int prime(int cur, bool* visit, int** graph, int m) { int index; int sum = 0; visit[cur] = true; int* dist = new int[m]; for(int i = 0; i < m; i ++){ dist[i] = graph[cur][i]; } for(int i = 1; i < m; i ++){ int mincost = INF; f...
a.cc: In function 'int main()': a.cc:52:9: error: 'memset' was not declared in this scope 52 | memset(visit, false, sizeof(visit)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#in...
s525992182
p03970
C++
#include<iostream> using namespace std; int main(){ char s[16]; char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6}; int i,count=0; cin>>s; for(i=0;i<=15;i++){ if(s[i]!=c[i]){ count++; } } cout<<count<<"\n"; }
a.cc: In function 'int main()': a.cc:8:21: error: 'C' was not declared in this scope 8 | char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6}; | ^ a.cc:8:23: error: 'O' was not declared in this scope 8 | char c[16]={C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6}; | ...
s049661856
p03970
C++
#include <iostream> #include <string> using namespace std; int main() { string d = "CODEFESTIVAL2016"; string s; cin >> s; int ans = 0; for (int i = 0; i < s.size(); i++) if (s[i] != d[i]) ans++; cout << ans << endl; return 0; } CODEFESTIVAL2016
a.cc:16:1: error: 'CODEFESTIVAL2016' does not name a type 16 | CODEFESTIVAL2016 | ^~~~~~~~~~~~~~~~
s242959130
p03970
C++
#include <iostream> #include <string> using namespace std; int main() { string d = "CODEFESTIVAL2016"; cin >> s; int ans = 0; for (int i = 0; i < s.size(); i++) if (s[i] != d[i]) ans++; cout << ans << endl; return 0; } CODEFESTIVAL2016
a.cc: In function 'int main()': a.cc:7:10: error: 's' was not declared in this scope 7 | cin >> s; | ^ a.cc: At global scope: a.cc:15:1: error: 'CODEFESTIVAL2016' does not name a type 15 | CODEFESTIVAL2016 | ^~~~~~~~~~~~~~~~
s164860110
p03970
C++
#include <iostrem> #include <string> using namespace std; int main() { string d = "CODEFESTIVAL2016"; cin >> s; int ans = 0; for (int i = 0; i < s.size(); i++) if (s[i] != d[i]) ans++; cout << ans << endl; return 0; } CODEFESTIVAL2016
a.cc:1:10: fatal error: iostrem: No such file or directory 1 | #include <iostrem> | ^~~~~~~~~ compilation terminated.
s920401849
p03970
C++
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { string input_string, ref = 'CODEFESTIVAL2016; int len = 16; // Read a full line of input from stdin (cin) and save it to our variable, input_string. getline(cin, in...
a.cc:10:32: warning: missing terminating ' character 10 | string input_string, ref = 'CODEFESTIVAL2016; | ^ a.cc:10:32: error: missing terminating ' character 10 | string input_string, ref = 'CODEFESTIVAL2016; | ^~~~~~~~~~~~~~~~~~ ...
s464949009
p03970
C++
#include <cstdio> #include <algorithm> #include <iostream> #include <vector> #define MAX_N 100010 using namespace std; int par[100010]; int rank[100010]; void init(int n){ int i; for(i=0;i<n;i++){ par[i]=i; rank[i]=0; } } int find(int x){ if(par[x]==x){ return x; } else { return par[x]=fi...
a.cc: In function 'void init(int)': a.cc:16:5: error: reference to 'rank' is ambiguous 16 | rank[i]=0; | ^~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/algorithm:60, ...
s006580921
p03970
C++
#include <iostream> using namespace std; int main() { const string word = "CODEFESTIVAL2016" string str; cin >> str; int count = 0; for(int i = 0; i < word.size(); ++i) { if(word[i] != str[i]) count++; } cout << count; return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: expected ',' or ';' before 'string' 9 | string str; | ^~~~~~ a.cc:11:16: error: 'str' was not declared in this scope; did you mean 'std'? 11 | cin >> str; | ^~~ | std
s092602273
p03970
C++
#include<bits.stdc++.h> using namespace std; int main() { string s; cin>>s; string str ="CODEFESTIVAL2016"; int res = 0; for(int i =0 ;i<str.length();i++) { if(s[i]!=str[i]) { res++; } } cout<<res<<endl; return 0; }
a.cc:1:9: fatal error: bits.stdc++.h: No such file or directory 1 | #include<bits.stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s674269176
p03970
C++
#include <bits/stdc++.h> typedef long long LL; #define SORT(c) sort((c).begin(),(c).end()) #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) using namespace std; int main(void) { string s,t="CODEFESTIVAL2016"; cin >> s; answer=0; REP(i,16) if(s[i]!=t[i]) ++answer; cout << answer << ...
a.cc: In function 'int main()': a.cc:13:3: error: 'answer' was not declared in this scope 13 | answer=0; | ^~~~~~
s343622169
p03970
Java
import java.util.Scanner; public class signboard { private static final String str = "CODEFESTIVAL2016"; private static int count = 0; public static void main(String[] args){ Scanner reader = new Scanner(System.in); String str1 = reader.next(); for (int i=0;i<16;i++){ if (str1.charAt(i)!=str.cha...
Main.java:4: error: class signboard is public, should be declared in a file named signboard.java public class signboard { ^ 1 error
s863233746
p03970
C++
S = input() res = 0 target = "CODEFESTIVAL2016" for index in range(len(S)): if S[index] != target[index]: res += 1 print(res)
a.cc:1:1: error: 'S' does not name a type 1 | S = input() | ^
s001103369
p03970
Java
public class Main { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Scanner in = new Scanner(System.in); String s = "CODEFESTIVAL2016"; String tmp = in.nextLine(); int ans =0; for(int i=0;i<s.length();i++) if(tm...
Main.java:8: error: cannot find symbol Scanner in = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:8: error: cannot find symbol Scanner in = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s116957231
p03970
C
# include<stdio.h> main() { char a[16]="CODEFESTIVAL2016"; char b[16]; int i,j=0; gets(b); for(i=0;a[i]!='\0';i++) {while(a[i]!=b[i]&&a[i]!='\0') j++} printf("%d",j); } end
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main() | ^~~~ main.c: In function 'main': main.c:8:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 8 | gets(b); | ^~~~ | fgets main.c:10:39: error: expected ';...
s509381541
p03970
C
# include<stdio.h> main() { char a[16]="CODEFESTIVAL2016"; char b[16]; int i,j=0; gets(b); for(i=0;a[i]!='\0';i++) {while(a[i]!=b[i]&&a[i]!='\0') j++} printf("%d",j); }
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main() | ^~~~ main.c: In function 'main': main.c:8:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 8 | gets(b); | ^~~~ | fgets main.c:10:39: error: expected ';...
s636605078
p03970
C++
# include<stdio.h> main() { char a[16]="CODEFESTIVAL2016"; char b[16]; int i,j=0; gets(b); for(i=0;a[i]!='\0';i++) {while(a[i]!=b[i]&&a[i]!='\0') j++} printf("%d",j); } end
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main() | ^~~~ a.cc: In function 'int main()': a.cc:5:14: error: initializer-string for 'char [16]' is too long [-fpermissive] 5 | char a[16]="CODEFESTIVAL2016"; | ^~~~~~~~~~~~~~~~~~ a.cc:8:3: err...
s110497480
p03970
C++
# include<stdio.h> main() { char a[16]="CODEFESTIVAL2016"; char b[16]; int i,j=0; gets(b); for(i=0;a[i]!='\0';i++) {while(a[i]!=b[i]&&a[i]!='\0') j++} printf("%d",j); }
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main() | ^~~~ a.cc: In function 'int main()': a.cc:5:14: error: initializer-string for 'char [16]' is too long [-fpermissive] 5 | char a[16]="CODEFESTIVAL2016"; | ^~~~~~~~~~~~~~~~~~ a.cc:8:3: err...
s599411785
p03970
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int count = 0; String s = sc.next(); String sa[]; sa = new String[s.length()]; String c = "CODEFESTIVAL2016"; String ca[]; ca = new String[c.length()]...
Main.java:13: error: cannot find symbol if(i == c.length - 1){ ^ symbol: variable length location: variable c of type String 1 error
s167509595
p03970
C++
#include <studio.h> #include <stdlib.h> #define SIZE 12 int main(){ char s[SIZE] = {0}; scanf("%s",s); char * a = "CODEFESTIVAL2016"; int x = 0; int t =0; while(x < SIZE){ if(s[x] != a[x]) t++; x++; } printf("%d",t); return 0; }
a.cc:1:10: fatal error: studio.h: No such file or directory 1 | #include <studio.h> | ^~~~~~~~~~ compilation terminated.
s382386165
p03970
Java
public class Main{ public static void main(String[] args){ Scanner s = new Scanner(System.in); String str = s.next(); String[] a = new String[16]; int result = 0; a[0] = "C"; a[1] = "O"; a[2] = "D"; a[3] = "E"; a[4] = "F"; a[5] = "...
Main.java:4: error: cannot find symbol Scanner s = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner s = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s350217669
p03970
C++
#include<stdio.h> #include<string.h> int main(){ char s[20]; char s2="CODEFESTIVAL2016"; int ans=0; scanf("%s",s); for (int i=0;i<16;i++) if (s[i]!=s2[i]) ans++; printf("%d",ans); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 5 | char s2="CODEFESTIVAL2016"; | ^~~~~~~~~~~~~~~~~~ | | | const char* a.cc:9:16: error: invalid types 'char[int]' for array subscript 9 | if (s[i]!=s2[i])...
s008905017
p03970
C++
#include <cstdio> #include <iostream> #include <cmath> #include <algorithm> using namespace std; int main(){ string str1 = "CODEFESTIVAL2016"; string str2; cin >> str2; int ans = 0; for(int i = 0; i < str1.size(); i++){ if(str[1] != str[2]){ ans++; } } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:19:20: error: 'str' was not declared in this scope; did you mean 'str2'? 19 | if(str[1] != str[2]){ | ^~~ | str2
s405338994
p03970
Java
public class Main { public static void Main(String[] args){ Scanner s = new Scanner(System.in); String str = s.next(); String[] a = new String[16]; int result = 0; a[0] = "C"; a[1] = "O"; a[2] = "D"; a[3] = "E"; a[4] = "F"; a[5] = ...
Main.java:4: error: cannot find symbol Scanner s = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner s = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s436705913
p03970
C
#include<stdio.h> int main(void){ int cnt = 0; char b[16] ; char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6}; scanf(%s,b); for(i = 0; i>16; i++){ if(b[i] != c[i]){ b[i] = c[i]; cnt = cnt + 1; } } return 0; }
main.c: In function 'main': main.c:6:19: error: 'C' undeclared (first use in this function) 6 | char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6}; | ^ main.c:6:19: note: each undeclared identifier is reported only once for each function it appears in main.c:6:21: error: 'O' undeclared (firs...
s382824344
p03970
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int count = 0; String s = sc.next(); String sa[]; sa = new String[s.length()]; String c = "CODEFESTIVAL2016"; String ca[]; ca = new String[c.length()]...
Main.java:12: error: cannot find symbol for(i=0; i<c.length(); i++){ ^ symbol: variable i location: class Main Main.java:12: error: cannot find symbol for(i=0; i<c.length(); i++){ ^ symbol: variable i location: class Main Main.java:12: error: cannot find symbol ...
s361151773
p03970
C
#include<stdio.h> int void(main){ int cnt = 0; char b[16] ; char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6}; scanf(%s,b); for(i = 0; i>16; i++){ if(b[i] != c[i]){ b[i] = c[i]; cnt = cnt + 1; } } return 0; }
main.c:3:5: error: two or more data types in declaration specifiers 3 | int void(main){ | ^~~~ main.c:3:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token 3 | int void(main){ | ^
s624948955
p03970
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String g = "CODEGESTIVAL2016"; String rString = scanner.next(); int j = 0; for (int i = 0; i < rString.length(); i++) { if (g.charAt(i) != rString.charAt(i)) { j++; } ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s256828291
p03970
C++
#include<stdio.h> int void(main){ int cnt = 0; char b[16] ; char c[16] = {C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6}; scanf(%s,b); for(i = 0; i>16; i++){ if(b[i] != c[i]){ b[i] = c[i]; cnt = cnt + 1; } } return 0; }
a.cc:3:1: error: two or more data types in declaration of 'main' 3 | int void(main){ | ^~~ a.cc:4:5: error: expected primary-expression before 'int' 4 | int cnt = 0; | ^~~ a.cc:4:5: error: expected '}' before 'int' a.cc:3:15: note: to match this '{' 3 | int void(main){ | ...
s535755360
p03970
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int count = 0; String s = sc.next(); String sa[]; sa = new String[s.length()]; String c = "CODEFESTIVAL2016"; String ca[]; ca = new String[c.length()]...
Main.java:12: error: not a statement for(i=0; i++; i<c.length()){ ^ 1 error
s318134519
p03970
C
#include <stdio.h> int main(void) { int i,ans = 0; char S[17],dash[17] = "CODEFESTIVAL2016"; fgets(S,sizeof(S),stdin); for (i = 0,i < 16,i++) { if (S[i] != dash[i]) ans++; } printf("%d\n",ans); return 0; }
main.c: In function 'main': main.c:8:24: error: expected ';' before ')' token 8 | for (i = 0,i < 16,i++) { | ^ | ; main.c:8:24: error: expected expression before ')' token
s891561350
p03970
Java
import java.util.Scanner; public class Signboard { public static void main(String[] args) { // TODO Auto-generated method stub String compare = "CODEFESTIVAL2016"; @SuppressWarnings("resource") Scanner sc = new Scanner(System.in); while(sc.hasNext()) { String compared = sc.nextLine(); System.out.pri...
Main.java:2: error: class Signboard is public, should be declared in a file named Signboard.java public class Signboard { ^ 1 error
s183190541
p03970
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int count = 0; String s = sc.next(); String sa[]; sa = new String[s.length()]; String c = "CODEFESTIVAL2016"; String ca[]; ca = new String[c.length()]...
Main.java:12: error: not a statement for(i=0; i++; i<c.length(){ ^ Main.java:12: error: ')' expected for(i=0; i++; i<c.length(){ ^ 2 errors
s843668922
p03970
C++
/*input FESTIVAL2016CODE */ #include <bits/stdc++.h> using namespace std; int main() { char s[32]; char r[] = "CODEFESTIVAL2016"; gets(s); int ans = 0; int n = strlen(s); for (int i = 0; i < n; ++i) { ans += r[i] != s[i]; } printf("%d\n", ans); return 0; }
a.cc: In function 'int main()': a.cc:10:3: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets(s); | ^~~~ | getw
s532090525
p03970
C++
#include <iostream> #include <string> #include <string.h> using namespace std; char CODE[17] = "CODEFESTIVAL2016"; int main(){ int cnt = 0; char S[17]; for(int i = 0 ; i < 17 ; i++){ scanf_s("%c",&S[i]); } for(int i = 0 ; i < 17 ; i++){ if(!(CODE[i] == S[i])){ cnt++; } } printf("%d\n",cnt - 1); }
a.cc: In function 'int main()': a.cc:14:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 14 | scanf_s("%c",&S[i]); | ^~~~~~~ | scanf
s998330330
p03970
C++
#include <cstdio> #include <iostream> #include <algorithm> #include <cstring> #include <vector> int main(){ char s[20]; char t[20]; int count = 0; cin >> s; strcpy(t, "CODEFESTIVAL2016"); for(int i = 0; i < 16; i++){ if(s[i] != t[i]){ count++; } } count << count << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 11 | cin >> s; | ^~~ | std::cin In file included from a.cc:2: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to st...
s655214882
p03970
C++
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string s = Console.ReadLine(); string ss = "CODEFESTIVAL2016"; int ans = 0; for...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Collections.Generic; | ^~~~~~ a.cc:3:7: error: expected nested-name-specifier before 'System' 3 | using System.L...
s297721928
p03970
C
#inlcude<stdio.h> int main(){ char ,w[20],s[]={"C0DEFESTIVAL2O16"}; int i,j=0; scanf("%s",w); for(i=0;s[i];i++){ if(s[i]-w[i])j++; } printf("%d\n",j); return 0; }
main.c:1:2: error: invalid preprocessing directive #inlcude; did you mean #include? 1 | #inlcude<stdio.h> | ^~~~~~~ | include main.c: In function 'main': main.c:3:14: error: expected identifier or '(' before ',' token 3 | char ,w[20],s[]={"C0DEFESTIVAL2O16"}; | ^ main.c:...