submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s906781970
p01055
C++
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef int short; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 100; const ll LINF = 1e18; /* <url:> 問題文============================================================ ============================================================...
a.cc:4:13: error: declaration does not declare anything [-fpermissive] 4 | typedef int short; | ^~~~~
s696249310
p01057
C++
#include <bits/stdc++.h> #define MOD 1000000007LL using namespace std; typedef long long ll; typedef pair<int,int> P; unsigned int y=11451419; int rand_int(int l=0,int r=11451419){ y=y^(y<<13); y=y^(y>>17); y=y^(y<<5); return y%(r-l+1)+l; } template<class T> struct treap{ struct node_t{ T val; // 値 node_t *...
a.cc: In function 'int main()': a.cc:113:46: error: 'as' was not declared in this scope; did you mean 'sa'? 113 | if(sa.first==NULL || as.second==NULL)while(1); | ^~ | sa a.cc:115:46: error: '...
s476885137
p01057
C++
#include <bits/stdc++.h> #define MOD 1000000007LL using namespace std; typedef long long ll; typedef pair<int,int> P; unsigned int y=11451419; int rand_int(int l=0,int r=11451419){ y=y^(y<<13); y=y^(y>>17); y=y^(y<<5); return y%(r-l+1)+l; } template<class T> struct treap{ struct node_t{ T val; // 値 node_t *...
a.cc: In function 'int main()': a.cc:113:46: error: 'as' was not declared in this scope; did you mean 'sa'? 113 | if(sa.first==NULL || as.second==NULL)while(1); | ^~ | sa a.cc:115:46: error: '...
s519066555
p01057
C++
#include <bits/stdc++.h> #define MOD 1000000007LL using namespace std; typedef long long ll; typedef pair<int,int> P; unsigned int y=11451419; int rand_int(int l=0,int r=11451419){ y=y^(y<<13); y=y^(y>>17); y=y^(y<<5); return y%(r-l+1)+l; } template<class T> struct treap{ struct node_t{ T val; // 値 node_t *...
a.cc: In function 'int main()': a.cc:122:46: error: invalid use of non-static member function 'int treap<T>::count(node_t*) [with T = char]' 122 | if(tr[a].count(tr[a].count)<b)while(1); | ~~~~~~^~~~~ a.cc:30:13: note: declared here 30 | ...
s172570424
p01057
C++
#include <bits/stdc++.h> #define MOD 1000000007LL using namespace std; typedef long long ll; typedef pair<int,int> P; unsigned int y=11451419; int rand_int(int l=0,int r=11451419){ y=y^(y<<13); y=y^(y>>17); y=y^(y<<5); return y%(r-l+1)+l; } template<class T> struct treap{ struct node_t{ T val; // 値 node_t *...
a.cc: In function 'int main()': a.cc:122:46: error: invalid use of non-static member function 'int treap<T>::count(node_t*) [with T = char]' 122 | if(tr[a].count(tr[a].count)<b)while(1); | ~~~~~~^~~~~ a.cc:30:13: note: declared here 30 | ...
s712449427
p01059
C++
/* N???2?????? t???+-2pi/n a????????§in space???FFT????????? */ typedef double D; typedef complex<D> P; D pi=acos(-1); void FFT(vector<P>& a,int N,double t){ for(int m=N;m>=2;m/=2){ int mh=m/2; rep(i,mh){ P w=polar(1.0,t*i); for(int j=i;j<N;j+=m){ int k=j+mh; P x=a[j]-a[k]; a[j]+=a[k]; a[k]=w...
a.cc:7:9: error: 'complex' does not name a type 7 | typedef complex<D> P; | ^~~~~~~ a.cc:8:6: error: 'acos' was not declared in this scope 8 | D pi=acos(-1); | ^~~~ a.cc:9:6: error: variable or field 'FFT' declared void 9 | void FFT(vector<P>& a,int N,double t){ | ^~~ a.c...
s939499819
p01059
C++
/* suffix array sa[i]= i??????????°???????suffix???????????????index (sa[0]=N) _k,_N?????°????????????????????£?????????(compare???2?????°???????????????) RMQ??¨????????° s?????§????????????t?????????????????´??? ???????????????????????????(jag2014summerday4F) lcp[i]= len of common prefix of s[sa[i]..],s[sa[i+1]...
a.cc:11:17: error: expected primary-expression before ';' token 11 | const int MAX_N=; | ^ a.cc:12:22: error: size of array '_rank' is not an integral constant-expression 12 | int _k,_N,_rank[MAX_N+1],tmp[MAX_N+1],sa[MAX_N+1],lcp[MAX_N]; | ~~~~~^~ a.cc:12:35: error: siz...
s065628356
p01059
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) { int n,m; cin >> n >> m; vector<int> se; se.resize(m); REP(i,m) cin >> se[i]; int answer=0; answer=max(...
a.cc: In function 'int main()': a.cc:18:24: error: no matching function for call to 'max(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)' 18 | REP(i,m-1) answer=max(se[i+1]-se[i]-1)/2; | ~~~^~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, ...
s537875482
p01059
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)n;i++) #define all(c) (c).begin(),(c).end() #define mp make_pair #define pb push_back #define each(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++) #define dbg(x) cerr<<__LINE__<<": "<<#x<<" = "<<(x)<<endl using namespace std; typedef long lon...
a.cc: In function 'int main()': a.cc:25:26: error: 'i' was not declared in this scope 25 | ans = max(ans, a[i] - 1); | ^
s143341240
p01059
C++
https://www.slideshare.net/cocoa_chan/rupc2016-day2-d?qid=1931cae0-cc15-435b-ba12-0e9bc5aeb296&v=&b=&from_search=1
a.cc:1:1: error: 'https' does not name a type 1 | https://www.slideshare.net/cocoa_chan/rupc2016-day2-d?qid=1931cae0-cc15-435b-ba12-0e9bc5aeb296&v=&b=&from_search=1 | ^~~~~
s688377657
p01060
C++
#include <bits/stdc++.h> using namespace std; int main(){ int W,H,N; cin>>W; cin>>H; cin>>N; vector<int> row; for(int i = 0;i < N;++i){ int a; cin>>a; row.push_back(a); } int o_s = W + H + W - 2; int o = W + H + W - 2; int i_s = W + H + W - 6; int c = 0; int ans = 0; for(int...
a.cc: In function 'int main()': a.cc:48:34: error: expected ')' before '{' token 48 | else if(o_s = o - (W + H - 2){ | ~ ^ | ) a.cc:56:3: error: expected primary-expression before '}' token 56 | } | ^
s020723781
p01060
C++
#include <bits/stdc++.h> using namespace std; int main(){ int W,H,N; cin>>W; cin>>H; cin>>N; vector<int> row; for(int i = 0;i < N;++i){ int a; cin>>a; row.push_back(a); } int o_s = W + H + W - 2; int o = W + H + W - 2; int i_s = W + H + W - 6; int c = 0; int ans = 0; for(int...
a.cc: In function 'int main()': a.cc:48:34: error: expected ')' before '{' token 48 | else if(o_s = o - (W + H - 2){ | ~ ^ | ) a.cc:56:3: error: expected primary-expression before '}' token 56 | } | ^
s355420312
p01060
C++
http://jud#include "bits/stdc++.h" using namespace std; int H, W; int a, b; int main() { cin >> W >> H; int N; cin >> N; a = 0; b = 0; int ans = 0; while (N--) { int p; cin >> p; if (!p) { a++; } else { b++; } if (a == W - 1 || a == W + H - 2) { } else if (a < W-1) { if (a == b)ans++; ...
a.cc:1:1: error: 'http' does not name a type 1 | http://jud#include "bits/stdc++.h" | ^~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope 7 | cin >> W >> H; | ^~~ a.cc:33:9: error: 'cout' was not declared in this scope 33 | cout << an...
s479806198
p01062
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,s,e) for(int (i)=(s);(i)<(int)(e);(i)++) #define REP(i,e) FOR(i,0,e) #define RFOR(i,e,s) for(int (i)=(e)-1;(i)>=(int)(s);(i)--) #define RREP(i,e) RFOR(i,e,0) #define all(o) (o).begin(), (o).end() #define psb(x) push_back(x) #define mp(x,y) make_pair((x),(y)...
a.cc: In function 'int main()': a.cc:111:28: error: break statement not within loop or switch 111 | if (cut_es.size()>1) break; | ^~~~~
s352584534
p01062
C++
http://judge.u-aizu.#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = long double; const ld eps = 1e-9; void dfs(const vector<vector<int>>&edges, int now, int pre,int rest,vector<int>&ans,bool flag) { ans[now]=true; if(rest==0)retu...
a.cc:1:1: error: 'http' does not name a type 1 | http://judge.u-aizu.#include "bits/stdc++.h" | ^~~~ In file included from /usr/include/c++/14/unordered_map:40, from a.cc:2: /usr/include/c++/14/initializer_list:51:15: error: 'size_t' does not name a type 51 | typedef size_t ...
s512595497
p01063
C++
#include <iostream> #include <map> #include <vector> using namespace std; typedef pair<int, int> i_i; int N, x2, y2, z2; int ans = INT_MAX; void dfs(int x, int y, int z, int k, map<vector<int>, int>& memo) { vector<int> v(3); v[0] = x; v[1] = y; v[2] = z; if (memo.count(v) && memo[v] <= k) return; memo[v] = k; ...
a.cc:9:11: error: 'INT_MAX' was not declared in this scope 9 | int ans = INT_MAX; | ^~~~~~~ a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 3 | #include <vector> +++ |+#include <climits> 4 | using namespace std;
s204076505
p01063
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)n;i++) #define all(c) (c).begin(),(c).end() #define mp make_pair #define pb push_back #define each(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++) #define dbg(x) cerr<<__LINE__<<": "<<#x<<" = "<<(x)<<endl using namespace std; typedef long lon...
a.cc: In function 'int main()': a.cc:75:30: error: 'x' was not declared in this scope 75 | q.push(mp(-(estimate(x, y, z) + c) * (ll)1e8 - (c), x*(ll)n*n + y*(ll)n + z));} | ^ a.cc:75:33: error: 'y' was not declared in this scope 75 | q.push(mp(-(estimate(x, y, z)...
s405839326
p01064
C++
#include<iostream> #include<queue> #include<algorithm> #include<cmath> #include<utility> #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,a) loop(i,0,a) using namespace std; int main(){ int n,a,d,m,k,ans; pair<int,int> alt; cin>>n>>a>>d>>m; int num[n+1],x[n],y[n],z[n]; num[0]=a; loop(i,1...
a.cc: In function 'int main()': a.cc:24:20: error: 'start' was not declared in this scope 24 | alt.second=num[start]; | ^~~~~
s330415473
p01065
Java
= sc.nextInt(); final int b = sc.nextInt(); final int c = sc.nextInt(); final int d = sc.nextInt(); for(int j = a; j <= X_MAX; j++){ for(int k = 0; k <= 2 * Y_MAX - b; k++){ if(DP[j][k] < 0){ continue; } nextDP[j - a][k + b] = Math.max(DP[j - a][k + b], DP[j][k]); } } for(int...
Main.java:1: error: class, interface, enum, or record expected = sc.nextInt(); ^ Main.java:2: error: unnamed classes are a preview feature and are disabled by default. final int b = sc.nextInt(); ^ (use --enable-preview to enable unnamed classes) Main.java:6: error: class, interface, enum, or record expec...
s445437017
p01065
C++
#include <bits/stdc++.h> #define r(i,n) for(int i=0;i<n;i++) using namespace std; int dp[101][1200][1200]; int main(){ memset(dp,-1,sizeof(dp)); int x,y,n; cin>>n>>x>>y; dp[0][x+600][y+600]=0; r(i,n){ int a,b,c,d; cin>>a>>b>>c>>d; r(A,1200)r(B,1200){ if(~dp[i][A][B]){c dp[i+1][A-a][B...
a.cc: In function 'int main()': a.cc:14:25: error: expected ';' before 'dp' 14 | if(~dp[i][A][B]){c | ^ | ; 15 | dp[i+1][A-a][B+b]=max(dp[i+1][A-a][B+b],dp[i][A][B]); | ~~
s266498763
p01065
C++
#include <bits/stdc++.h> #define _overload(_1,_2,_3,name,...) name #define _rep(i,n) _range(i,0,n) #define _range(i,a,b) for(int i=(int)(a);i<(int)(b);++i) #define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__) #define _rrep(i,n) _rrange(i,n,0) #define _rrange(i,a,b) for(int i=(int)(a)-1;i>=(int)(b);--i)...
a.cc: In function 'int main()': a.cc:61:20: error: 'in' was not declared in this scope; did you mean 'i'? 61 | for(auto & e : in){ | ^~ | i
s466585857
p01066
C++
#include <iostream> #include <algorithm> #include <vector> #include <cmath> #include <complex> #include <cassert> #include <map> using namespace std; using ll = long long; using ull = unsigned long long; using R = long double; using P = complex<R>; const R EPS = 1e-10; const R PI = acos((R)(-1)); int sgn(R a) { ...
a.cc: In instantiation of 'ull SUnionFind<N>::uf2hash() [with int N = 8; ull = long long unsigned int]': a.cc:135:43: required from here 135 | ans = min(ans, 1+solve(uf2.uf2hash())); | ~~~~~~~~~~~^~ a.cc:85:15: error: 'memset' was not declared in this scope 85 | ...
s135245784
p01067
C++
#include<bits/stdc++.h> #define rep(i,n) for(int i=0;i<(int)n;i++) #define all(c) (c).begin(),(c).end() #define mp make_pair #define pb push_back #define each(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++) #define dbg(x) cerr<<__LINE__<<": "<<#x<<" = "<<(x)<<endl using namespace std; typedef long lon...
a.cc:3:18: error: expected unqualified-id before 'for' 3 | #define rep(i,n) for(int i=0;i<(int)n;i++) | ^~~ a.cc:101:9: note: in expansion of macro 'rep' 101 | rep(i, n) rep(j, i){ | ^~~ a.cc:101:13: error: 'i' does not name a type; did you mean 'vi'? 101 | r...
s023910720
p01067
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define all(x) (x).begin(),(x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout<<#x" = "<<((x))<<endl template<class T,class U> ostream& operator<<(ostream& o, const pa...
In file included from /usr/include/c++/14/cassert:44, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:106, from a.cc:1: a.cc: In function 'int main()': a.cc:113:26: error: 'q' was not declared in this scope 113 | assert(ccw(p,q,l.se)!=1 && ccw(p,q,l.se)!=-1); ...
s149486138
p01067
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define all(x) (x).begin(),(x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout<<#x" = "<<((x))<<endl template<class T,class U> ostream& operator<<(ostream& o, const pa...
a.cc: In function 'std::vector<std::pair<std::complex<double>, std::complex<double> > > tangentLines(Point, double, Point, double)': a.cc:76:34: error: 'PI' was not declared in this scope 76 | a+polar(ar,phi+sign*(theta+PI/2)), | ^~ a.cc:84:34: error: 'PI' was not declare...
s566998471
p01069
C++
#include<bits/stdc++.h> using namespace std; using int64 = long long; namespace FastFourierTransform { using C = complex< long double >; void DiscreteFourierTransform(vector< C > &F, bool rev) { const int N = (int) F.size(); const double PI = (rev ? -1 : 1) * acos(-1); for(int i = 0, j = 1; j + 1 ...
a.cc: In function 'void FastFourierTransform::DiscreteFourierTransform(std::vector<std::complex<long double> >&, bool)': a.cc:34:26: error: unable to find numeric literal operator 'operator""ld' 34 | long double temp = 1.0ld / N; | ^~~~~
s378129371
p01069
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = long double; const ld eps = 1e-9; /* ?????????????????¨?????? FFT ??????????????? n?¬??????????g(x) = \sum_{i=0}^n a_i x^i , h(x) = \sum_{i=0}^n b_i x^i ??????????????? f(x) = (g*h)(x) ...
In file included from /usr/include/c++/14/cassert:44, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:106, from a.cc:1: a.cc: In function 'int main()': a.cc:144:16: error: 'num' was not declared in this scope; did you mean 'enum'? 144 | assert(num==accumulate(ans.begi...
s042722602
p01069
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = long double; const ld eps = 1e-9; /* ?????????????????¨?????? FFT ??????????????? n?¬??????????g(x) = \sum_{i=0}^n a_i x^i , h(x) = \sum_{i=0}^n b_i x^i ??????????????? f(x) = (g*h)(x) ...
a.cc: In function 'void fft(std::vector<std::complex<long double> >&, int, bool)': a.cc:48:28: error: no match for 'operator*' (operand types are 'double' and 'comp' {aka 'std::complex<long double>'}) 48 | f[0]=f0+1.0*f1; | ~~~^~~ | | | ...
s914951137
p01069
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = long double; const ld eps = 1e-9; /* ?????????????????¨?????? FFT ??????????????? n?¬??????????g(x) = \sum_{i=0}^n a_i x^i , h(x) = \sum_{i=0}^n b_i x^i ??????????????? f(x) = (g*h)(x) ...
a.cc: In function 'void fft(std::vector<std::complex<double> >&, int, bool)': a.cc:61:33: error: no match for 'operator/' (operand types are 'long double' and 'comp' {aka 'std::complex<double>'}) 61 | if (is_inv) zeta = 1.0l / zeta; | ~~~~ ^ ~~~~ | ...
s430397080
p01070
C++
#include <string> #include <vector> #include <algorithm> #include <numeric> #include <set> #include <map> #include <queue> #include <iostream> #include <sstream> #include <cstdio> #include <cmath> #include <ctime> #include <cstring> #include <cctype> #include <cassert> #include <limits> #include <functional> #define re...
a.cc:194:27: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations] 194 | struct integer_iterator : iterator<random_access_iterator_tag,T,T> { | ^~~~~~~~ In file included from /us...
s882503976
p01073
C++
#include<iostream> #include<utility> #include<algorithm> #include<cstdio> using namespace std; int main() { int n,m,k; pair<int,int> p[20]; int a,b,c; int i,j,l; cin>>n>>m>>k; for(i=0;i<n;i++) cin>>p[i].first; for(i=0;i<n;i++) cin>>p[i].second; sort(p,p+n); if(k==1){ a=min(m,p[n-1].se...
a.cc: In function 'int main()': a.cc:36:16: error: no matching function for call to 'max(int&, long long int)' 36 | ans=max(ans,dp[i][j]+m-a-b); | ~~~^~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40,...
s371545567
p01074
C++
#include <iostream> #include <vector> #define rep(i,a) for(int i = 0 ; i < a ; i ++) #define loop(i,a,b) for(int i = a ; i < b ; i ++) using namespace std; int main(void){ int n,m,l; cin>>n>>m>>l; vector<vector<int> > mm(m,vector<int>(4)); const int d = 1; const int a = 2; const int k = 3; const int t =...
a.cc: In function 'int main()': a.cc:26:3: error: 'sort' was not declared in this scope; did you mean 'short'? 26 | sort(mm.begin(),mm.end()); | ^~~~ | short a.cc:27:3: error: 'reverse' was not declared in this scope 27 | reverse(mm.begin(),mm.end()); | ^~~~~~~
s661163446
p01074
C++
#include <iostream> #include <tuple> #include <vector> using namespace std; int dp[301][40]; //?????\,?§??????°,??????->????????? typedef tuple<int,int,int,int> T; vector<T> V; int main(){ int N,M,L; cin>>N>>M>>L; for(int i=0;i<M;i++){ int d,a,k,t; cin>>d>>a>>k>>t; V.emplace_back(d...
a.cc: In function 'int main()': a.cc:18:5: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort(V.begin(),V.end()); | ^~~~ | short
s274842810
p01075
C++
#include<iostream> #include<utility> #include<algorithm> using namespace std; pair<int,pair<int,int> > p[2000000]; int m; int tansa(int,int); int main(){ int n; cin >> n >> m; for(int i=0;i<m;i++){ cin>>p[i].second.second>>p[i].first>>p[i].second.first; } sort(p,p+m); for(int i=m-1;i>=0;i--){ if(p...
a.cc: In function 'int tansa(int, int)': a.cc:36:3: error: 'c' was not declared in this scope 36 | c++; | ^
s389538970
p01077
Java
import java.awt.Point; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.Scanner; public class Main { static Scanner sc = new Scanner(System.in); static long startTime = System.currentTimeMillis(); static final int[] DR = { 1, 0, -1, 0 }; static final int[] DC = ...
Main.java:103: error: unreachable statement return false; ^ 1 error
s065437340
p01078
C++
//geometric-2D library //--------------------------------------------------------------// #include<vector> #include<complex> #include<cmath> #include<iostream> #define eps 1e-9 using namespace std; typedef complex<double> point; typedef pair<point, point> line; double dis(point a, point b); double dot(point a, point b...
a.cc: In function 'int main()': a.cc:115:25: error: 'setprecision' was not declared in this scope 115 | std::cout << fixed << setprecision(12) << (area - dist*dis(vp[0], vp[1])/2)*n << std::endl; | ^~~~~~~~~~~~ a.cc:7:1: note: 'std::setprecision' is defined in header '<iomanip>'; this...
s542785351
p01080
C++
#include <bits/stdc++.h> #include <sys/time.h> using namespace std; #define rep(i,n) for(long long i = 0; i < (long long)(n); i++) #define pb push_back #define all(x) (x).begin(), (x).end() #define fi first #define se second template<class T1, class T2> bool chmin(T1 &a, T2 b) { return b < a && (a = b, true); } templa...
a.cc:57:35: error: redefinition of 'template<class T1, class T2> bool chmin(T1&, T2)' 57 | template<class T1, class T2> bool chmin(T1 &a, T2 b) { return b < a && (a = b, true); } | ^~~~~ a.cc:10:35: note: 'template<class T1, class T2> bool chmin(T1&, T2)' previously declared h...
s266905713
p01082
C++
0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 0 | ^
s012321401
p01084
C++
#include<bits/stdc++.h> using namespace std; #define MAX_V 12050 typedef pair<string,bool> B; typedef pair<int,int> P; vector<string> v1,v2,ans; vector<B> v3; unordered_set<string> sv; unordered_map<string,int> m,mv,me; unordered_map<P,int> ok; void addV(string s){ sv.insert(s); v1.push_back(s); for(int i=0;i<5;i...
a.cc:10:22: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<int, int>; _Tp = int; _Hash = std::hash<std::pair<int, int> >; _Pred = std::equal_to<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >]' 10 ...
s175642948
p01085
Java
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.LinkedList; import java.util.NoSuchElementException; import java.util.Arrays; public class AOJ_1600 { int N,nMin,nMax; public void solve() { while(true){ N = nextInt(); nMin = n...
Main.java:10: error: class AOJ_1600 is public, should be declared in a file named AOJ_1600.java public class AOJ_1600 { ^ 1 error
s307299434
p01085
Java
import java.util.Scanner; public class Icpc2015A { public static void main(String args[]){ int n,i,max,min,s,m_gap=0,gap=0; Scanner scan = new Scanner(System.in); n = scan.nextInt(); int data[] = new int[n]; min = scan.nextInt(); max = scan.nextInt(); for(i=0;i<n;i++){ data[i] = scan.nextInt(); } ...
Main.java:2: error: class Icpc2015A is public, should be declared in a file named Icpc2015A.java public class Icpc2015A { ^ 1 error
s195125065
p01085
Java
import java.util.Scanner; public class Icpc2015A { public static void main(String args[]){ int n,f=0,i,max,min,s,gap=0,m_gap=0; int flie[] = new int[10000]; Scanner scan = new Scanner(System.in); while(true){ gap = 0; n = scan.nextInt(); int data[] = new int[n]; for(i=0;i<n;i++){ data[i]=0; ...
Main.java:2: error: class Icpc2015A is public, should be declared in a file named Icpc2015A.java public class Icpc2015A { ^ 1 error
s674289102
p01085
Java
import java.util.Scanner; public class Main2 { public static void main(String[] args) { solve(); } public static void solve() { Scanner sc = new Scanner(System.in); while (true) { int num = sc.nextInt(); int min = sc.nextInt(); int max = sc.nextInt(); if (num == 0 && min == 0 && max == 0) { ...
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error
s934222346
p01085
C
#include<stdio.h> int main(void){ int m ,min,max,mmax,i,j; int p[200]; int gyap[200]; while(1){ scanf("%d%d%d",&m,&min,&max); if(m==0&&min==0&&max==0) break; for(i=0;i<m;i++) scanf("%d",p[i]); for(i=0;i<(max-min+1);i++){ gyap[i]=p[min+i]-p[min+1+i]; } mmax=gyap[0]; for(i=1;i<(max-min+1...
main.c: In function 'main': main.c:17:21: error: expected ';' before ')' token 17 | for(mmax<gyap[i]) | ^ | ; main.c:17:21: error: expected expression before ')' token
s338222736
p01085
C
#include <stdio.h> typedef struct seiseki{ int m; //受験者 int n_min; int n_max; int score[]; }LIST; typedef struct Pass{ int gap; int num; }LIST2; void sort(int a[], int n); void sort2(LIST2 a[],int n); int main(void){ LIST a[200]; LIST2 b[200]; int i=0; int l; int k; while(i<200){ int pa...
main.c: In function 'main': main.c:52:19: error: 'n' undeclared (first use in this function) 52 | printf("%d\n",n[j]); | ^ main.c:52:19: note: each undeclared identifier is reported only once for each function it appears in
s070010416
p01085
C
#include<stdio.h> int main(void){ int m, int min, max; int gap = 0; int pos; int i; while(1){ gap = 0; scanf("%d %d %d", &m, &min, &max); if ( m == 0 && min == 0 && max == 0 ) { break; } int score[m] = {0}; for ( i = 0; i < m; i++ ) { scanf("%d", &score[i]); } for ( i = min; i <= max; i++ ) { i...
main.c: In function 'main': main.c:5:9: error: expected identifier or '(' before 'int' 5 | int min, max; | ^~~ main.c:12:32: error: 'min' undeclared (first use in this function); did you mean 'main'? 12 | scanf("%d %d %d", &m, &min, &max); | ^~~ ...
s476665789
p01085
C
#include<stdio.h> int main(void){ int m; int min, max; int gap = 0; int pos; int i; while(1){ gap = 0; scanf("%d %d %d", &m, &min, &max); if ( m == 0 && min == 0 && max == 0 ) { break; } int score[m] = {0}; for ( i = 0; i < m; i++ ) { scanf("%d", &score[i]); } for ( i = min; i <= max; i++ ) { i...
main.c: In function 'main': main.c:16:24: error: variable-sized object may not be initialized except with an empty initializer 16 | int score[m] = {0}; | ^
s405537180
p01085
C++
#include <iostream> #include <vector> using namespace std; int main (){ int n,min,max; while(cin>>n>>min>>max && n){ min--; max--; vector<int> v(n); for(int i=0;i<n;i++)cin>>v[i]; sort(v.begin(),v.end(),greater<int>()); int ans,gap=0; for(int i=min;i<=max;i++){ if(gap>=v[i+1]-v[i]){ gap=v[i+1]-...
a.cc: In function 'int main()': a.cc:11:17: error: 'sort' was not declared in this scope; did you mean 'short'? 11 | sort(v.begin(),v.end(),greater<int>()); | ^~~~ | short
s799315370
p01085
C++
hoge
a.cc:1:1: error: 'hoge' does not name a type 1 | hoge | ^~~~
s661162829
p01085
C++
#include <iostream> #include <bits/stdc++.h> #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() { int m,ni,na; while(cin>>m>>ni>>na,m) { vector<int> p(m); REP(i,m) { cin...
a.cc:33:1: error: expected class-name before '~' token 33 | ~ | ^
s874886825
p01085
C++
#include <bits/stdc++.h> #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() { int m,ni,na; while(cin>>m>>ni>>na,m) { vector<int> p(m); REP(i,m) { cin>>p[i]; ...
a.cc:32:1: error: expected class-name before '~' token 32 | ~ | ^
s306066199
p01085
C++
#include<iostream> using namespace std; int main(){ int a,min,max,p,mmax=0,mm; while(1){ mmax=0; cin>>a>>min>>max; if(a==min && min==max && a==0) break; for(i=0;i<a;i++){ cin>>p; if(i>min && i<=max){ if(p-mm>mmax) mmax=p-mm; } mm=p; } cout<<mmax<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:21: error: 'i' was not declared in this scope 9 | for(i=0;i<a;i++){ | ^
s290264672
p01085
C++
#include<iostream> #include<string> #include<vector> #include<stdio.h> #include<map> #define scanf scanf_s using namespace std; int main() { int a, b, c; while (scanf("%d%d%d", &a, &b, &c), a | b | c) { map<int, int>e; for (int d = 0; d < a; d++) { int f; scanf("%d", &f); e[20000-f]++; } auto i = e....
a.cc: In function 'int main()': a.cc:6:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 6 | #define scanf scanf_s | ^~~~~~~ a.cc:11:16: note: in expansion of macro 'scanf' 11 | while (scanf("%d%d%d", &a, &b, &c), a | b | c) { | ^~~~~
s630603564
p01085
C++
Last login: Mon Dec 26 14:34:37 on console sira-no-MacBook-Air:~ sira$ ls Desktop Downloads Movies Pictures Documents Library Music Public sira-no-MacBook-Air:~ sira$ cd Desktop/ sira-no-MacBook-Air:Desktop sira$ ls Programing sira-no-MacBook-Air:Desktop sira$ cd Programing/ sira-no-MacBook-Air:Programing sira$ ls ...
a.cc:1:1: error: 'Last' does not name a type 1 | Last login: Mon Dec 26 14:34:37 on console | ^~~~ a.cc:26:17: error: expected unqualified-id before 'for' 26 | for(i = 0; i < m; i++){ | ^~~ a.cc:26:28: error: 'i' does not name a type 26 | for(i = 0; ...
s102481783
p01085
C++
#include <bits/stdc++.h> #define loop(n, i) for(int i=0;i<n;i++) #define all(v) v.begin(),v.end() #define HERE cout << "HERE: " << __LINE__ << endl; #define INSP(v) cout << v << " at " << __LINE__ << endl; using namespace std; typedef long long ll; int main() { int m, min, max; cin >> m >> min >> max; v...
a.cc: In function 'int main()': a.cc:17:13: error: redeclaration of 'int i' 17 | int i; cin >> i; | ^ a.cc:16:13: note: 'int i' previously declared here 16 | loop(m, i) { | ^ a.cc:3:28: note: in definition of macro 'loop' 3 | #define loop(n, i) for(int i=0;i<n;i...
s877467263
p01085
C++
#include <iostream> #include <string> #include <cstring> #include <cstdio> #include <algorithm> #include <vector> using namespace std; int main(){ while calc(); } bool calc(){ int m, nMax, nMin; cin >> m >> nMax >> nMin; if(m == 0 && nMax == 0 && nMin == 0) return false; int p[m]; for(int i = 0; i < m; ...
a.cc: In function 'int main()': a.cc:11:9: error: expected '(' before 'calc' 11 | while calc(); | ^~~~ | ( a.cc:11:9: error: 'calc' was not declared in this scope; did you mean 'calloc'? 11 | while calc(); | ^~~~ | calloc a.cc:11:15: error: expected ')' ...
s849363354
p01085
C++
test
a.cc:1:1: error: 'test' does not name a type 1 | test | ^~~~
s821706411
p01085
C++
#include"bits/stdc++.h" #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME #define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)...
a.cc:10:22: error: 'ostream' does not name a type 10 | template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) { | ^~~~~~~ a.cc:13:22: error: 'ostream' does not name a type 13 | template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) { |...
s643981016
p01085
C++
#include"bits/stdc++.h" #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME #define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)...
a.cc:10:22: error: 'ostream' does not name a type 10 | template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) { | ^~~~~~~ a.cc:13:22: error: 'ostream' does not name a type 13 | template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) { |...
s958527933
p01085
C++
#include"bits/stdc++.h" #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME #define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)...
a.cc:10:22: error: 'ostream' does not name a type 10 | template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) { | ^~~~~~~ a.cc:13:22: error: 'ostream' does not name a type 13 | template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) { |...
s794928331
p01085
C++
#include"bits/stdc++.h" #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) RFOR(i,0,n) #define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME #define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)...
a.cc:10:22: error: 'ostream' does not name a type 10 | template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) { | ^~~~~~~ a.cc:13:22: error: 'ostream' does not name a type 13 | template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) { |...
s090459419
p01085
C++
#include <stdio.h> int main(){ int m,na,nb,p[200]; while(1){ scanf("%d %d %d",&m,&na,&nb); if(!m) break; for(int i=0;i<m;i++) scanf("%d",&p[i]); int max=0; int ans; for(int i=na;i<=nb;i++){ if(max<p[i]-p[i-1]){ max=p[i]-p[i-1]; ans=i; } } printf("%d\n",i); } return 0; }
a.cc: In function 'int main()': a.cc:18:31: error: 'i' was not declared in this scope 18 | printf("%d\n",i); | ^
s085914281
p01085
C++
#include <iostream> #include <cstdlib> using namespace std; int main(){ int m, nmin, nmax; int p[201]; int gap; int ans; while(cin>>m>>nmin>>nmax&&m&&nmin&&nmax){ ans = -1; gap = -1; memset(p, 0, sizeof p); for(int i=1; i<=m; i++){ cin >> p[i]; } for(int i=nmin; i<=nmax; i++){ ...
a.cc: In function 'int main()': a.cc:13:5: error: 'memset' was not declared in this scope 13 | memset(p, 0, sizeof p); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdlib> +++ |+#include <cstring> 3 ...
s955368298
p01085
C++
5 2 4 100 90 82 70 65 5 2 4 100 90 80 75 65 3 1 2 5000 4000 3000 4 2 3 10000 10000 8000 8000 4 2 3 10000 10000 10000 8000 5 2 3 100 80 68 60 45 0 0 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 5 2 4 | ^
s683672617
p01085
C++
#include<iostream> using namespace std; int main(){ while(1){ int m,n1,n2;//n2は最大人数 cin>>m>>n1>>n2; if(m==0&&n1==0&&n2==0) break; int P[200]; for(int i=0;i<m;i++){ cin>>P[i]; } int gap=-1; int n=-1; for(int i=n1;i<=n2;i++){ int g=P[i-1]-P[i]; if(gap<=g){ gap=g; n=i; ...
a.cc: In function 'int main()': a.cc:29:30: error: expected ';' before '}' token 29 | cout<<n<<endl | ^ | ; 30 | } | ~
s791098952
p01085
C++
#include<iostream> using namespace std; int main(){ while(1){ int m,nmin,nmax,; cin>>m>>nmin>>nmax; if(m==0&&nmin==0&&nmax==0){ break; } int P[200]; for(int i=0;i<m;i++){ cin>>P[i]; } int gap=-1; int n=-1; for(int i=nmin;i<=nmax;i++){ int g=P[i-1]-P[i]; if(gap<=g){ gap=g; n=i; ...
a.cc: In function 'int main()': a.cc:6:33: error: expected unqualified-id before ';' token 6 | int m,nmin,nmax,; | ^
s020187409
p01085
C++
#include <iostream> using namespace std; int main() { while(true){ int m,nmin,nmax; cin>>m>>nmin>>nmax; if(m==0&&nmin==0&&nmax==0) break; int P[200]; for(int i=0;i<m;i++){ cin>>P[i]; } int gap =-1; int n=-1; for(int i=nmin; i<nmax; i++){ int g=P[i-1]P[i]; ...
a.cc: In function 'int main()': a.cc:21:19: error: expected ',' or ';' before 'P' 21 | int g=P[i-1]P[i]; | ^
s214036176
p01085
C++
#include <iostream> using namespace std; int main() { while(true){ int m,nmin,nmax; cin>>m>>nmin>>nmax; if(m==0&&nmin==0&&nmax==0) break; int P[200]; for(int i=0;i<m;i++){ cin>>P[i]; } int gap =-1; int n=-1; for(int i=nmin; i<=nmax; i++){ int g=P[i-1]P[i]; ...
a.cc: In function 'int main()': a.cc:21:19: error: expected ',' or ';' before 'P' 21 | int g=P[i-1]P[i]; | ^
s235260607
p01085
C++
#include<iostream> using namespace std; int main(){ while(1){ int m,nmin,nmax; cin>>m>>nmin>>nmax; int gap=0; int n=0; int P[m]; for(int i=0;i<m;i++){ cin>>P[i]; } for(int i=nmin-1,i<nmax-1,i++){ if(P[i]-P[i+1]>=gap){ gap=P[i]-P[i+1]; n=i; } } cout<<n<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:14:35: error: expected ';' before '<' token 14 | for(int i=nmin-1,i<nmax-1,i++){ | ^ | ; a.cc:14:35: error: expected primary-expression before '<' token a.cc:14:46: error: expected ';'...
s190305474
p01085
C++
#include <iostream> using namespace std; int main(){ while (ture) { int m,nmin,nmax; cin>>m>>nmin>>nmax; if (m==0&&&nmin==0&&nmax==0) break; int P[200]; for (int i = 0; i < m; i++) { cin>>P[i]; } int gap=-1; int n=-1; for (int i = 0; i < m; i++) { int g=P[i-1]-P[i]; if(gap<=g){ gap...
a.cc: In function 'int main()': a.cc:5:16: error: 'ture' was not declared in this scope 5 | while (ture) { | ^~~~ a.cc:24:35: error: 'il' was not declared in this scope; did you mean 'i'? 24 | n=il; | ^~ | ...
s325127273
p01085
C++
#include<iostream> using namespace std; int main(){ while(1){ int m,nmin,nmax; cin>>m>>nmin>>nmax; if(m=0) break int gap=0; int n=0; int P[m]; for(int i=0;i<m;i++){ cin>>P[i]; } for(int i=nmin-1;i<nmax-1;i++){ if(P[i]-P[i+1]>=gap){ gap=P[i]-P[i+1]; n=i; } } cout<<n<<endl; ...
a.cc: In function 'int main()': a.cc:9:30: error: expected ';' before 'int' 9 | break | ^ | ; 10 | int gap=0; | ~~~
s775989587
p01085
C++
#include<bits/stdc++.h> using namespace std; int a[10000]={}; void sw(int n){ for(int g=0;g<2n;g++){ for(int i=0;i<n-1;i++){ if(a[i]<a[i+1]){swap(a[i],a[i+1]);} }}} int main(){ int m,mi,mx,al=0; while(cin>>m){ int b[10000] cin>>mi>>mx; for(int h=0;h<m;h++){ cin>>a[i]; } sw(m); for(i=mx;i>=mi;i--){ b[i]=a[i]-a[i-1];...
a.cc: In function 'void sw(int)': a.cc:8:15: error: unable to find numeric literal operator 'operator""n' 8 | for(int g=0;g<2n;g++){ | ^~ a.cc: In function 'int main()': a.cc:17:1: error: expected initializer before 'cin' 17 | cin>>mi>>mx; | ^~~ a.cc:19:8: error: 'i' was not declared in...
s098278825
p01085
C++
#include <bits/stdc++.h> using namespace std; int main(){ int m,min,nmax; while(cin >> m >> nmin >> nmax){ if(m == 0) return 0; int mx = 0,ans = 0,a[m+5]; for(int i = 1;i<=m;i++) cin >> a[i]; for(int i = nmin;i<=nmax;i++){ if(a[i]-a[i+1] >= mx) mx = a[i]-a[i-1],ans = ...
a.cc: In function 'int main()': a.cc:5:23: error: 'nmin' was not declared in this scope; did you mean 'min'? 5 | while(cin >> m >> nmin >> nmax){ | ^~~~ | min
s388228955
p01085
C++
#include <iostream> #include <cstdio> #include <vector> #include <queue> #include <stack> #include <map> #include <string> #include <algorithm> using namespace std; int main (int argc, char *argv[]) { int m, n_min, n_max, p; while (cin>>m>>n_min>>n_max, m||n_min||n_max) { vector<int> v; for ...
a.cc: In function 'int main(int, char**)': a.cc:18:13: error: 'cicodn' was not declared in this scope 18 | cicodn>>p; | ^~~~~~
s624994082
p01085
C++
#include <iostream> #define REP(i, n) for (int i = 0; i < n; i++) #define debug(x) cerr << #x << " = " << (x) << endl; using namespace std; int main() { while (1) { int m, nmin, nmax, p[202], ans, maxgap; maxgap = -1; cin >> m >> nmin >> nmax; if (m==0 && nmin==0 && nmax==0) break; REP(i, m) cin ...
a.cc: In function 'int main()': a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'short'? 15 | sort(p, p + m); | ^~~~ | short
s534379782
p01086
Java
package test; import java.util.Scanner; public class ACM3{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n; while(true) { n=sc.nextInt(); if(n==0)break; int ans[] = new int[n]; String test; for(int i=0;i<n;i++) { test = sc.next(); ans[i] = test.length...
Main.java:4: error: class ACM3 is public, should be declared in a file named ACM3.java public class ACM3{ ^ 1 error
s578110076
p01086
C
#define f(X) for(c=0;c<X;c+=v[p++]);if(c-X)goto L; main(n,v[50],s,p,c){for(;scanf("%d",&n),n;){for(s=0;s<n;)v[++s]=strlen(gets());s=0;L:p=++s;f(5)f(7)f(5)f(7)f(7)printf("%d\n",s);}}
main.c:2:9: error: expected ')' before '[' token 2 | main(n,v[50],s,p,c){for(;scanf("%d",&n),n;){for(s=0;s<n;)v[++s]=strlen(gets());s=0;L:p=++s;f(5)f(7)f(5)f(7)f(7)printf("%d\n",s);}} | ^ | )
s264963416
p01086
C
#include<bits/stdc++.h> main(){for(char s[50],i,j,p,q;p=atoi(gets(s));printf("%d\n",i)){for(i=0;i<p;s[i++]=strlen(gets(s+i)));for(i=j=0;j<7;)for(p=i++,j=q=1;q>0;)for(q=j++>5?0:j-2&&j-4?8:6;q>1;q-=s[p++]);}}
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s640087438
p01086
C
f(X){for(;c<X;c+=v[p++]);c=100*(c-X);} n,v[50],s,p,c;main(){for(;n=atoi(gets(v));printf("%d\n",s)){for(p=s=0;p<n;v[++p]=strlen(gets(v+n)));for(;c;p=++s)c=0,f(5),f(7),f(5),f(7),f(7);}}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | f(X){for(;c<X;c+=v[p++]);c=100*(c-X);} | ^ main.c: In function 'f': main.c:1:1: error: type of 'X' defaults to 'int' [-Wimplicit-int] main.c:1:11: error: 'c' undeclared (first use in this function) 1 | f(X){for(;c<X;c+=v[p++]);c=100*(c-...
s226742056
p01086
C
v[50],c,p;f(X){for(;c<X;c+=v[p++]);c=50*(c-X);printf(":%d\n",c);}main(n){for(s;c=n=atoi(gets(v));printf("%d\n",s)){for(p=s=0;p<n;v[++p]=strlen(gets(v+n)));for(;c;)c=0,p=++s,f(5),f(7),f(5),f(7),f(7);} }
main.c:1:1: warning: data definition has no type or storage class 1 | v[50],c,p;f(X){for(;c<X;c+=v[p++]);c=50*(c-X);printf(":%d\n",c);}main(n){for(s;c=n=atoi(gets(v));printf("%d\n",s)){for(p=s=0;p<n;v[++p]=strlen(gets(v+n)));for(;c;)c=0,p=++s,f(5),f(7),f(5),f(7),f(7);} | ^ main.c:1:1: error: type defaults to ...
s664436792
p01086
C
v[50],p,n,c;f(X){for(n=0;n<X;n+=v[p++]);c+=n}main(s){for(;n=atoi(gets(v));printf("%d\n",s)){for(p=s=0;p<n;v[++p]=strlen(gets(v+n)));for(c=0;c-31;)c=0,p=++s,f(5),f(7),f(5),f(7),f(7);}}
main.c:1:1: warning: data definition has no type or storage class 1 | v[50],p,n,c;f(X){for(n=0;n<X;n+=v[p++]);c+=n}main(s){for(;n=atoi(gets(v));printf("%d\n",s)){for(p=s=0;p<n;v[++p]=strlen(gets(v+n)));for(c=0;c-31;)c=0,p=++s,f(5),f(7),f(5),f(7),f(7);}} | ^ main.c:1:1: error: type defaults to 'int' in declara...
s356324202
p01086
C++
main(){puts("hoge");}
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){puts("hoge");} | ^~~~ a.cc: In function 'int main()': a.cc:1:8: error: 'puts' was not declared in this scope 1 | main(){puts("hoge");} | ^~~~
s550460642
p01086
C++
s[50],i,j,p,q; main(n){for(;n=atoi(gets(s)),n;printf("%d\n",i)){ for(i=0;i<n;s[i++]=strlen(gets(s+i))); for(i=j=0;j<7;)for(p=i++,j=q=1;q>0;)for(q=j++>5?0:j-2&&j-4?8:6;q>1;q-=s[p++]); }}
a.cc:1:1: error: 's' does not name a type 1 | s[50],i,j,p,q; | ^ a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token 2 | main(n){for(;n=atoi(gets(s)),n;printf("%d\n",i)){ | ^
s241641305
p01086
C++
s[50],j,p,q;main(i){for(;p=atoi(gets(s));printf("%d\n",i)){for(i=0;i<p;s[i++]=strlen(gets(s+i)));for(i=j=0;j<7;)for(p=i++,j=q=1;q>0;)for(q=j++>5?0:j-2&&j-4?8:6;q>1;q-=s[p++]);}}
a.cc:1:1: error: 's' does not name a type 1 | s[50],j,p,q;main(i){for(;p=atoi(gets(s));printf("%d\n",i)){for(i=0;i<p;s[i++]=strlen(gets(s+i)));for(i=j=0;j<7;)for(p=i++,j=q=1;q>0;)for(q=j++>5?0:j-2&&j-4?8:6;q>1;q-=s[p++]);}} | ^ a.cc:1:17: error: expected constructor, destructor, or type conversion before '(' ...
s070905101
p01086
C++
i,j,k,L[99];main(n){for(;scanf("%d",&n)*n;i=j=k=!printf("%d\n",j)){for(;n--;scanf("%*s%n",L+i++));for(;k<7;)for(n=j++,k=i=1;i>0;)for(i=k++>5?0:k-2&&k-4?8:6;i>1;i-=L[n++]);}}
a.cc:1:1: error: 'i' does not name a type 1 | i,j,k,L[99];main(n){for(;scanf("%d",&n)*n;i=j=k=!printf("%d\n",j)){for(;n--;scanf("%*s%n",L+i++));for(;k<7;)for(n=j++,k=i=1;i>0;)for(i=k++>5?0:k-2&&k-4?8:6;i>1;i-=L[n++]);}} | ^ a.cc:1:17: error: expected constructor, destructor, or type conversion before '(' toke...
s883658024
p01086
C++
#include<bits/stdc++.h> #define f(X) for(c=0;c<X;c+=v[p--]);if(c-X)goto L; main(){for(char n,v[99],s,p,c;p=s=n=atoi(gets(v));){for(;p;v[p--]=strlen(gets(v+70)));L:p=s--;f(5)f(7)f(5)f(7)f(7)puts(itoa(n-s));}}
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){for(char n,v[99],s,p,c;p=s=n=atoi(gets(v));){for(;p;v[p--]=strlen(gets(v+70)));L:p=s--;f(5)f(7)f(5)f(7)f(7)puts(itoa(n-s));}} | ^~~~ a.cc: In function 'int main()': a.cc:3:42: error: 'gets' was not declared in thi...
s364719272
p01086
C++
s[50],j,p,q; main(i){for(;p=atoi(gets(s));printf("%d\n",i)){ for(i=0;i<p;s[i++]=strlen(gets(s+i))); for(i=j=0;j<7;)for(p=i++,j=q=1;q>0;)for(q=(0x886860>>j++*4)&15;q>1;q-=s[p++]); }}
a.cc:1:1: error: 's' does not name a type 1 | s[50],j,p,q; | ^ a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token 2 | main(i){for(;p=atoi(gets(s));printf("%d\n",i)){ | ^
s304345070
p01086
C++
*s,j,p,q; main(i,j){for(s=j;p=j=atoi(gets(s));printf("%d\n",i)){ for(;j;s[p-j--]=strlen(gets(s+p))); for(i=0;j<7;)for(p=i++,j=q=1;q>0;)for(q=8939616>>j++*4&15;q>1;q-=s[p++]); }}
a.cc:1:3: error: expected constructor, destructor, or type conversion before ',' token 1 | *s,j,p,q; | ^ a.cc:1:5: error: expected constructor, destructor, or type conversion before ',' token 1 | *s,j,p,q; | ^ a.cc:1:7: error: expected constructor, destructor, or type conversion before ',' tok...
s278263045
p01086
C++
v[50],p,n,k,X;main(s){for(;n=atoi(gets(v));printf("%d\n",s)){for(p=s=0;p<n;v[++p]=strlen(gets(v+n)));for(;n;)for(n=0,p=++s,k=261096;k/=8;n+=X)for(X=k&7;X>0;X-=v[p++]);}}
a.cc:1:1: error: 'v' does not name a type 1 | v[50],p,n,k,X;main(s){for(;n=atoi(gets(v));printf("%d\n",s)){for(p=s=0;p<n;v[++p]=strlen(gets(v+n)));for(;n;)for(n=0,p=++s,k=261096;k/=8;n+=X)for(X=k&7;X>0;X-=v[p++]);}} | ^ a.cc:1:19: error: expected constructor, destructor, or type conversion before '(' token ...
s003612971
p01086
C++
9 do the best and enjoy today at acm icpc 14 oh yes by far it is wow so bad to me you know hey 15 abcde fghijkl mnopq rstuvwx yzz abcde fghijkl mnopq rstuvwx yz abcde fghijkl mnopq rstuvwx yz 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 9 | ^
s082385957
p01086
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; string s; while(cin>>n,n){ int a[40]={0},j=0,i=0,c,k=0; cout<<b[3]; for(;j<n;j++){ cin>>s; a[i++]=s.size(); } for(j=0;j<35;j++){ int b[4]={0}; c=0; for(i=j;i<40;i++){ c+=a[i]; if(c==5)b[0]++; else if(b[0]&&c==12)b[1]++;...
a.cc: In function 'int main()': a.cc:8:23: error: 'b' was not declared in this scope 8 | cout<<b[3]; | ^
s970391815
p01086
C++
#include <iostream> using namespace???std; int main(){ int a[]={5,7,5,7,7},n,i,j,c,k; while(cin>>n,n){ string s[n]; for(i=0;i<n;i++)cin>>s[i]; for(i=0;i<n;i++){ c=k=0; for(j=i;j<n;j++){ c+=s[j].size(); if(c==a[k]){ c=0; if(++k==5)goto L: } } ...
a.cc:2:16: error: expected identifier before '?' token 2 | using namespace???std; | ^ a.cc:2:16: error: expected ';' before '?' token 2 | using namespace???std; | ^ | ; a.cc:2:16: error: expected unqualified-id before '?' token a.cc: In function 'in...
s011186435
p01086
C++
#include<iostream> #include<vector> #include<string> using namespace std; int main(void){ int n; vector<string> w(n); while(true){ cin >>n; if(n==0) break; for(int i=0;i<n;i++) cin >> w[i]; int tanku[5]={5,7,5,7,7}; bool judge=false; //?§?????????? ...
a.cc: In function 'int main()': a.cc:25:12: error: 'spum' was not declared in this scope; did you mean 'sum'? 25 | if(spum>=tanku[j]) | ^~~~ | sum
s417791309
p01086
C++
#include <bits/stdc++.h> using namespace std; int phrase[5] = {5,7,5,7,7}; int main() { while(1){ int n; cin >> n; if(n==0) break; vector<string> w; for(int i=0; i<n; i++){ string input; cin >> input; w.push_back(input); } ...
a.cc:50:14: error: stray '#' in program 50 | }#include <bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:50:15: error: 'include' was not declared in this scope 50 | }#include <bits/stdc++.h> | ^~~~~~~ a.cc:50:24: error: 'bits' was not declared ...
s806665613
p01086
C++
#include<iostream> #include<string> using namespace std; int main(){ while(true){ int n; cin>>n; if(n==0) break; int len[40]; for(int i=0;i<n;i++){ string w; cin>>w; len[i] = w.size(); } for(int i=0;i<n;i++){ bool flg=false; int sta; int sum=0; for(int j=i;j<n;j++){ sum += l...
a.cc: In function 'int main()': a.cc:29:34: error: lvalue required as left operand of assignment 29 | if(sum==5||sum=12||sum==17||sum==24||sum==31){ | ~~~~~~^~~~~
s960033361
p01086
C++
#include<iostream> #include<string> using namespace std; int main(){ while(true){ int n; cin>>n; if(n==0) break; int len[40]; for(int i=0;i<n;i++){ string w; cin>>w; len[i] = w.size(); } for(int i=0;i<n;i++){ bool flg=false; int sta=0; int sum=0; for(int j=i;j<n;j++){ sum +=...
a.cc: In function 'int main()': a.cc:29:34: error: lvalue required as left operand of assignment 29 | if(sum==5||sum=12||sum==17||sum==24||sum==31){ | ~~~~~~^~~~~
s968030446
p01086
C++
#include<iostream> #include<string> using namespace std; int main(){ while(1){ int n; cin>>n; if(n==0){ break; } int len[40]; for(int i=0;i<n;i++){ string w; cin>>w; len[i]=w.size(); } for(int j=i;j<n;j++){ sum+=len[j]; if(sum==5||sum==12||sum==17||sum==24||sum==31){ sta++; } ...
a.cc: In function 'int main()': a.cc:18:27: error: 'i' was not declared in this scope 18 | for(int j=i;j<n;j++){ | ^ a.cc:19:25: error: 'sum' was not declared in this scope 19 | sum+=len[j]; | ^~~ a.cc:21:33: err...
s874989674
p01086
C++
#include<iostream> #include<string> using namespace std; int main(){ while(true){ int n; cin >> n; if(n==0) break; int len[n]; for(int i=0; i<n; i++){ string w; cin >> w; len[i] = w.size(); } for(int i=0; i<n; i++){ bool flag = false; int sta = 0; //区切り int sum = 0; //文字数の合計 for...
a.cc: In function 'int main()': a.cc:32:6: error: 'flg' was not declared in this scope; did you mean 'flag'? 32 | flg = true; | ^~~ | flag a.cc:39:7: error: 'flg' was not declared in this scope; did you mean 'flag'? 39 | if(flg){ | ^~~ | flag
s009968149
p01086
C++
def main(): while True: n = int(input().strip()) if n == 0: break phrases = [] for _ in range(n): word = input().strip() phrases.append(word) PHRASE_LEN = [5,7,5,7,7] found_flag = False for i in range(n): acc...
a.cc:1:1: error: 'def' does not name a type 1 | def main(): | ^~~
s378450382
p01086
C++
#include <stdio.h> #include <iostream> #include <vector> #include <string> using namespace std; int make(int w,int p); vector<string> a(50); void main(void){ int n; scanf ("%d",&n); while(n){ for(int t=0;t<n;t++){ //scanf ("%s",a[t]); cin >> a[t]; } for(int t=n;t<50;t++){ //scanf ...
a.cc:10:1: error: '::main' must return 'int' 10 | void main(void){ | ^~~~