submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s492520157
p03967
C++
#if !defined(__clang__) && defined(__GNUC__) #include <bits/stdc++.h> #else #include <cstdlib> #include <climits> #include <iostream> #include <cstdint> #include <vector> #include <string> #include <complex> #include <bitset> #include <queue> #include <deque> #include <stack> #include <utility> #include <set> #include ...
a.cc:22:10: fatal error: boost/lexical_cast.hpp: No such file or directory 22 | #include <boost/lexical_cast.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated.
s530391555
p03967
C++
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; int p = 0; for (int i = 0; i < s.length;i++) { char c = s.at(i); if (c == 'p') { p++; } } cout << (s.length - p)/2; return 0; }
a.cc: In function 'int main()': a.cc:12:31: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long uns...
s976605889
p03967
C++
#include <bits/std++.h> using namespace std; int main(int argc, char const *argv[]) { string s; int p = 0; cin >> s; for (int i = 0; i < s.length(); i++) { if (s[i] == 'g') { } else { p++; } cout<<s.length()/2-p; } return 0...
a.cc:1:10: fatal error: bits/std++.h: No such file or directory 1 | #include <bits/std++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s795219775
p03967
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; int main(){ string s; cin >> s; int n = s.size(); int maxp = n/2; int P = 0; for(int i = 0; i < n; i++){ if(s[i] == 'p'){p++;} } cout << maxp - p << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:25: error: 'p' was not declared in this scope 13 | if(s[i] == 'p'){p++;} | ^ a.cc:15:20: error: 'p' was not declared in this scope 15 | cout << maxp - p << endl; | ^
s042085982
p03967
C++
#include <stdio.h> #include <string.h> #define FOR(i, a, b) for(i = a; i < b; ++i) #define REP(i, n) FOR(i, 0, n) #define N 100000 int result(char atc, char topc){ if(atc == 'p' && topc == 'g'){ return 1; }else if(atc == 'g' && topc == 'p'){ return -1; }else{ return 0; } } int...
a.cc:22:77: error: use of parameter outside function body before '+' token 22 | int rock_paper(unsigned int n, unsigned int p, unsigned int len, int dp[len + 1][len + 1], char S[N]){ | ^ a.cc:22:86: error: use of parameter outside func...
s379051605
p03967
C++
ggppgggpgg
a.cc:1:1: error: 'ggppgggpgg' does not name a type 1 | ggppgggpgg | ^~~~~~~~~~
s747660394
p03967
C++
#include<cstdio> #include<vector> #include<iostream> #include<cstdio> using namespace std; const int big=(1<<30); int gcd(int a,int b){if(a<b){swap(a,b);}if(b==0){return a;}return gcd(a%b,b);} int main(void){ string ans,nyu; cin>>nyu; for(i=0;i<nyu.size()+1/2;i++){ printf("g"); } for(i=0;i<nyu.size()/2;i++){ p...
a.cc: In function 'int main()': a.cc:11:13: error: 'i' was not declared in this scope 11 | for(i=0;i<nyu.size()+1/2;i++){ | ^ a.cc:14:13: error: 'i' was not declared in this scope 14 | for(i=0;i<nyu.size()/2;i++){ | ^
s913753172
p03967
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <vector> #include <string> #include <queue> #include <deque> #include <list> #include <stack> #include <set> #include <map> #include <algorithm> #define int long long #define MOD7 1000000007 #define...
a.cc: In function 'int main()': a.cc:49:42: error: expected ';' before ':' token 49 | cout << (cnt[1] - cnt[0]) / 2 << endl: | ^ | ;
s211405157
p03967
C++
#include<bits/stdc++.h> using namespace std; int main(){ int g_cnt=0; string str; cin>>str; for(int i=0; i<str.length(); i++){ if(str[i]=='g')cnt++; } cout<<g_cnt-ceil((str.length())/2.0)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:24: error: 'cnt' was not declared in this scope; did you mean 'int'? 10 | if(str[i]=='g')cnt++; | ^~~ | int
s121284845
p03967
C++
#include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <map> #include <set> #define X first #define Y second #define clr(u,v); memset(u,v,sizeof(u)); using namespace std; typedef long long ll; typedef pair<int,int> pii;...
a.cc: In function 'int main()': a.cc:24:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 24 | gets(str); | ^~~~ | getw
s537008151
p03967
C++
#include <iostream> #include <string> using namespace std; int main() { int g = 0, p = 0, ans = 0, pos = 0; string s; cin >> s; reverse(s.begin(), s.end()); for (int i=0; i<s.length(); i++) { if (s[i] == 'g') g++; else p++; } while (p < g - 1) { if (s[pos++] == 'g') { g--; p++; ans++; } } cout <<...
a.cc: In function 'int main()': a.cc:8:19: error: 'reverse' was not declared in this scope 8 | cin >> s; reverse(s.begin(), s.end()); | ^~~~~~~
s433270294
p03967
C++
#include <iostream> #include <string> using namespace std; int main(int argc, char* argv[]) { string sT; cin>>sT; int n=sT.length(); char *sA = new char[n+1]; memset(sA,'g',n); sA[n]='\0'; int pMax = n/2; int pN=0; int i=0; for (i=0;i<n;i++){ if (sT[i]=='g'){ if (pN<pMax){ sA[i]='p'; pN++; }el...
a.cc: In function 'int main(int, char**)': a.cc:10:9: error: 'memset' was not declared in this scope 10 | memset(sA,'g',n); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <c...
s615081226
p03967
Java
public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] c = sc.next().toCharArray(); int n = c.length; int score = 0; int p = 0; for(int i=0; i<n; i++){ if(p>0){ if(c[i] == 'g'){ score++; p--; }else{ p--; } }else{ if...
Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:4: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s734488120
p03967
C++
#include <vector> #include <map> #include <array> #include <iterator> #include <cstdio> #include <functional> template<typename T> struct ScanfSpecifier{}; #define DEF(T,V) template<> struct ScanfSpecifier<T>{static constexpr const char* value = V;}; DEF(char*,"%s")DEF(int,"%d")DEF(double,"%lf")DEF(float,"%f")DEF(char,...
a.cc: In function 'int main()': a.cc:107:13: error: 'strlen' was not declared in this scope 107 | int N = strlen(s); | ^~~~~~ a.cc:97:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 96 | #include <algorithm> +++ |+#include <cstring...
s095778202
p03968
C++
#include<bits/stdc++/h> using namespace std; const int N=1000; unordered_map<ll,int>mp; struct node{ int c[4]; node nxt(){ return node{c[1],c[2],c[3],c[0]};} }a[N]; void add(node x,int d){ for (int j=1;j<=4;++j,x=x.nxt()) mp[x]+=d; } int main(){ scanf("%d",&n); for (int i=1;i<=n;++i){ scanf("%d%d%d%d",&a[i].c...
a.cc:1:9: fatal error: bits/stdc++/h: No such file or directory 1 | #include<bits/stdc++/h> | ^~~~~~~~~~~~~~~ compilation terminated.
s029758564
p03968
C++
解けてるはず
a.cc:1:1: error: '\U000089e3\U00003051\U00003066\U0000308b\U0000306f\U0000305a' does not name a type 1 | 解けてるはず | ^~~~~~~~~~~~
s257353455
p03968
C++
#include<bits/stdc++.h> using namespace std; using Int = long long; template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;} #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; template<typename T,typen...
a.cc: In function '__int128 check(A)': a.cc:85:11: error: 'gmap<long long int, int>' {aka 'class __gnu_pbds::cc_hash_table<long long int, int, std::hash<long long int>, std::equal_to<long long int>, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::hash_standard_resize_policy<__gnu_pbds::hash_exponential_size_policy...
s073802335
p03968
C++
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 400; map<LL,LL> occ; LL arr[N + 5][4]; LL f[N + 5]; LL tmp[4]; void shifting(LL x, int add) { //rotate for(int i = 0;i < 4;i++) { occ[x] += add; x = ((x >> 10) | ((x & 1023) << 30)); } } LL hash(LL a, LL b, LL c, LL d) { //hash...
a.cc: In function 'int main()': a.cc:32:24: error: reference to 'hash' is ambiguous 32 | f[i] = hash(arr[i][0], arr[i][1], arr[i][2], arr[i][3]); | ^~~~ In file included from /usr/include/c++/14/string_view:50, from /usr/include/c++/14/bits/basic_string.h...
s051050113
p03968
C++
// includes {{{ #include<iostream> #include<iomanip> #include<algorithm> #include<vector> #include<stack> #include<queue> #include<map> #include<set> #include<tuple> #include<cmath> #include<random> #include<cassert> // #include<deque> // #include<multiset> // #include<bitset> // #include<cstring> // #include<bits/stdc...
a.cc:26:20: error: 'a' has incomplete type 26 | Panel rotate(Panel a) { | ~~~~~~^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/in...
s916877229
p03968
C++
#include<bits\stdc++.h> using namespace std; #define ll long long #define lf double #define N 4 #define err {puts("-1");exit(0);}; int color[408][4]; ll has(int a[]) { ll res=0; for(int i=N-1;i>=0;i--) res=res*1000+a[i]; return res; } vector<ll> _rotate(int c[]) { vector<ll> res; // for(int i=0;i<N;i++) cout<<c[i]<...
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s057089937
p03968
C++
#include<bits\stdc++.h> using namespace std; #define ll long long #define lf double #define N 4 #define err {puts("-1");exit(0);}; int color[408][4]; ll has(int a[]) { ll res=0; for(int i=N-1;i>=0;i--) res=res*1000+a[i]; return res; } vector<ll> _rotate(int c[]) { vector<ll> res; // for(int i=0;i<N;i++) cout<<c[i]<...
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s321406159
p03968
C++
#include <iostream> #include <algorithm> #include<cmath> #include<cstring> #include<cstdio> #include<cstdlib> #include<vector> #include<set> #include<iomanip> #include<map> #define sqr(x)(x)*(x) #define fz1(i,n) for (i=1;i<=n;i++) #define fd1(i,n) for (i=n;i>=1;i--) #define fz0g(i,n) for (i=0;i<=n;i++) #define fd0g(i,n...
a.cc: In function 'int main()': a.cc:73:10: error: expected '}' at end of input 73 | } | ^ a.cc:51:1: note: to match this '{' 51 | { | ^
s339690093
p03968
C++
#include <iostream> #include <cstdio> #include <cstring> #include <map> #include <algorithm> using namespace std; typedef long long ll; int n,a[405][4],tot[405]; ll h[405][4],hh[405]; map<ll,ll> f[5]; int id[4][4]={{1,0,1,0},{3,2,3,2},{2,1,0,3},{0,3,2,1}}; int main(){ scanf("%d",&n); for(int i=1;i<=n;i++) for(int p...
a.cc: In function 'int main()': a.cc:43:43: error: narrowing conversion of '1.0e+15' from 'double' to 'll' {aka 'long long int'} [-Wnarrowing] 43 | ll mn[4]={1e15,1e15,1e15,1e15}; | ^~~~ a.cc:43:48: error: narrowing conversion of '1.0e+1...
s874559951
p03968
C++
#include <bits/stdc++.h> #define N 500 #define int long long using namespace std; typedef long long ll; inline int read() { int x=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1; ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0'; ch=getchar();} return x*f; } int c[N][4],n,C[N][6],fac[5]; ll A[N],...
a.cc: In function 'll trans(long long int, long long int, long long int, long long int)': a.cc:31:24: error: reference to 'hash' is ambiguous 31 | return min(min(hash(x,y,z,s),hash(y,z,s,x)),min(hash(z,s,x,y),hash(s,x,y,z))); | ^~~~ In file included from /usr/include/c++/14/strin...
s984962051
p03968
C++
#include<bits/stdc++.h> using namespace std; vector<vector<int> >t; multiset<vector<int> >v; int n,c; long long ans,cnt,tt; vector<int> rot(vector<int> vv){return {vv[1],vv[2],vv[3],vv[0]};} int main() { vector<int>t1,t2; vector<vector<int> >::iterator it1,it2; scanf("%d",&n); for(int i=0;i<n;i++) { int a,b,c,d;...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val...
s468902205
p03968
C++
#include <bits/stdc++.h> //#include <boost/functional/hash.hpp> //example: unordered_set< pair<int,int>,boost::hash< std::pair<int, int> > > used; //priority_queue< pair<int,pair<int,int> >, vector<pair<int,pair<int,int>>>, greater<pair<int,pair<int,int> > > > pqueue; //cost, vertex(行き先) using namespace std; #defin...
cc1plus: error: '::main' must return 'int'
s565519313
p03968
Java
// -*- coding: utf-8 -*- //import java.awt.*; import java.io.*; import java.math.*; import java.text.*; import java.util.*;   public class Main { public static void main(String[] args) { InputStream inputStream; if (args.length > 0 && args[0].equals("devTesting")) { try { inputStream = new FileI...
Main.java:7: error: illegal character: '\u00a0' ? ^ Main.java:157: error: illegal character: '\u00a0' ? ^ Main.java:162: error: illegal character: '\u00a0' ? ^ Main.java:181: error: illegal character: '\u00a0' ? ^ Main.java:185: error: illegal character: '\u00a0' ? ^ Main.java:193: error: illegal character: '\u00a0' ? ...
s830394653
p03968
Java
// -*- coding: utf-8 -*- //import java.awt.*; import java.io.*; import java.math.*; import java.text.*; import java.util.*;   public class Main { public static void main(String[] args) { InputStream inputStream; if (args.length > 0 && args[0].equals("devTesting")) { try { inputStream = new FileI...
Main.java:7: error: illegal character: '\u00a0' ? ^ Main.java:157: error: illegal character: '\u00a0' ? ^ Main.java:162: error: illegal character: '\u00a0' ? ^ Main.java:181: error: illegal character: '\u00a0' ? ^ Main.java:185: error: illegal character: '\u00a0' ? ^ Main.java:193: error: illegal character: '\u00a0' ? ...
s368641468
p03968
Java
package main; import util.FastScanner; import java.io.PrintWriter; import java.util.Arrays; public class ProblemC { public void solve(int testNumber, FastScanner in, PrintWriter out) { int n = in.nextInt(); int[][] col = new int[n][4]; long[][] hash = new long[n][4]; for (int i = 0; i < n; i++) { for (in...
Main.java:8: error: class ProblemC is public, should be declared in a file named ProblemC.java public class ProblemC { ^ Main.java:3: error: package util does not exist import util.FastScanner; ^ Main.java:9: error: cannot find symbol public void solve(int testNumber, FastScanner in, PrintWriter out)...
s600398401
p03968
C++
#include <cstdio> #include <set> #include <vector> using namespace std; int nextInt() { int x; scanf("%d", &x); return x; } const int N = 400; int col[N][8]; long long hashes[N][4]; long long dp[16]; int ways[4]; long long calcHash(int a, int b, int c, int d) { long long h = 0; h = 1000 * h + a; h = 1000 * h +...
a.cc: In function 'int main()': a.cc:38:25: error: 'any' was not declared in this scope 38 | any.insert(hashes[i][rot]); | ^~~ a.cc:4:1: note: 'std::any' is defined in header '<any>'; this is probably fixable by adding '#include <any>' 3 | #include <vector> ...
s029057247
p03968
C++
#include<bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 #define f first #define s second #define si(x) scanf("%d",&x) #define sl(x) scanf("%I64d",&x) #define CLR(x) memset(x,0,sizeof(x)) #define RESET(x,a) memset(x,a,sizeof(x)) #define pi pair<int,int> #define pb push_back #define ...
a.cc: In function 'long long int way(int, int, int)': a.cc:15:43: error: invalid types 'long long int[int]' for array subscript 15 | #define F(j,k) if ( !((j>>k)&1) && b[i]==c[k][0] ) dp[j|(1<<k)]+=rc[k]*dp[j] | ^ a.cc:81:9: note: in expansion of macro 'F' 81 | ...
s244190660
p03968
C++
#include <bits/stdc++.h> #define DEBUG 1 using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef unsigned int uint; typedef unsigned short ushort; typedef pair<int, int> PII; #define MAX_INT (int)0x7fffffff #define MIN_INT (int)0x80000000 #define MAX_UINT (uint)0xffffffff #define TTi tem...
a.cc: In function 'LL countSmallest(Colors)': a.cc:288:20: error: 'multi' was not declared in this scope; did you mean 'multo'? 288 | ans += multi * countfit(a, b, brot); | ^~~~~ | multo
s701103571
p03968
C++
#include <bits/stdc++.h> #define DEBUG 1 using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef unsigned int uint; typedef unsigned short ushort; typedef pair<int, int> PII; #define MAX_INT (int)0x7fffffff #define MIN_INT (int)0x80000000 #define MAX_UINT (uint)0xffffffff #define TTi tem...
a.cc: In function 'LL countSmallest(Colors)': a.cc:289:20: error: 'multi' was not declared in this scope; did you mean 'multo'? 289 | ans += multi * countfit(a, b, brot); | ^~~~~ | multo
s024547141
p03968
C++
#include <cstdio> #include <set> #include <vector> using namespace std; int nextInt() { int x; scanf("%d", &x); return x; } const int N = 400; int col[N][8]; long long hashes[N][4]; set<long long> any; long long dp[16]; int ways[4]; long long calcHash(int a, int b, int c, int d) { long long h = 0; h = 1000 * h ...
a.cc: In function 'int main()': a.cc:62:55: error: 's' was not declared in this scope 62 | if (any.count(s) == 0) { | ^
s817057063
p03968
C++
#include <cstdio> #include <set> using namespace std; int nextInt() { int x; scanf("%d", &x); return x; } const int N = 400; int col[N][8]; long long hash[N][4]; set<long long> any; long long dp[16]; int ways[4]; long long calcHash(int a, int b, int c, int d) { long long h = 0; h = 1000 * h + a; h = 1000 * h +...
a.cc: In function 'int main()': a.cc:58:33: error: 'vector' was not declared in this scope 58 | vector<long long> hs = {h1, h2, h3, h4}; | ^~~~~~ a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#i...
s714920334
p03968
C++
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define fi first #define se second #define mp make_pair #define pb push_back #define fbo find_by_order #define ook order_of_key typedef long long ll; typedef pair<ll...
a.cc: In function 'int main()': a.cc:108:80: error: conversion from 'std::unordered_map<long long int, int>::iterator' {aka 'std::__detail::_Insert_base<long long int, std::pair<const long long int, int>, std::allocator<std::pair<const long long int, int> >, std::__detail::_Select1st, std::equal_to<long long int>, std:...
s632449749
p03968
C++
#include <vector> #include <iostream> #include <algorithm> #include <string> using namespace std; inline int GetBit(int mask, int num) { return (mask >> num) & 1; } int cFront[4]; int cBack[4]; inline bool CanLeft(int c0, int c1, int c2, int c3) { return c0 == cBack[3] && c1 == cBack[2] && c2 == cFront[1] &&...
a.cc: In function 'int main()': a.cc:85:17: error: 'memset' was not declared in this scope 85 | memset(result[curPtr], 0, sizeof(long long) * (1 << 4)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' ...
s449589369
p03969
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define int long long const int N = 105, MOD = 1e9 + 7; int n, m, k, fac[N << 1], ifac[N << 1]; int fpow(int a, int m) { int ans = 1; for(; m; m >>= 1) { if(m & 1) ans = ans * 1ll * a % MOD; a = a * 1ll * a % MOD; } return ans; } struct Edge ...
cc1plus: error: '::main' must return 'int'
s263184475
p03969
C++
#include <iostream> #include <algorithm> #include <cmath> #include <stdio.h> #include <stdlib.h> #include <vector> #include <map> #include <queue> #include <set> #include <string> #include <string.h> #include <stack> #define Endl endl #define mp make_pair #define ll long long #define pii pair<int,int> #define pll pair...
a.cc:28:5: error: 'int time' redeclared as different kind of entity 28 | int time=0; | ^~~~ In file included from /usr/include/pthread.h:23, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35, from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157, ...
s821503605
p03969
C++
11 12 48 3 1 8 2 4 9 5 4 1 6 2 9 8 3 10 8 4 10 8 6 11 7 1 8
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 11 12 48 | ^~
s062746950
p03969
C++
//by xxj //I love 7 sea k fall #include<bits/stdc++.h> using namespace std; #define fst first #define snd second #define mp make_pair #define ll long long #define pii pair<int,int> #define lowbit(x) x&-x const int inf=1e9+7; const double eps=1e-10; const ll linf=1e18+7; const ll hh=523; const int mod=1e9+7; inline int ...
a.cc: In function 'long long int calc(int, int)': a.cc:61:42: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'const int' to binary 'operator%' 61 | re=(re+pow(c,__gcd(i,e)))%mod; | ~~~~~~~~~~~~~~~~~~~~~~^~~~ | ...
s617083797
p03969
C++
#include <>bits/stdc++.h> using namespace std; typedef long long LL; const int MX=1e3+7; const int Md=1e9+7; int n,m,K; LL fac[MX],inv[MX]; LL ans=1; void init() { int n=1e3; fac[0]=fac[1]=inv[0]=inv[1]=1; for(int i=2; i<=n; i++) { fac[i]=fac[i-1]*i%Md; inv[i]=(Md-Md/i)*inv[Md%i]%Md; } for(int i=2; ...
a.cc:1:16: warning: extra tokens at end of #include directive 1 | #include <>bits/stdc++.h> | ^ a.cc:1:10: fatal error: >bit: No such file or directory 1 | #include <>bits/stdc++.h> | ^~~~~~ compilation terminated.
s737684582
p03969
C++
11 12 48 3 1 8 2 4 9 5 4 1 6 2 9 8 3 10 8 4 10 8 6 11 7 1 8
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 11 12 48 | ^~
s052752129
p03969
C++
11 12 48 3 1 8 2 4 9 5 4 1 6 2 9 8 3 10 8 4 10 8 6 11 7 1 8
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 11 12 48 | ^~
s580452041
p03969
C++
#include<cstdio> #include<cstring> #include<algorithm> #include<vector> #include<stack> using namespace std; typedef long long ll; const ll N=205; const ll mod=1e9+7; vector<int>edge[N]; ll dfn[N],low[N],tot; struct node{ int u,v,nxt; }edge[N]; int head[N],mcnt; void add_edge(int u,int v){ mcnt++; edge[mcnt...
a.cc:14:2: error: conflicting declaration 'node edge [205]' 14 | }edge[N]; | ^~~~ a.cc:10:12: note: previous declaration as 'std::vector<int> edge [205]' 10 | vector<int>edge[N]; | ^~~~ a.cc: In function 'void add_edge(int, int)': a.cc:18:16: error: 'class std::vector<int>' has no member n...
s065496229
p03969
C++
lude<bits/stdc++.h> using namespace std; using ll = long long; ll mod = 1e9 + 7; ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } ll extgcd(ll a, ll b, ll &x, ll &y) { ll d; return b == 0 ? (x = 1, y = 0, a) : (d = extgcd(b, a % b, y, x), y -= a / b * x, d); }...
a.cc:1:1: error: 'lude' does not name a type 1 | lude<bits/stdc++.h> | ^~~~ a.cc:16:23: error: 'ostream' does not name a type 16 | template <typename T> ostream &operator<<(ostream &o, const vector<T> &v) { if(&o == &cerr) { o << '{'; for(size_t i = 0; i < v.size(); i++) o << v[i] << (i + 1 != v.size() ? "...
s462727892
p03969
C++
#include <iostream> #include <cstdio> #include <cstring> #define NDEBUG #include <cassert> #include <cctype> using namespace std; typedef long long lint; #define cout cerr #define ni (next_num<int>()) template<class T>inline T next_num(){ T i=0;char c; while(!isdigit(c=getchar())&&c!='-'); bool flag=c=='-'; flag?c=...
a.cc: In function 'void G::dfs(int, int)': a.cc:69:44: error: 'stk' was not declared in this scope; did you mean 'estk'? 69 | if(stk[ss-1]==i){ | ^~~ | estk
s880524497
p03969
C++
#include<cstring> #include<algorithm> using namespace std; typedef long long ll; #define Re return #define In inline #define St static #define inc(l, i, r) for(i=l; i<r; ++i) #define dec(l, i, r) for(i=r; i>l; --i) const int mxn=1<<8; const ll p=1000000007; int n, m, k, h[mxn]; ll ans=1, c[mxn][mxn]; struct edge{in...
a.cc: In function 'int main()': a.cc:90:5: error: 'scanf' was not declared in this scope 90 | scanf("%d%d%d", &n, &m, &k); | ^~~~~ a.cc:105:5: error: 'printf' was not declared in this scope 105 | printf("%lld\n", (ans+p)%p); | ^~~~~~ a.cc:4:1: note: 'printf' is defined in header '<cstdi...
s129955981
p03969
C++
int getfa(int x){ return x==fa[x]?x:fa[x]=getfa(fa[x]); } void mrg(int x,int y){ x=getfa(x); y=getfa(y); if (x==y) return; sz[y]+=sz[x]; sum[y]+=sum[x]; fa[x]=y; } void dfs(int x,int p){ int i,y; vis[x]=1; for (i=fst[x]; i; i=nxt[i]) if (i^p^1){ y=pnt[i]; if (!vis[y]){ dad[y]=x; d[y]=d[x]+1; eg[y]=i>>1;...
a.cc: In function 'int getfa(int)': a.cc:2:29: error: 'fa' was not declared in this scope 2 | int getfa(int x){ return x==fa[x]?x:fa[x]=getfa(fa[x]); } | ^~ a.cc: In function 'void mrg(int, int)': a.cc:6:9: error: 'sz' was not declared in this scope 6 | sz[y]+=sz[x]; su...
s389852246
p03969
C++
#include<bits/stdc++.h> #include<vector> #define N 105 #define M 205 #define PAIR pair<int,int> #define LL long long using namespace std; const int mo=1e9+7; int head[N],len,next[N],num[N],ce,cd; int n,m,k,f[N],C[M][M],pw[N],ans,dfn[N],low[N],clk,cut[N],st[N],top,vis[N],xyk; int gcd(int x,int y){ return x ? gcd(y%x,x) ...
a.cc: In function 'void tarjan(int, int)': a.cc:43:27: error: reference to 'next' is ambiguous 43 | for(i=head[t];i;i=next[i]){ | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:66, from /usr/include/c++/14/algorithm:60, fro...
s804056929
p03969
C++
#include<iostream> #include<vector> #include<algorithm> #include<cstring> #include<cstdio> #include<cmath> #include<cstdlib> #include<ctime> #include<queue> #include<set> using namespace std; const int N=1000; const int mod=1e9+7; int gi() { int w=0;bool q=1;char c=getchar(); while ((c<'0'||c>'9') && c!='-') c=getcha...
a.cc: In function 'void dfs(int, int)': a.cc:34:28: error: reference to 'next' is ambiguous 34 | for (i=head[k];i;i=next[i]) if (to[i]!=fa) { | ^~~~ In file included from /usr/include/c++/14/string:47, from /usr/include/c++/14/bits/locale_classes.h:40, ...
s550042467
p03969
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:124:50: error: 'pk' was not declared in this scope; did you mean 'k'? 124 | for(j=1;j<=NE[i];j++) t+=pk[__gcd(j,NE[i])]; | ^~ | k
s204593929
p03970
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string co; cin >> co; string CO = "CODEFESTIVAL2016"; int ans = 16; rep(i, 16) { if(Co.at(i) == co.at(i)) { ans--; } } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:10:8: error: 'Co' was not declared in this scope; did you mean 'CO'? 10 | if(Co.at(i) == co.at(i)) { | ^~ | CO
s615797414
p03970
C++
#include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for (int i = (a); i < (int)(b); ++i) #define endl "\n" typedef long long ll; const double pi=3.14159265358979323846; int ctoi(const char c) { if ('0' <= c && c <= '9') return (c - '0'); return -1; } vector<int> input(int n) { vector<int> vec(n...
a.cc: In function 'int main()': a.cc:151:5: error: expected ',' or ';' before 'int' 151 | int cnt=0; | ^~~ a.cc:154:7: error: 'cnt' was not declared in this scope; did you mean 'int'? 154 | cnt++; | ^~~ | int a.cc:157:11: error: 'cnt' was not declared in this scope; did y...
s547410651
p03970
C++
#include<iostream> using namespace std; int main(){ string s; cin >> s; string x = "CODEFESTIVAL2016" int cnt = 0; for(int i = 0; i < 16; ++i) cnt += s[i] == x[i]; cout << cnt << endl; }
a.cc: In function 'int main()': a.cc:6:3: error: expected ',' or ';' before 'int' 6 | int cnt = 0; | ^~~ a.cc:8:5: error: 'cnt' was not declared in this scope; did you mean 'int'? 8 | cnt += s[i] == x[i]; | ^~~ | int a.cc:9:11: error: 'cnt' was not declared in this scope; did y...
s146140822
p03970
C++
#inclucde < bits/stdc++.h> using namespace std; int main() { string s, t="CODEFESTIVAL2016"; cin >> s; int ans=0; for ( int i=0; i<t.size(); i++ ) { if ( s[i]!=t[i] ) ans++; } cout << ans; return 0; }
a.cc:1:2: error: invalid preprocessing directive #inclucde; did you mean #include? 1 | #inclucde < bits/stdc++.h> | ^~~~~~~~ | include a.cc: In function 'int main()': a.cc:5:3: error: 'string' was not declared in this scope 5 | string s, t="CODEFESTIVAL2016"; | ^~~~~~ a.cc:1:1: note: 'st...
s775514246
p03970
C++
#include <bits/stdc++.h> using namespace std; int main(){string s;cin>>s;string S="CODEFESTIVAL2016";int c=0;for(int i=0,i<16;i++){if(s[i]!=S[i])c++;}cout<<c;}
a.cc: In function 'int main()': a.cc:3:77: error: expected ';' before '<' token 3 | int main(){string s;cin>>s;string S="CODEFESTIVAL2016";int c=0;for(int i=0,i<16;i++){if(s[i]!=S[i])c++;}cout<<c;} | ^ | ...
s732605139
p03970
C++
#include <bits/stdc++.h> using namespace std;int main(){string s;cin>>s;string S="CODEFESTIVAL2016";int c=0;for(int i=0,i<16;i++){if(s[i]!=S[i])c++;}cout<<c;}
a.cc: In function 'int main()': a.cc:2:97: error: expected ';' before '<' token 2 | using namespace std;int main(){string s;cin>>s;string S="CODEFESTIVAL2016";int c=0;for(int i=0,i<16;i++){if(s[i]!=S[i])c++;}cout<<c;} | ...
s216880479
p03970
C++
INT MAIN()bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; string t="CODEFESTIVAL2016"; int cnt=0; for(int i=0;i<16;i++){ if(s[i]!=t[i])cnt++; } cout << cnt << endl; }
a.cc:1:1: error: 'INT' does not name a type 1 | INT MAIN()bits/stdc++.h> | ^~~ a.cc: In function 'int main()': a.cc:5:2: error: 'string' was not declared in this scope 5 | string s; cin >> s; | ^~~~~~ a.cc:5:12: error: 'cin' was not declared in this scope 5 | string s; cin >> s; | ...
s466634146
p03970
C++
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <ut...
a.cc: In function 'int main()': a.cc:48:5: error: 'strin' was not declared in this scope; did you mean 'stdin'? 48 | strin in; | ^~~~~ | stdin a.cc:49:12: error: 'in' was not declared in this scope; did you mean 'yn'? 49 | cin >> in; | ^~ | yn
s225328393
p03970
C++
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <cstdio> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <ut...
a.cc: In function 'int main()': a.cc:51:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 51 | if (in[0] == "C") a.cc:55:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 55 | if (in[1] == "O") a.cc:59:15: error: ISO C++ forbids comparison betw...
s474452402
p03970
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){ string s; cin>>s; int ans=0; rep(i,16) if(s[i]!="C0DEFESTIVAL2O16") ans++; printf("%d\n",ans); return 0; }
a.cc: In function 'int main()': a.cc:10:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | rep(i,16) if(s[i]!="C0DEFESTIVAL2O16") ans++;
s938820841
p03970
C++
#include<stdio.h> using namespace std; int main() { int n,A,B; cin >> n >> A >> B; char a[n]; cin>>a; int c1=0,c2=0; for(int i=0;i<n;i++) { if(a[i]=='c') { cout<<"No"<<endl; continue; } if(a[i]=='a') { if(c1< A+B) { c1++; cout<<"Yes"<<endl; ...
a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin >> n >> A >> B; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<stdio.h> +++ |+#include <iostream> 2 | using nam...
s560568849
p03970
C++
#include<bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using pint = pair<int, int>; using pll = pair<ll, ll>; using edge = pair<int, ll>; using Graph = vector<vector<int>>; using WeightedGraph = vector<vector<edge>>; const ll INF = 1LL << 60; const int INF32 = 1 << 29; const ll MOD...
a.cc: In function 'int main()': a.cc:16:11: error: expected primary-expression before '=' token 16 | string t; = "CODEFESTIVAL2016"; | ^
s002157928
p03970
C++
#include <bits/stdc++.h> using namespace std; int main() { string correct="CODEFESTIVAL2016" string s; cin >> s; int ans=0; for(int i=0;i<16;i++){ if(correct[i] != s[i])ans++; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:6:1: error: expected ',' or ';' before 'string' 6 | string s; | ^~~~~~ a.cc:7:8: error: 's' was not declared in this scope 7 | cin >> s; | ^
s126508209
p03970
Java
import java.io.*; import java.util.*; import java.math.BigDecimal; public class Main { void submit() { String missString = nextString; char[] missChar= missString.toCharArray(); String seikaiString = "CODEFESTIVAL2016"; char[] seikaiChar = seikaiString.toCharArray(); int kaisu...
Main.java:8: error: cannot find symbol String missString = nextString; ^ symbol: variable nextString location: class Main 1 error
s070295188
p03970
C++
#include <stdio.h> #include <iostream> #include <vector> #include <algorithm> #include <functional> #include <cstdlib> #include <list> #include <numeric> #define rep(i,n) for(int i=0;i<n;i++) #define all(x) (x).begin(),(x).end() using namespace std; int a, b, c, n; string s; int main() { cin>>s;int cnt=0; t="...
a.cc: In function 'int main()': a.cc:21:3: error: 't' was not declared in this scope; did you mean 'tm'? 21 | t="CODEFESTIVAL2016"; | ^ | tm
s760022496
p03970
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++) #define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++) #define MOD 1000000007 #define int long long #define ALL(a) (a).begin(),(a).end() #define vi vector<int> #define vii vector<vi> #define pii pair<int,int> #define priq...
a.cc: In function 'int main()': a.cc:22:3: error: 'strint' was not declared in this scope; did you mean 'strcat'? 22 | strint T="CODEFESTIVAL2016"; | ^~~~~~ | strcat a.cc:25:14: error: 'T' was not declared in this scope 25 | if(S[i]!=T[i]) ans++; | ^
s308748805
p03970
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++) #define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++) #define MOD 1000000007 #define int long long #define ALL(a) (a).begin(),(a).end() #define vi vector<int> #define vii vector<vi> #define pii pair<int,int> #define priq...
a.cc: In function 'int main()': a.cc:23:11: error: 'N' was not declared in this scope 23 | rep(i,0,N){ | ^ a.cc:3:47: note: in definition of macro 'rep' 3 | #define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++) | ^
s541533800
p03970
C++
#include <iostream> #include<algorithm> #include<string> #include <cmath> #include <vector> #include <map> #include <cstdio> #pragma region Macros #define int long long #define MOD 1000000007 #define rep(i,n) for(int i=0;i<n;i++) #define REP(i,n) for(int i=1;i<=n;i++) #define LAST(x) x[x.size()-1] #define ALL(x) (x).be...
a.cc: In function 'int main()': a.cc:52:2: error: expected '}' at end of input 52 | } | ^ a.cc:43:15: note: to match this '{' 43 | signed main() { | ^
s325992787
p03970
C++
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; string c=CODEFESTIVAL2016; int count=0; for(int i=0;i<s.size();i++){ if(s.at(i)!=c.at(i)) count++; } cout << count; }
a.cc: In function 'int main()': a.cc:7:14: error: 'CODEFESTIVAL2016' was not declared in this scope 7 | string c=CODEFESTIVAL2016; | ^~~~~~~~~~~~~~~~
s106126225
p03970
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0;i<n;i++) using namespace std; int main(){ string ss; ss = "CODEFESTIVAL2016" string s; cin >> s; int ans = 0; rep(i,s.size()) if(s[i]!=ss[i]) ans++; cout << ans << endl; }
a.cc: In function 'int main()': a.cc:6:28: error: expected ';' before 'string' 6 | ss = "CODEFESTIVAL2016" | ^ | ; 7 | string s; | ~~~~~~ a.cc:8:12: error: 's' was not declared in this scope; did you mean 'ss'?...
s908774498
p03970
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s903868090
p03970
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<(n) ;i++) #define pb push_back #define all(v) (v).begin(),(v).end() #define fi first #define se second #define sz(x) ((int)(x).size()) using ll=long long; typedef pair<int,int> pii; typedef pair<ll,ll> pll; #define MOD 1000000007 const ll INF...
a.cc: In function 'int main(int, const char**)': a.cc:25:9: error: 'n' was not declared in this scope 25 | rep(i,n){ | ^ a.cc:3:34: note: in definition of macro 'rep' 3 | #define rep(i,n) for(int i=0; i<(n) ;i++) | ^
s965147548
p03970
C++
#include <iostream> #include <numeric> #include <math.h> #include <algorithm> #include <float.h> #include <limits> #include <vector> #include <string.h> #include <iomanip> #define rep(i,a,n) for(ll int (i) = (a);(i) < (n);(i)++) #define urep(i,a,n) for(ll int (i) = (a);(i) > (n);(i)--) #define MOD 1000000007 #define ...
a.cc: In function 'int main()': a.cc:56:20: error: 'coutn' was not declared in this scope; did you mean 'count'? 56 | if(A[i]!=B[i]) coutn++; | ^~~~~ | count
s102025997
p03970
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,s,e) for(int i=s;i<=e;++i) #define REP(i,s,e) for(int i=s;i>=e;--i) string s; int main(){ int sum=0; cin>>s; if(s[0]=='C') sum++; if(s[1]=='O') sum++; if(s[2]=='D') sum++; if(s[3]=='E') sum++; if(s[4]=='F') sum++; if(s[5]=='E') sum++; if(s[6]=='S') s...
a.cc: In function 'int main()': a.cc:27:28: error: 'l' was not declared in this scope 27 | cout<<16-sum<<endl;l; | ^
s815628508
p03970
C++
#include "bits/stdc++.h" using namespace std; #define INF 1e9 #define rep(i, n) for(int i = 0; i < n; i++) #define ALL(x) (x).begin(), (x).end() //昇順 #define RALL(x) (x).rbegin(), (x).rend() // 降順 const long long mod = 1e9+7; typedef priority_queue<int> PQ; typedef vector<long long> VL; typedef vector<bool> VB; typede...
a.cc: In function 'int main()': a.cc:65:27: error: expected ';' before 'for' 65 | t = "CODEFESTIVAL2016" | ^ | ; a.cc:66:9: error: 'i' was not declared in this scope 66 | rep(i,s.size()){ | ^ a.cc:4:34: note: in definition of ma...
s014073665
p03970
C++
#include<bits/stdc++.h> #define ll long long using namespace std; string s="CODEFESTIVAL2016a; long long ans; int main() { getline(cin,a); for(register long long 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 'long' 5 | long long ans; ...
s345278631
p03970
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s,t="CODEFESTIVAL2016; cin>>s; int ans=0; for(int i=0;i<s.length();i++) if(s[i]!=t[i]) ans++; cout<<ans; }
a.cc:4:14: warning: missing terminating " character 4 | string s,t="CODEFESTIVAL2016; | ^ a.cc:4:14: error: missing terminating " character 4 | string s,t="CODEFESTIVAL2016; | ^~~~~~~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:5:6: error: conversion from 'std::basi...
s082146396
p03970
C++
#include <bits/stdc++.h> using namespace std; int main(){ //int w,h,tmp; string s,t; cin >> s; int ans = 0; t = "CODEFESTIVAL2016"; for(int i=0; i<s.size(); i++) if(s.at(i)==t.at(i)) ans++; ` cout << ans << endl; }
a.cc:12:1: error: stray '`' in program 12 | ` | ^
s470665773
p03970
C++
#include<iostream> using namespace std; char a[16],b[16 ={'C', 'O', 'D', 'E', 'F', 'E', 'S', 'T', 'I', 'V', 'A', 'L', '2', '0', '1', '6'}; int ans; int main() { cin>>a; for(int i = 0; i < 16; i ++) { if(a[i]!=b[i])ans++; } cout <<ans<<endl; return 0; }
a.cc:3:14: error: lvalue required as left operand of assignment 3 | char a[16],b[16 ={'C', 'O', 'D', 'E', 'F', 'E', 'S', 'T', 'I', 'V', 'A', 'L', '2', '0', '1', '6'}; | ^~ a.cc:3:98: error: expected ']' before ';' token 3 | char a[16],b[16 ={'C', 'O', 'D', 'E', 'F', 'E', 'S', 'T', 'I', 'V', '...
s915817652
p03970
C++
#include <iostream> #include <algorithm> #include <string> using namespace std; typedef long long ll; int main(void){ int i; string s,t="CODEFESTIVAL2016"; cin >> s; for (i=0;i<16;i++) if (s[i]!=t[i]) ans++; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:38: error: 'ans' was not declared in this scope; did you mean 'abs'? 10 | for (i=0;i<16;i++) if (s[i]!=t[i]) ans++; | ^~~ | abs a.cc:11:11: error: 'ans' was not declared in this scope; did ...
s226092992
p03970
C++
#include<iostream> using namespace std; int main(void){ int a=0,b,c; string s; string t = "CODEFESTIVAL2016" cin >> s; for(int i = 0;i < s.size();i++){ if(s.at(i) != t.at(i)){ a++; } } cout << a; }
a.cc: In function 'int main()': a.cc:7:2: error: expected ',' or ';' before 'cin' 7 | cin >> s; | ^~~
s603111763
p03970
C++
#include <bits/stdc++.h> using namespace std; int main() { string S; cin>>S; string Z=="CODEFESTIVAL2016"; int A=0; for(int i=0; i<16; i++){ if(S.at(i)==Z.at(i)) continue; else A++; } cout<<A<<endl; }
a.cc: In function 'int main()': a.cc:6:11: error: expected initializer before '==' token 6 | string Z=="CODEFESTIVAL2016"; | ^~ a.cc:9:17: error: 'Z' was not declared in this scope 9 | if(S.at(i)==Z.at(i)) continue; | ^
s063853820
p03970
C++
#include<Bits/stdc++.h> using namespace std; int ans; string s,cmp="CODEFESTIVAL2016"; int main(){ cin>>s; int l=s.size(); for(int i=0;i<l;i++) if(s[i]!=cmp[i])ans++; printf("%d\n",ans); return 0; }
a.cc:1:9: fatal error: Bits/stdc++.h: No such file or directory 1 | #include<Bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s228764997
p03970
C++
import java.util.Scanner; class Main{ public static void main (String[] args){ Scanner scanner =new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); int d = scanner.nextInt(); if(a+b>c+d) System.out.println("Left"); else if(...
a.cc:1:5: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:5: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:11: error: expected ':' before 'static' 3 | public static void main (String[] args){ | ^~~~~~~ | : a.cc...
s204359886
p03970
C++
#include<bits/stdc++.h> using namespace std; string s="CODEFESTIVAL2016"; string cxk; long long a; int main(){ cin>>cxk; if(cxk[0] != 'C') a++; if(cxk[1] != 'O') a++; if(cxk[2] != 'D') a++; if(cxk[3] != 'E') a++; if(cxk[4] != 'F') a++; if(cxk[5] != 'E') a++; if(cxk[6] != 'S') a++; if...
a.cc: In function 'int main()': a.cc:23:24: error: 'ans' was not declared in this scope; did you mean 'abs'? 23 | if(cxk[15] != '6') ans++; | ^~~ | abs
s855665912
p03970
C++
#include <bits/stdc++.h> using namespace std; int main(){ string S, T; cin >> S; T = "CODEFESTIVAL2016"; for(int i=0;i<16;i++){ if(S[i] != T[i]) ans++; } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:9:22: error: 'ans' was not declared in this scope; did you mean 'abs'? 9 | if(S[i] != T[i]) ans++; | ^~~ | abs a.cc:11:11: error: 'ans' was not declared in this scope; did you mean 'abs'? 11 | cout << ans << endl; ...
s703573906
p03970
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<char> data(16); for (int i = 0; i < 16; i++) { cin >> data.at(i); } string str = "CODEFESTIVAL2016" int answer = 0 ; for (int i = 0; i < 16; i++) { if (data.at(i) != str.at(i) ) { answer++; } } cout << answer ...
a.cc: In function 'int main()': a.cc:12:3: error: expected ',' or ';' before 'int' 12 | int answer = 0 ; | ^~~ a.cc:17:7: error: 'answer' was not declared in this scope 17 | answer++; | ^~~~~~ a.cc:22:11: error: 'answer' was not declared in this scope 22 | cout << answer << endl; ...
s955293225
p03970
C++
#include<iostream> #include<string> #include<vector> #include<algorithm> #include<bits/stdc++.h> #include<cmath> #include<bitset> #define ll long long #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define FFOR(i,a,b) for(int i=(a);i<=(b);++i) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) FFOR(i,0,n) #define SORT(V) sor...
a.cc: In function 'int main()': a.cc:23:26: error: 'ans' was not declared in this scope; did you mean 'abs'? 23 | if(S.at(i)!=A.at(i)) ans++; | ^~~ | abs a.cc:25:9: error: 'ans' was not declared in this scope; did you mean 'abs'? 25 | cout<<ans<<...
s688054456
p03970
C++
#import<iostream> char c[]="CODEFESTIVAL2016";int i,a;main(){for(;i<16;i++)a+=getchar()!=c[i];std::cout<<a<<endl;}printf("%d\n",a);
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream> | ^~~~~~ a.cc:2:37: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | char c[]="CODEFESTIVAL2016";int i,a;main(){for(;i<16;i++)a+=getchar()!=c[i];std::cout<<a<<endl;}printf("%d\n",a...
s987806809
p03970
C++
char c[]="CODEFESTIVAL2016";int i,a;main(){for(;i<16;i++)a+=getchar()!=c[i];std::cout<<a<<endl;}printf("%d\n",a);
a.cc:1:37: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | char c[]="CODEFESTIVAL2016";int i,a;main(){for(;i<16;i++)a+=getchar()!=c[i];std::cout<<a<<endl;}printf("%d\n",a); | ^~~~ a.cc: In function 'int main()': a.cc:1:61: error: 'getchar' wa...
s518881001
p03970
C++
#import<iostream> char c[]="CODEFESTIVAL2016";int i,ans; main(){for(;i<17;i++)if(getchar()!=c[i])ans++;cout<<ans;}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream> | ^~~~~~ a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){for(;i<17;i++)if(getchar()!=c[i])ans++;cout<<ans;} | ^~~~ a.cc: In function 'int main()': a.cc:3:47...
s912407888
p03970
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<n;i++) int main(){ string a,b; int ans=0; cin>>a; b="CODEFESTIVAL2016" rep(i,16) if(a[i]!=b[i]) ans++; cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:6:31: error: expected ';' before 'for' 6 | cin>>a; b="CODEFESTIVAL2016" | ^ | ; a.cc:7:9: error: 'i' was not declared in this scope 7 | rep(i,16) if(a[i]!=b[i]) ans++; | ^ a.cc:3:30: ...
s163079029
p03970
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s1,s2="CODEFESTIVAL2016" cin >> s1; int x=0; for(int i=0;i<16;i++){ if(s1[i]!=s2[i])x++; } cout<<x<<endl; }
a.cc: In function 'int main()': a.cc:5:3: error: expected ',' or ';' before 'cin' 5 | cin >> s1; | ^~~
s640695074
p03970
C++
#include<bits/stdc++.h> using namespace std; int main() { int a=0; string s,s1="CODEFESTIVAL2016"; cin>>s; for(int i=0;i<16;i++){ if(s[i]!=s1[i]){ ans++; } } cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:9:25: error: 'ans' was not declared in this scope; did you mean 'abs'? 9 | ans++; | ^~~ | abs a.cc:12:15: error: 'ans' was not declared in this scope; did you mean 'abs'? 12 | cout<<an...
s196676616
p03970
C++
#include<bits/stdc++.h> using namespace std; int main(){ string s;cin>>s; vector<char> a{C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6}; int n=0; for(int i=0;i<16;i++){ if(s.at(i)!=a.at(i))n++; } cout<<n<<endl; }
a.cc: In function 'int main()': a.cc:5:18: error: 'C' was not declared in this scope 5 | vector<char> a{C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6}; | ^ a.cc:5:20: error: 'O' was not declared in this scope 5 | vector<char> a{C,O,D,E,F,E,S,T,I,V,A,L,2,0,1,6}; | ^ a.cc:5:2...
s850299457
p03970
C++
object Main{ def main(args: Array[String]): Unit={ val str = readLine() val code = "CODEFESTIVAL2016" var cnt = 0 for(i<-0 to 15; if str(i) != code(i)) yield cnt+=1 println(cnt) } }
a.cc:1:1: error: 'object' does not name a type 1 | object Main{ | ^~~~~~
s834508404
p03970
C++
#include<bits/stdc++.h> using namespace std; string a,b="CODEFESTIVAL2016"; int main() { double ans; c=16; getline(cin,a); for(int i=0;i<=15;i++) { if(a[i]==b[i]) ans--; } cout<<ans<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'c' was not declared in this scope 7 | c=16; | ^
s985287068
p03970
C++
include<bits/stdc++.h>//万能文件头 using namespace std; string s="CODEFESTIVAL2016";//好像也没什么用 string a; long long ans; int main(){ cin>>a;//输入字符串 if(a[0] != 'C') ans++;//开始无脑判断 if(a[1] != 'O') ans++;//要是有一个不一样 if(a[2] != 'D') ans++;//就马上加上去 if(a[3] != 'E') ans++; if(a[4] != 'F') ans++; if(a[5] !=...
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h>//万能文件头 | ^~~~~~~ a.cc:3:1: error: 'string' does not name a type 3 | string s="CODEFESTIVAL2016";//好像也没什么用 | ^~~~~~ a.cc:4:1: error: 'string' does not name a type 4 | string a; | ^~~~~~ a.cc: In function 'int main()'...