submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s769639787
p00819
C++
#include <iostream> #include <string> #include <stdio.h> #include <cstdio> using namespace std; int main(){ int n; cin >> n; while( n-- ){ string p, m; cin >> p >> m; reverse( p.begin(), p.end() ); for( size_t i = 0; i < p.length(); i++ ){ if( p[i] == 'J' ){ ...
a.cc: In function 'int main()': a.cc:13:9: error: 'reverse' was not declared in this scope 13 | reverse( p.begin(), p.end() ); | ^~~~~~~
s738852881
p00819
C++
#include <iostream> #include <string> #include <stdio.h> #include <cstdio> #include <algorithm> using namespace std; int main(){ int n; cin >> n; while( n-- ){ string p, m; cin >> p >> m; reverse( p.begin(), p.end() ); for( size_t i = 0; i < p.length(); i++ ){ sw...
a.cc: In function 'int main()': a.cc:38:29: error: no matching function for call to 'std::__cxx11::basic_string<char>::append(std::__cxx11::basic_string<char>::size_type, std::string&)' 38 | m.append( m.length() / 2, tmp ); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ In file inclu...
s679183140
p00819
C++
#include <iostream> #include <string> #include <stdio.h> #include <cstdio> #include <algorithm> using namespace std; int main(){ int n; cin >> n; while( n-- ){ string p, m; cin >> p >> m; reverse( p.begin(), p.end() ); for( size_t i = 0; i < p.length(); i++ ){ sw...
a.cc: In function 'int main()': a.cc:38:30: error: no matching function for call to 'std::__cxx11::basic_string<char>::replace(std::__cxx11::basic_string<char>::size_type, std::string&)' 38 | m.replace( m.length() / 2, tmp ); | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ In file in...
s146475007
p00819
C++
null
a.cc:1:1: error: 'null' does not name a type 1 | null | ^~~~
s526212028
p00819
C++
null
a.cc:1:1: error: 'null' does not name a type 1 | null | ^~~~
s711294920
p00819
C++
null
a.cc:1:1: error: 'null' does not name a type 1 | null | ^~~~
s682485268
p00820
Java
import java.util.*; public class Main2{ int n; int max = 1<<15; void solve(){ Scanner sc = new Scanner(System.in); int[] cnt = new int[max+1]; for(int i=1; i*i<=max; i++){ cnt[i*i]++; for(int j=i; j*j+i*i<=max; j++){ cnt[i*i+j*j]++; ...
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java public class Main2{ ^ 1 error
s863297481
p00820
C
i,z=256,t[z*z];main(i,j,k,l,x){for(;i<z;i++)for(j=i;j<z;j++)for(k=j;k<z;k++)for(l=k;l<z;l++){if((x=i*i+j*j+k*k+l*l)>=z*z)break;t[x]++;}while(scanf("%d",&x),x)printf("%d\n",t[x]);return 0;}
main.c:1:1: warning: data definition has no type or storage class 1 | i,z=256,t[z*z];main(i,j,k,l,x){for(;i<z;i++)for(j=i;j<z;j++)for(k=j;k<z;k++)for(l=k;l<z;l++){if((x=i*i+j*j+k*k+l*l)>=z*z)break;t[x]++;}while(scanf("%d",&x),x)printf("%d\n",t[x]);return 0;} | ^ main.c:1:1: error: type defaults to 'int' in de...
s467634361
p00820
C
i,z=256,t[z*z];main(j,k,l,x){for(;i<z;i++)for(j=i;j<z;j++)for(k=j;k<z;k++)for(l=k;l<z;l++){if((x=i*i+j*j+k*k+l*l)>=z*z)break;t[x]++;}while(scanf("%d",&x),x)printf("%d\n",t[x]);return 0;}
main.c:1:1: warning: data definition has no type or storage class 1 | i,z=256,t[z*z];main(j,k,l,x){for(;i<z;i++)for(j=i;j<z;j++)for(k=j;k<z;k++)for(l=k;l<z;l++){if((x=i*i+j*j+k*k+l*l)>=z*z)break;t[x]++;}while(scanf("%d",&x),x)printf("%d\n",t[x]);return 0;} | ^ main.c:1:1: error: type defaults to 'int' in decl...
s156337724
p00820
C++
#include<iostream> #include<cmath> using namespace std; #define MAX (1<<15)+2 int dp[MAX][5][SQRT]; int main(){ dp[0][0][1] = 1; for(int i = 0; i < MAX; i++){ for(int j = 0; j < 5; j++){ for(int k = 1; k < sqrt(MAX); k++) if(dp[i][j][k] > 0){ for(int l = k; l < sqrt(MAX);...
a.cc:7:16: error: 'SQRT' was not declared in this scope 7 | int dp[MAX][5][SQRT]; | ^~~~ a.cc: In function 'int main()': a.cc:11:5: error: 'dp' was not declared in this scope 11 | dp[0][0][1] = 1; | ^~
s099444702
p00820
C++
#include<iostream> #include<cmath> using namespace std; #define MAX (1<<15)+2 int dp[MAX][5][sqrt(MAX)]; int main(){ dp[0][0][1] = 1; for(int i = 0; i < MAX; i++){ for(int j = 0; j < 5; j++){ for(int k = 1; k < sqrt(MAX); k++) if(dp[i][j][k] > 0){ for(int l = k; l < sqrt(...
a.cc:7:20: error: conversion from '__gnu_cxx::__enable_if<true, double>::__type' {aka 'double'} to 'long unsigned int' in a converted constant expression 7 | int dp[MAX][5][sqrt(MAX)]; | ~~~~^~~~~ a.cc:7:20: error: could not convert 'std::sqrt<int>(((1 << 15) + 2))' from '__gnu_cxx::__enable_if...
s124903686
p00820
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int> a; typedef long long ll; ll dp[1 << 15][1 << 8][5]; // idxより後でk個以内をとってnを作る方法は何通り ll dfs(int n, int idx, int k) { ll & res = dp[n][idx][k]; if (res != -1)return res; if (n == 0) res = 1; else { res = 0...
a.cc: In function 'int main()': a.cc:36:5: error: 'memset' was not declared in this scope 36 | memset(dp, -1, sizeof(dp)); | ^~~~~~ a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <algorithm> +++ |+#include <cstring> ...
s962790371
p00820
C++
#include <iostream> #include <iomanip> #include <sstream> #include <stdio.h> #include <list> #include <vector> #include <stack> #include <queue> #include <map> #include <algorithm> #include <math.h> #include <utility> #include <string> #include <ctype.h> #include <cstring> #include <cstdio> #include <sstream...
a.cc: In function 'int solve(int, int, int)': a.cc:38:13: error: declaration of 'int res' shadows a parameter 38 | int res; | ^~~ a.cc:30:29: note: 'int res' previously declared here 30 | int solve(int i, int j, int res) | ~~~~^~~
s835090748
p00820
C++
#include <iostream> #include <algorithm> #include <cstring> #include <vector> ?? using namespace std; ?? int dp[200][5][(1<<15)+1]; ?? int main(){ ????????int n; ????????vector<int> sq; ?????????? ????????for(int i=1;i*i<=(1 << 15);++i){ ????????????????sq.push_back(i*i); ????????} ????????int sqn = sq.size(); ?? ?? ??...
a.cc:5:1: error: expected unqualified-id before '?' token 5 | ?? | ^ a.cc:7:1: error: expected unqualified-id before '?' token 7 | ?? | ^ a.cc:9:1: error: expected unqualified-id before '?' token 9 | ?? | ^
s403211521
p00820
C++
#include <iostream> #include <algorithm> #include <cstring> #include <vector> ?? using namespace std; ?? int dp[200][5][(1<<15)+1]; ?? int main(){ ????????int n; ????????vector<int> sq; ?????????? ????????for(int i=1;i*i<=(1 << 15);++i){ ????????????????sq.push_back(i*i); ????????} ????????int sqn = sq.size(); ?? ?? ??...
a.cc:5:1: error: expected unqualified-id before '?' token 5 | ?? | ^ a.cc:7:1: error: expected unqualified-id before '?' token 7 | ?? | ^ a.cc:9:1: error: expected unqualified-id before '?' token 9 | ?? | ^
s953030478
p00820
C++
#include<iostream> using namespace std; int i, j, k, l, n, s, t; int main() { while (true) { cin >> n; s = 0; t = sqrt(n) + 1; if (!n) { break; } for (i = 0; i < t; i++) { for (j = i; j < t; j++) { for (k = j; k < t; k++) { for (l = k; l < t; l++) { if (i*i + j*j + k*k + l*l == n) { s++;...
a.cc: In function 'int main()': a.cc:5:38: error: 'sqrt' was not declared in this scope 5 | cin >> n; s = 0; t = sqrt(n) + 1; | ^~~~
s323159247
p00820
C++
#include<iostream> using namespace std;int i,j,k,l,n,s,t; int main(){ while(true){ cin>>n;s=0;t=sqrt(n)+1; if(!n){break;} for(i=0;i<t;i++){ for(j=i;j<t;j++){ for(k=j;k<t;k++){ for(l=k;l<t;l++){ if(i*i+j*j+k*k+l*l==n){ s++; } } } } } cout<<s<<endl; } }
a.cc: In function 'int main()': a.cc:5:14: error: 'sqrt' was not declared in this scope 5 | cin>>n;s=0;t=sqrt(n)+1; | ^~~~
s834475213
p00820
C++
Last login: Wed Apr 27 15:37:25 on console pc111089m:~ 0019055847$ ls Desktop Library Pictures a.cpp Documents Movies Public a.out Downloads Music a myfolder pc111089m:~ 0019055847$ cd Documents pc111089m:Documents 0019055847$ ls c include.txt program pc111089m:Documents 0019055847$ cd c pc111089m:c 0019055847$ ...
a.cc:2:13: error: invalid digit "9" in octal constant 2 | pc111089m:~ 0019055847$ ls | ^~~~~~~~~~~ a.cc:6:13: error: invalid digit "9" in octal constant 6 | pc111089m:~ 0019055847$ cd Documents | ^~~~~~~~~~~ a.cc:7:21: error: invalid digit "9" in octal constant 7 | pc1110...
s057256773
p00820
C++
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import static java.lang.Integer.parseInt; /** * Lagrange's Four-Square Theorem */ public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamRea...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.IOException; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fm...
s299169295
p00821
C++
#include<iostream> #include<algorithm> #include<tuple> #include<set> #include<vector> #include<algorithm> #include<bitset> using namespace std; const int H=4096; const int W=4096; //bitset<W> on[H]; bitset<W> hl[H]; bitset<W> vl[H]; bool on[H][W]; // bool hl[H][W]; // bool vl[H][W]; // //set<tuple<short,short> > hl,v...
a.cc: In function 'int main()': a.cc:23:5: error: 'std::istream' {aka 'class std::basic_istream<char>'} has no member named 'sync_with_s'; did you mean 'sync_with_stdio'? 23 | cin.sync_with_s | ^~~~~~~~~~~ | sync_with_stdio a.cc:24:18: error: 'm' was not declared in this scope; did you mean 'tm'?...
s030608488
p00821
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = long double; template<class T> using Table = vector<vector<T>>; /* ??????????????¬ */ #include <complex> typedef complex<ld> Point; #define REP(i,n) for(int i=0;i<(int)(n);i++) #def...
a.cc: In function 'int main()': a.cc:639:57: error: no matching function for call to 'swap(Point, Point)' 639 | if (l[0].real()>l[1].real())swap(l[0], l[1]); | ~~~~^~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:6...
s223661750
p00821
C++
const int GETA = 2048; int n, mxx, mnx, mxy, mny; char flag[4096][4096]; inline void rec(int y, int x, int p){ queue<pi> q; q.push(mp(y, x)); flag[y][x] = p; while(!q.empty()){ y = q.front().first; x = q.front().second; q.pop(); rep(d, 4){ const int dy[] = {-1, 0, 1, 0}, dx[] = {0, -1, 0, 1}; int ny...
a.cc: In function 'void rec(int, int, int)': a.cc:6:9: error: 'queue' was not declared in this scope 6 | queue<pi> q; | ^~~~~ a.cc:6:15: error: 'pi' was not declared in this scope; did you mean 'p'? 6 | queue<pi> q; | ^~ | p a.cc:6:19: error:...
s818949560
p00821
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define double long double const int GETA = 2000; const int MAX = 4200; int n; bool check[MAX]; struct P{ int x, y; } p[100]; typedef pair<double, double> Pdd; P p1[100], p2[100]; double A[100], B[100]; double f(double a, double b, double y){ ret...
a.cc: In function 'int main()': a.cc:4:16: error: expected primary-expression before 'long' 4 | #define double long double | ^~~~ a.cc:40:32: note: in expansion of macro 'double' 40 | A[i] = double(p2[i].y - p1[i].y) / (p2[i].x - p1[i].x); | ...
s377590113
p00821
C++
#include "bits/stdc++.h" using namespace std; using VS = vector<string>; using LL = long long; using VI = vector<int>; using VVI = vector<VI>; using PII = pair<int, int>; using PLL = pair<LL, LL>; using VL = vector<LL>; using VVL = vector<VL>; #define ALL(a) begin((a)),end((a)) #define RALL(a) (a)....
a.cc:59:6: error: redefinition of 'bool eq(ld, ld)' 59 | bool eq(ld a, ld b) { | ^~ a.cc:39:6: note: 'bool eq(ld, ld)' previously defined here 39 | bool eq(ld a, ld b) { return abs(a - b) < EPS; } | ^~ In file included from /usr/include/c++/14/bits/stl_tempbuf.h:61, from /us...
s715654308
p00821
C++
#include <bits/stdc++.h> #define ll long long #define INF 1000000005 #define MOD 1000000007 #define EPS 1e-10 #define rep(i,n) for(int i=0;i<(int)(n);++i) #define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i) #define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i) #define each(a,b) for(auto (a): (b)) #define all(v) (v).begin...
a.cc: In function 'int main()': a.cc:96:36: error: lvalue required as unary '&' operand 96 | scanf("%d%d",&t[i].real(),&t[i].imag()); | ~~~~~~~~~^~ a.cc:96:49: error: lvalue required as unary '&' operand 96 | scanf("%d%d",&t[i].real(),&t[i].imag()); | ...
s852341150
p00821
C++
#include <bits/stdc++.h> #define ll long long #define INF 1000000005 #define MOD 1000000007 #define EPS 1e-10 #define rep(i,n) for(int i=0;i<(int)(n);++i) #define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i) #define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i) #define each(a,b) for(auto (a): (b)) #define all(v) (v).begin...
a.cc: In function 'int main()': a.cc:96:38: error: lvalue required as unary '&' operand 96 | scanf("%lf%lf",&t[i].real(),&t[i].imag()); | ~~~~~~~~~^~ a.cc:96:51: error: lvalue required as unary '&' operand 96 | scanf("%lf%lf",&t[i].real(),&t[i].imag()); ...
s555055805
p00821
C++
#include <bits/stdc++.h> #define ll long long #define INF 1000000005 #define MOD 1000000007 #define EPS 1e-10 #define rep(i,n) for(int i=0;i<(int)(n);++i) #define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i) #define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i) #define each(a,b) for(auto (a): (b)) #define all(v) (v).begin...
a.cc: In function 'int main()': a.cc:96:38: error: lvalue required as unary '&' operand 96 | scanf("%lf%lf",&t[i].real(),&t[i].imag()); | ~~~~~~~~~^~ a.cc:96:51: error: lvalue required as unary '&' operand 96 | scanf("%lf%lf",&t[i].real(),&t[i].imag()); ...
s003157985
p00822
Java
import java.util.Scanner; import java.util.Stack; public class Main { // 日数、雲の場所、左上の降ってない日数、右上、左下、右下 static int n; static int[][][][][][] dp; static int[][] field; static int[] v1={-8,-4,-1,-2,1,2,4,8,0}; static int[] v2={0,1,4,5}; public static void main(String[] args) { Scanner cin=new Scanner(System.in...
Main.java:19: error: cannot find symbol stack=new Stack<Integer[]>(); ^ symbol: variable stack location: class Main 1 error
s331324390
p00822
C++
#include <iostream> using namespace std; int n, a[375][22]; bool vis[375][3][3][7][7][7][7], dp[375][3][3][7][7][7][7]; int solve(int pos, int x, int y, int d1, int d2, int d3, int d4) { if (pos == n) return true; int b = x * 4 + y; if (a[pos][b] || a[pos][b + 1] || a[pos][b + 4] || a[pos][b + 5]) return false; if ...
a.cc: In function 'int main()': a.cc:32:17: error: 'memset' was not declared in this scope 32 | memset(vis, 0, sizeof(vis)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> ...
s281065322
p00822
C++
#include<iostream> #include<sstream> #include<vector> #include<set> #include<map> #include<queue> #include<algorithm> #include<numeric> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<cassert> #define rep(i,n) for(int i=0;i<n;i++) #define all(c) (c).begin(),(c).end() #define mp make_pair ...
a.cc:84:1: error: expected declaration before '}' token 84 | } | ^
s241598391
p00822
C++
#include<set> #include<cstdio> #include<vector> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; int to[9][5]; // to[i] : 雲が位置 i から移動できる位置 int n; int sun[366][16]; // sun[t][j]==1 <=> t 日目にマス j は晴れていないといけない int rain[9][16]; // rain[i][j]==1 <=> 雲が位置 i にいるとき, マス j は雨 set< vector<int> > vis[366][9]; bool...
a.cc: In function 'int main()': a.cc:95:44: error: 'j' was not declared in this scope 95 | rep(t,n+1) rep(i,9) vis[t][j].clear(); | ^
s874465971
p00823
C++
#include <vector> #include <iostream> #include <utility> #include <algorithm> #include <string> #include <deque> #include <queue> #include <functional> #include <cmath> #include <iomanip> #include <map> #include <numeric> #include <list> #include <assert.h> #include <math.h> #include <valarray> #include <stdio.h> #incl...
a.cc: In function 'int main()': a.cc:140:33: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>' 140 | int a = start(ss+"??????",k); | ~~^~~~~~~~~ a.cc...
s790456739
p00823
C++
#include <vector> #include <iostream> #include <utility> #include <algorithm> #include <string> #include <deque> #include <queue> #include <functional> #include <cmath> #include <iomanip> #include <map> #include <numeric> #include <list> #include <assert.h> #include <math.h> #include <valarray> #include <stdio.h> #incl...
a.cc: In function 'int main()': a.cc:140:37: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>' 140 | int nyaan = start(ss+"??????",k); | ~~^~~~~~...
s635514253
p00823
C++
#include<cstdio> #include<cstdlib> #include<cctype> #include<string> #include<map> #include<vector> using namespace std; struct I{int x;I():x(-1){}operator int(){return x;}void operator=(int r){x=r;}}; int main() { char a[128],*p,*q; int w,x,i; map<string,I>m;vector<int>v,s;while(scanf("%s",a),strcmp(a,"END_OF_FIRST...
a.cc: In function 'int main()': a.cc:13:59: error: 'strcmp' was not declared in this scope 13 | map<string,I>m;vector<int>v,s;while(scanf("%s",a),strcmp(a,"END_OF_FIRST_PART"))scanf("%d",&w),m[a]=v.size(),v.push_back(w); | ^~~~~~ a.cc:7:1: note:...
s010630826
p00823
C++
#include<iostream> #include<map> #include<cctype> using namespace std; string s; int p; map<string,int> weight; long long calc(){ if(p==s.size())return 0; char c=s[p++]; if(c==')')return 0; if(c=='('){ long long w,n=0; w = calc(); if(w==-1)return -1; while(p<s.size() && isdigit(s[p])){ n=n*10+s[p++]-...
a.cc: In function 'long long int calc()': a.cc:33:30: error: no 'operator++(int)' declared for postfix '++' [-fpermissive] 33 | n=p[s++]-'0'; | ~^~
s487876410
p00824
C++
//////////////////// /// template /// //////////////////// #include <cstdio> #include <cstring> #include <cmath> #include <iostream> #include <sstream> #include <algorithm> #include <numeric> #include <functional> #include <vector> #include <queue> #include <string> #include <complex> #include <stack> #include <se...
a.cc: In function 'void solve()': a.cc:287:34: error: declaration of 'solve()::bd solve()::Node::bd' changes meaning of 'bd' [-Wchanges-meaning] 287 | struct Node { bd bd; int step; }; | ^~ a.cc:287:31: note: used here to mean 'union solve()::bd' 287 | ...
s884198664
p00824
C++
//////////////////// /// template /// //////////////////// #include <cstdio> #include <cstring> #include <cmath> #include <iostream> #include <sstream> #include <algorithm> #include <numeric> #include <functional> #include <vector> #include <queue> #include <string> #include <complex> #include <stack> #include <se...
a.cc: In function 'void solve()': a.cc:287:34: error: declaration of 'solve()::bd solve()::Node::bd' changes meaning of 'bd' [-Wchanges-meaning] 287 | struct Node { bd bd; int step; }; | ^~ a.cc:287:31: note: used here to mean 'union solve()::bd' 287 | ...
s523747147
p00824
C++
//////////////////// /// template /// //////////////////// #include <cstdio> #include <cstring> #include <cmath> #include <iostream> #include <sstream> #include <algorithm> #include <numeric> #include <functional> #include <vector> #include <queue> #include <string> #include <complex> #include <stack> #include <se...
a.cc: In function 'void solve()': a.cc:250:47: error: 'bd' does not name a type; did you mean 'BD'? 250 | inline bool operator < (const bd &rhs) const { return lexicographical_compare(ull, ull + 4, rhs.ull, rhs.ull + 4); } | ^~ | ...
s633494922
p00824
C++
//////////////////// /// template /// //////////////////// #include <cstdio> #include <cstring> #include <cmath> #include <iostream> #include <sstream> #include <algorithm> #include <numeric> #include <functional> #include <vector> #include <queue> #include <string> #include <complex> #include <stack> #include <se...
In file included from /usr/include/c++/14/bits/hashtable.h:35, from /usr/include/c++/14/bits/unordered_map.h:33, from /usr/include/c++/14/unordered_map:41, from /usr/include/c++/14/functional:63, from a.cc:12: /usr/include/c++/14/bits/hashtable_policy....
s886823346
p00824
C++
#include<iostream> #include<cmath> #include<vector> #include<map> #include<queue> #include<cassert> #include<cstdio> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define inf (1<<29) #define all(n) ((n).begin(),(n).end()) using namespace std; typedef pair<int,int> ii; struct P { int suit,valu...
a.cc: In function 'int main()': a.cc:170:22: error: no matching function for call to 'std::vector<std::vector<P> >::vector(int, int)' 170 | vvP vec(4,8); | ^ In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/include/c++/14/bits/stl_vector.h:70...
s258487611
p00824
C++
#include<iostream> #include<cmath> #include<vector> #include<map> #include<queue> #include<cassert> #include<cstdio> #include<algorithm> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define inf (1<<29) #define all(n) ((n).begin(),(n).end()) using namespace std; typedef pair<int,int> ii; struct...
a.cc: In function 'int main()': a.cc:171:22: error: no matching function for call to 'std::vector<std::vector<P> >::vector(int, int)' 171 | vvP vec(4,8); | ^ In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/include/c++/14/bits/stl_vector.h:70...
s353235763
p00824
C++
#include<iostream> #include<cmath> #include<vector> #include<map> #include<queue> #include<cassert> #include<cstdio> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define inf (1<<29) #define all(n) ((n).begin(),(n).end()) using namespace std; typedef pair<int,int> ii; struct P { int suit,valu...
a.cc: In function 'int main()': a.cc:170:22: error: no matching function for call to 'std::vector<std::vector<P> >::vector(int, int)' 170 | vvP vec(4,8); | ^ In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/include/c++/14/bits/stl_vector.h:70...
s286088667
p00824
C++
#include<iostream> #include<cmath> #include<vector> #include<map> #include<queue> #include<cassert> #include<cstdio> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define inf (1<<29) #define all(n) ((n).begin(),(n).end()) using namespace std; typedef pair<int,int> ii; struct P { int suit,valu...
a.cc: In function 'int main()': a.cc:154:22: error: no matching function for call to 'std::vector<std::vector<P> >::vector(int, int)' 154 | vvP vec(4,8); | ^ In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/include/c++/14/bits/stl_vector.h:70...
s862595247
p00824
C++
#include<iostream> #include<cmath> #include<vector> #include<map> #include<queue> #include<cassert> #include<cstdio> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define inf (1<<29) using namespace std; struct P { int suit,value; P(int suit=inf,int value=inf):suit(suit),value(value){} bo...
a.cc: In function 'int main()': a.cc:152:22: error: no matching function for call to 'std::vector<std::vector<P> >::vector(int, int)' 152 | vvP vec(4,8); | ^ In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/include/c++/14/bits/stl_vector.h:70...
s618727243
p00824
C++
#include<iostream> #include<cmath> #include<vector> #include<map> #include<queue> #include<cassert> #include<string> #include<cstring> #include<cstdio> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define inf (1<<29) using namespace std; struct P { int suit,value; P(int suit=inf,int value=...
a.cc: In function 'int main()': a.cc:153:22: error: no matching function for call to 'std::vector<std::vector<P> >::vector(int, int)' 153 | vvP vec(4,8); | ^ In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/include/c++/14/bits/stl_vector.h:70...
s811931721
p00824
C++
#include<iostream> #include<cmath> #include<vector> #include<map> #include<queue> #include<cassert> #include<string> #include<cstring> #include<cstdio> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define inf (1<<29) using namespace std; struct P { int suit,value; P(int suit=inf,int value=...
a.cc: In function 'int main()': a.cc:157:22: error: no matching function for call to 'std::vector<std::vector<P> >::vector(int, int)' 157 | vvP vec(4,8); | ^ In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/include/c++/14/bits/stl_vector.h:70...
s475571003
p00824
C++
#include<iostream> #include<cmath> #include<vector> #include<map> #include<queue> #include<cassert> #include<string> #include<cstring> #include<algorithm> #include<cstdio> #define REP(i,s,n) for(int i=s;i<n;i++) #define rep(i,n) REP(i,0,n) #define inf (1<<29) using namespace std; struct P { int suit,value; P(int...
a.cc: In function 'int main()': a.cc:158:22: error: no matching function for call to 'std::vector<std::vector<P> >::vector(int, int)' 158 | vvP vec(4,8); | ^ In file included from /usr/include/c++/14/vector:66, from a.cc:3: /usr/include/c++/14/bits/stl_vector.h:70...
s425634734
p00826
C++
def string_to_complex(s): a, b, c, d = map(int, s.split()) return (a + b * 1j, c + d * 1j) def dot(c1, c2): return c1.real * c2.real + c1.imag * c2.imag def cross(c1, c2): return c1.real * c2.imag - c1.imag * c2.real def cross_point(p1, p2, p3, p4): crs1 = cross(p2 - p1, p3 - p1) crs2 = cross...
a.cc:95:23: warning: multi-character character constant [-Wmultichar] 95 | print('yes') | ^~~~~ a.cc:98:19: warning: multi-character character constant [-Wmultichar] 98 | print('no') | ^~~~ a.cc:1:1: error: 'def' does not name a type ...
s976288526
p00826
C++
#include<bits/stdc++.h> #include "test.cpp" using namespace std; struct edge{ int to; double cost; }; typedef vector<edge> Node; typedef vector<Node> Graph; bool dfs(int pos,double sum,Graph &G, vector<int> &visited , vector< double > &mem){ if(visited[pos]){ return !eq( sum-mem[pos] , 0 ); } visite...
a.cc:2:10: fatal error: test.cpp: No such file or directory 2 | #include "test.cpp" | ^~~~~~~~~~ compilation terminated.
s847286673
p00826
C++
#include<iostream> #include<cstdio> #include<cfloat> #include<cassert> #include<cmath> #include<vector> #include<set> #include<algorithm> using namespace std; #define rep(i,n)for ( int i = 0; i < n; i++) #define EPS (1e-12) #define equals(a, b) (fabs((a) - (b)) < EPS ) #define dle(a, b) (equals(a, b) || a < b ) s...
a.cc:109:13: error: 'point' was not declared in this scope; did you mean 'Point'? 109 | int contain(point p,vector<point>pol){ | ^~~~~ | Point a.cc:109:28: error: 'point' was not declared in this scope; did you mean 'Point'? 109 | int contain(point p,vector<point>pol){ | ...
s147781695
p00826
C++
#include<iostream> #include<cstdio> #include<cfloat> #include<cassert> #include<cmath> #include<vector> #include<set> #include<algorithm> using namespace std; #define rep(i,n)for ( int i = 0; i < n; i++) #define EPS (1e-12) #define equals(a, b) (fabs((a) - (b)) < EPS ) #define dle(a, b) (equals(a, b) || a < b ) ...
a.cc:109:14: error: 'point' was not declared in this scope; did you mean 'Point'? 109 | int contains(point p,vector<point>pol){ | ^~~~~ | Point a.cc:109:29: error: 'point' was not declared in this scope; did you mean 'Point'? 109 | int contains(point p,vector<point>pol){ ...
s989619586
p00826
C++
#include<iostream> #include<cstdio> #include<cfloat> #include<cassert> #include<cmath> #include<vector> #include<set> #include<algorithm> using namespace std; #define rep(i,n)for ( int i = 0; i < n; i++) #define EPS (1e-12) #define equals(a, b) (fabs((a) - (b)) < EPS ) #define dle(a, b) (equals(a, b) || a < b )...
a.cc: In function 'int contains(std::vector<Point>, Point)': a.cc:112:13: error: 'curr' was not declared in this scope 112 | Point a=curr(pol,i)-p,b=next(pol,i)-p; | ^~~~ a.cc:113:12: error: 'b' was not declared in this scope 113 | if(a.y>b.y)swap(a,b); | ^ a.cc:114:23: er...
s489013443
p00827
Java
import java.io.*; import java.util.*; public class Main { FastScanner in = new FastScanner(System.in); PrintWriter out = new PrintWriter(System.out); int MAX = 100000; public void run() { while (true) { int a = in.nextInt(), b = in.nextInt(), d = in.nextInt(); if (a == 0) break; HashMap<Integer, ...
Main.java:178: error: class, interface, enum, or record expected import java.io.*; ^ Main.java:179: error: class, interface, enum, or record expected import java.util.*; ^ 2 errors
s248258376
p00827
C
main(z,a,b,c,X,Y,A,f,i,j){for(;scanf("%d%d%d",&a,&b,&c),a;printf("%d %d\n",X,Y)) for(A=99999999,f=i=0;!f;i++) for(j=0;j<=i;j++) if(z=a*j-b*(i-j),(Z=a*j+b*(i-j))==c||z==c||z==-c) if(f=1,A>Z)A=Z,X=j,Y=i-j; exit(0);}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(z,a,b,c,X,Y,A,f,i,j){for(;scanf("%d%d%d",&a,&b,&c),a;printf("%d %d\n",X,Y)) | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'z' defaults to 'int' [-Wimplicit-int] main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplic...
s158597170
p00827
C++
#include <utility> #include <iostream> #include <stdexcept> int a, b, d; bool cmp(int ax, int ay, int bx, int by){ if(ax+ay != bx+by) return ax+ay < bx+by; return a*ax+b*ay < a*bx+b*by; } int main(){ while(scanf("%d%d%d", &a, &b, &d) && a+b+d){ int resx = (INF)/2, resy = (INF)/2, r, l, y; rep(x, 50000)...
a.cc: In function 'int main()': a.cc:14:17: error: 'INF' was not declared in this scope 14 | int resx = (INF)/2, resy = (INF)/2, r, l, y; | ^~~ a.cc:15:9: error: 'x' was not declared in this scope 15 | rep(x, 50000){ | ^ a.cc:15:5: error: 'rep' was not declared in this ...
s843789323
p00827
C++
#include <iostream> #include <fstream> // DIV(a,b) gives q where a == b * q + r and 0 <= r < b (NOTE: b > 0). #define DIV(a,b) ((a) < 0 ? -((-(a))/(b)+1) : ((a)/(b))) using namespace std; int exgcd(int a, int b, int &x, int &y) { if(b == 0) { x = 1, y = 0; return a; } else { int g = exgcd(b, a % b, y, x); ...
a.cc: In function 'int main()': a.cc:68:26: error: 'INT_MAX' was not declared in this scope 68 | int xm = INT_MAX, ym = 0; | ^~~~~~~ a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 2 | #include <fst...
s068586618
p00827
C++
#include <utility> #include <iostream> #include <algorithm> using namespace std; int gcd(int a, int b) { if (a == 0) { return b; } if (b == 0) { return a; } if (a > b) { return gcd(b, a % b); } return gcd(a, b % a); } int extgcd(int a, int b, int &x, int &y) { int d = a; if (b != 0) { d = extgcd(b, a % b...
a.cc: In function 'std::pair<long long int, long long int> solve(int, int, int)': a.cc:44:9: error: expected ',' or ';' before 'for' 44 | for (long long i = -2500000; i <= 2500000; i++) | ^~~ a.cc:44:38: error: 'i' was not declared in this scope 44 | for (long long i = -2500000; i <=...
s532521995
p00827
C++
#include <utility> #include <iostream> #include <algorithm> using namespace std; int gcd(int a, int b) { if (a == 0) { return b; } if (b == 0) { return a; } if (a > b) { return gcd(b, a % b); } return gcd(a, b % a); } int extgcd(int a, int b, int &x, int &y) { int d = a; if (b != 0) { d = extgcd(b, a % b...
a.cc: In function 'std::pair<long long int, long long int> solve(int, int, int)': a.cc:51:54: error: expected ';' before 'ret' 51 | e = abs(x2) + abs(y2); f = -1//(1LL << 60); | ^ | ...
s668171260
p00827
C++
#include <bits/stdc++.h> using namespace std; const int INF = 1 << 28; typedef pair< int, int > Pi; bool cmp(const pair< Pi, Pi >& p, const pair< Pi, Pi >& q) { if(p.first.first + p.second.first, q.first.first + q.second.first) return(p.first.first + p.second.first < q.first.first + q.second.first); return(p.f...
a.cc: In function 'int main()': a.cc:34:2: error: expected '}' at end of input 34 | } | ^ a.cc:26:1: note: to match this '{' 26 | { | ^
s686767252
p00827
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s775175029
p00827
C++
#include<cmath> #define LIMIT 50000 using namespace std; int a, b , d, mx, my; void update( int x, int y ){ if ( y < 0 ) return; if ( x + y == mx + my && a*x + b*y < a*mx + b*my ){ mx = x; my = y; } else if ( x + y < mx + my ){ mx = x; my = y; } } main(){ while( cin >> a >> b >> d, (a || b || d)...
a.cc:15:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 15 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:16:12: error: 'cin' was not declared in this scope 16 | while( cin >> a >> b >> d, (a || b || d) ){ | ^~~ a.cc:2:1: note: 'std::cin' is defined...
s365135089
p00827
C++
#include <cstdlib> #include <iostream> #include <utility> using namespace std; #define X first #define Y second int a, b; pair<int, int> calc(int d) { int x = 0, y = 0, diff = 0; while(diff != d) { const int ad = abs(diff + a - d), bd = abs(diff - b - d); if(ad > bd) { diff -= b; ++y; } else { di...
a.cc: In function 'int main()': a.cc:40:25: error: '__gcd' was not declared in this scope 40 | int g = __gcd(a, b); | ^~~~~
s128353310
p00828
Java
import java.util.*; public class Main{ public static final int EMPTY = 0; public static final int BLACK = 1; public static final int WHITE = 2; int n; int m; int p; int[] count; int basis_num; int patern = 13; boolean winFrag = false; boolean[] colorFrag = new boolean[patern*2]; public void run(){ Scann...
Main.java:216: error: cannot find symbol Asia2004B app = new Asia2004B(); ^ symbol: class Asia2004B location: class Main Main.java:216: error: cannot find symbol Asia2004B app = new Asia2004B(); ^ symbol: class Asia2004B location: class Main 2 errors
s696368055
p00828
C
#define X(V,N)0<=V+D[d][N]*(m-1)&&V+D[d][N]*(m-1)<n D[13][3]={{1,0,0},{0,1,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,-1,0},{1,0,-1},{0,1,-1},{1,1,1},{-1,1,1},{1,-1,1},{1,1,-1}}; M[7][7][7];main(n,m,p,I,x,y,i,j,k,c,d,z){for(;scanf("%d%d%d",&n,&m,&p),n;){ for(memset(M,0,sizeof(M)),c=1,I=0;I<p;c*=-1){ scanf("%d%d",&x,&y),x...
main.c:2:1: warning: data definition has no type or storage class 2 | D[13][3]={{1,0,0},{0,1,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,-1,0},{1,0,-1},{0,1,-1},{1,1,1},{-1,1,1},{1,-1,1},{1,1,-1}}; | ^ main.c:2:1: error: type defaults to 'int' in declaration of 'D' [-Wimplicit-int] main.c:3:1: warning: data definit...
s734830222
p00828
C
D[13][3]={{1,0,0},{0,1,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,-1,0},{1,0,-1},{0,1,-1},{1,1,1},{-1,1,1},{1,-1,1},{1,1,-1}}; M[9][9][9],q[2];main(n,m,p,x,y,z,j,c,d){for(;scanf("%d%d%d",&n,&m,&p),n;){ for(memset(M,0,sizeof(M)),c=1;p--;c*=-1){ scanf("%d%d",&x,&y),I++; for(z=1;;z++)if(!M[x][y][z]){M[x][y][z]=c;break;} ...
main.c:1:1: warning: data definition has no type or storage class 1 | D[13][3]={{1,0,0},{0,1,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,-1,0},{1,0,-1},{0,1,-1},{1,1,1},{-1,1,1},{1,-1,1},{1,1,-1}}; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'D' [-Wimplicit-int] main.c:2:1: warning: data definit...
s067500439
p00828
C
D[13][3]={{1,0,0},{0,1,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,-1,0},{1,0,-1},{0,1,-1},{1,1,1},{-1,1,1},{1,-1,1},{1,1,-1}}; M[9][9][9],q[2];main(n,m,p,x,y,z,j,c,d){for(;scanf("%d%d%d",&n,&m,&p),n;){ for(memset(M,0,sizeof(M)),c=1;p--;c*=-1){ scanf("%d%d",&x,&y); for(z=1;;z++)if(!M[x][y][z]){M[x][y][z]=c;break;} for...
main.c:1:1: warning: data definition has no type or storage class 1 | D[13][3]={{1,0,0},{0,1,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,-1,0},{1,0,-1},{0,1,-1},{1,1,1},{-1,1,1},{1,-1,1},{1,1,-1}}; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'D' [-Wimplicit-int] main.c:2:1: warning: data definit...
s333645132
p00828
C
D[13][3]={{1,0,0},{0,1,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,-1,0},{1,0,-1},{0,1,-1},{1,1,1},{-1,1,1},{1,-1,1},{1,1,-1}}; M[9][9][9],H[9][9],q[2];main(n,m,p,I,x,y,z,j,c,d,J){for(;scanf("%d%d%d",&n,&m,&p),n;){ for(memset(M,I=0,sizeof(M)),memset(H,I=0,sizeof(H)),c=1;I++<p;c*=-1){ scanf("%d%d",&x,&y); if(H[x][y]==0)H...
main.c:1:1: warning: data definition has no type or storage class 1 | D[13][3]={{1,0,0},{0,1,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,-1,0},{1,0,-1},{0,1,-1},{1,1,1},{-1,1,1},{1,-1,1},{1,1,-1}}; | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'D' [-Wimplicit-int] main.c:2:1: warning: data definit...
s424125384
p00828
C++
#include <iostream> #include <cstdio> #include <utility> #include <algorithm> #include <cassert> #include <tuple> using namespace std; using ll = long long int; ll A, B, D; const ll INF = 1LL << 50; const ll MAX = 1LL << 21; pair<ll, ll> NIL(INF, INF); pair<ll, ll> compare_pair(pair<ll, ll> L, pair<ll, ll> R) { ll ...
a.cc:75:1: error: 'a' does not name a type 75 | a | ^
s005962666
p00828
C++
#include <iostream> using namespace std; #define loop(i,a,b) for(int i=(a);i<int(b);i++) #define rep(i,b) loop(i,0,b) int g[12][12][12]; int h[12][12]; int n, m, p; bool valid(int x, int y, int z){ return 0 <= x && x < n && 0 <= y && y < n && 0 <= z && z < n; } bool check(int turn){ int dx[] = { 1, 0, 0, ...
a.cc: In function 'int main()': a.cc:37:9: error: 'memset' was not declared in this scope 37 | memset(g, -1, sizeof(g)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstr...
s382074100
p00828
C++
#include<bits/stdc++.h> using namespace std; typedef long long int64; int height[7][7]; int field[7][7][7]; int n, m; bool IsEnd(bool color) { static const int dx[] = { 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1}; static const int dy[] = { 0, 1, 0, 1,-1, 0, 0, 1, 1, 1, 1,-1,-1}; static const int dz[] = { 0, 0, 1, 0,...
In file included 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/stl_algobase.h: In instantiation of '_OI std::fill_n(_OI, _Size, const _Tp&) [with _OI = int; _Size = int; _Tp = int]': a.cc:38:11: ...
s988025901
p00828
C++
#include <iostream> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <map> #include <cmath> #include <string> #include <sstream> #include <iomanip> #include <complex> using namespace std; #define ll long long #define vvi vector< vector<int> > #define vi vector<int> #define All(X) X.beg...
a.cc: In function 'void bpush(int, int, int)': a.cc:36:9: error: reference to 'data' is ambiguous 36 | data[x-1][y-1][high[x-1][y-1]] = col; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr...
s703229664
p00828
C++
#include <iostream> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <map> #include <cmath> #include <string> #include <sstream> #include <iomanip> #include <complex> using namespace std; #define ll long long #define vvi vector< vector<int> > #define vi vector<int> #define All(X) X.beg...
a.cc: In function 'void bpush(int, int, int)': a.cc:36:9: error: reference to 'data' is ambiguous 36 | data[x-1][y-1][high[x-1][y-1]] = col; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr...
s584352273
p00828
C++
#include <iostream> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <map> #include <cmath> #include <string> #include <sstream> #include <iomanip> #include <complex> using namespace std; #define ll long long #define vvi vector< vector<int> > #define vi vector<int> #define All(X) X.beg...
a.cc: In function 'void bpush(int, int, int)': a.cc:36:9: error: reference to 'data' is ambiguous 36 | data[x-1][y-1][high[x-1][y-1]] = col; | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr...
s001006389
p00828
C++
// Aoj_1249.cpp : ??????????????? ??¢????????±????????§????????¨????????? ????????????????????????????????? // #include "stdafx.h" #include<iostream> #include<vector> using namespace std; int dx[] = {0,1,-1}; int dy[]= {0,1,-1}; int dz[] = {0,1,-1}; int main() { int n, m, p; while (cin >> n >> m >> p && n != 0 || m...
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s070139364
p00828
C++
#include<cstdio> #include<iostream> using namespace std; int main() { //black 1 //white 2 int board[7][7][7]; int height[7][7]; int N, M, P; while (cin >> N >> M >> P && N != 0 || M != 0 || P != 0) { memset(board, -1, sizeof(board)); memset(height, 0, sizeof(height)); int ansColor = -1; int ansP = -1; ...
a.cc: In function 'int main()': a.cc:14:17: error: 'memset' was not declared in this scope 14 | memset(board, -1, sizeof(board)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<iostream...
s360717514
p00828
C++
#include<cstdio> #include<iostream> #include<string> using namespace std; int main() { //black 1 //white 2 int board[7][7][7]; int height[7][7]; int N, M, P; while (cin >> N >> M >> P && N != 0 || M != 0 || P != 0) { memset(board, -1, sizeof(board)); memset(height, 0, sizeof(height)); int ansColor = -1; ...
a.cc: In function 'int main()': a.cc:15:17: error: 'memset' was not declared in this scope 15 | memset(board, -1, sizeof(board)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<iostream...
s018443257
p00828
C++
#include <iostream> using namespace std; int f[7][7][7],N,M; int dx[] ={0,0,-1,1,0,-1,1,-1,1}; int dy[] ={0,-1,0,0,1,-1,-1,1,1}; int dfs(int x, int y, int z, int c,int m,int mz, bool d) { int s=1; int tx=x, ty=y,tz=z; if(d) tx+=dx[m], ty+=dy[m], tz+=mz; else tx-=dx[m], ty-=dy[m], tz-=mz; if(tx<0||ty<0||tz<0||tx...
a.cc: In function 'int main()': a.cc:26:17: error: 'memset' was not declared in this scope 26 | memset(f,0,sizeof(f)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+...
s079635490
p00829
C++
#include<cstdio> using namespace std; int main(int argc, char *argv[]){ int s; cin >> s; unsigned int data[9]; for (int i = 0; i < s; i++) { unsigned int ans = 0; for (int j = 0; j < 9; j++) { scanf("%x", &data[j]); } for (int j = 0; j < 32; j++) { unsigned int sum = 0; for (i...
a.cc: In function 'int main(int, char**)': a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin >> s; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<cstdio> +++ |+#include <iostream> 2 | using nam...
s766152847
p00829
C++
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s120805914
p00829
C++
#include<stdio.h> #include <iostream> #include <math.h> #include <numeric> #include <vector> #include <map> #include <functional> #include <stdio.h> #include <algorithm> #include <string> #include <assert.h> #include <stdio.h> #include <queue> #include<iomanip> #include<bitset> #include<stack> #include <array> using n...
a.cc: In function 'int main()': a.cc:76:88: error: expected primary-expression before 'unsigned' 76 | int lbitnum = accumulate(havebit.begin(), havebit.begin() + 8, unsigned long long int(0)); | ^~~~~...
s080478767
p00829
C++
////#include <stdio.h> ////#include <iostream> ////#include <math.h> ////#include <numeric> ////#include <vector> ////#include <map> ////#include <functional> ////#include <stdio.h> ////#include <array> ////#include <algorithm> ////#include <string> ////#include <assert.h> ////#include <stdio.h> ////#include <queue> //...
a.cc: In function 'int main()': a.cc:622:107: error: expected primary-expression before 'unsigned' 622 | unsigned long long int lbitnum = accumulate(havebit.begin(), havebit.begin() + 8, unsigned long long int(0)); | ...
s339296562
p00829
C++
////#include <stdio.h> ////#include <iostream> ////#include <math.h> ////#include <numeric> ////#include <vector> ////#include <map> ////#include <functional> ////#include <stdio.h> ////#include <array> ////#include <algorithm> ////#include <string> ////#include <assert.h> ////#include <stdio.h> ////#include <queue> //...
a.cc: In function 'int main()': a.cc:624:40: error: expected primary-expression before 'long' 624 | ans += long long int(1) << i; | ^~~~
s382388533
p00829
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(int)(n);i++) #define ALL(x) (x).begin(),(x).end() using namespace std; typedef long double ld; typedef complex<ld> Point; const ld eps = 1e-9, pi = acos(-1.0); namespace std { bool operator<(const Point &lhs, const Point &rhs) { if (lhs.real() < rhs.re...
a.cc: In function 'int main()': a.cc:414:33: error: invalid initialization of reference of type 'Polygon&' {aka 'std::vector<std::complex<long double> >&'} from expression of type '__gnu_cxx::__alloc_traits<std::allocator<std::complex<long double> >, std::complex<long double> >::value_type' {aka 'std::complex<long doub...
s980750772
p00829
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(int)(n);i++) #define ALL(x) (x).begin(),(x).end() using namespace std; typedef long double ld; typedef complex<ld> Point; const ld eps = 1e-9, pi = acos(-1.0); namespace std { bool operator<(const Point &lhs, const Point &rhs) { if (lhs.real() < rhs.re...
a.cc: In function 'int main()': a.cc:414:33: error: invalid initialization of reference of type 'Polygon&' {aka 'std::vector<std::complex<long double> >&'} from expression of type '__gnu_cxx::__alloc_traits<std::allocator<std::complex<long double> >, std::complex<long double> >::value_type' {aka 'std::complex<long doub...
s759479575
p00829
C++
#include<iostream> #include<algorithm> #include<string> using namespace std;   long long dec(string s) {   long long h=1,d=0;   for(int i=s.length()-1;i>=0;i--){     if(s[i]=='a')d+=10*h;     else if(s[i]=='b')d+=11*h;     else if(s[i]=='c')d+=12*h;     else if(s[i]=='d')d+=13*h;     else if(s[i]=='e')d+=14*h;     else...
a.cc:5:1: error: extended character   is not valid in an identifier 5 |   | ^ a.cc:8:1: error: extended character   is not valid in an identifier 8 |   long long h=1,d=0; | ^ a.cc:8:1: error: extended character   is not valid in an identifier a.cc:9:1: error: extended character   is not valid in an ...
s644870225
p00830
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <sstream> #include <cstring> #include <cstdio> #include <cstdlib> #include <cmath> #include <queue> #include <stack> #include <map> #include <set> #include <numeric> #include <cctype> #include <cassert> // BEGIN CUT HERE #ifdef _MSC_...
a.cc:48:14: error: 'const std::string index' redeclared as different kind of entity 48 | const string index = "index.html"; | ^~~~~ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from a.cc:6: /usr/include/strings.h:50:20: not...
s531583293
p00830
C++
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <sstream> #include <cstring> #include <cstdio> #include <cstdlib> #include <cmath> #include <queue> #include <stack> #include <map> #include <set> #include <numeric> #include <cctype> #include <cassert> // BEGIN CUT HERE #ifdef _MSC_...
a.cc:48:8: error: 'std::string index' redeclared as different kind of entity 48 | string index = "index.html"; | ^~~~~ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from a.cc:6: /usr/include/strings.h:50:20: note: previous declara...
s617883416
p00830
C++
#include <iostream> #include <vector> #include <string> #include <map> #include <algorithm> #define REP(i,n) for(int i=0;i<(int)(n);i++) using namespace std; vector<string> spl(string s) { vector<string> res; int old = 1; while(1) { int p = s.find("/", old); if (p == string::npos) break; res.push_b...
a.cc: In function 'std::pair<bool, std::vector<std::__cxx11::basic_string<char> > > ff(std::vector<std::vector<std::__cxx11::basic_string<char> > >&, std::vector<std::__cxx11::basic_string<char> >&)': a.cc:65:39: error: could not convert '((void)0, path)' from 'std::vector<std::__cxx11::basic_string<char> >' to 'std::p...
s461960559
p00830
C++
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <complex> #include <queue> #include <deque> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <iomanip> #include <assert.h> #include <array> #include <cstdio> #include <cstring> #include <random> ...
a.cc:37:9: error: 'shared_ptr' does not name a type 37 | typedef shared_ptr<struct tree> tree_ptr; | ^~~~~~~~~~ a.cc:38:45: error: expected template-name before '<' token 38 | struct tree : public enable_shared_from_this<tree> { | ^ a.cc:38:45: error...
s855988527
p00830
C++
#include<bits/stdc++.h> #define N 100 using namespace std; typedef pair<int,int> P; int n,m,k,a,b,c,cntg,mark,f,num,p,cnt,cnt2,ans; vector<P> e[N],v; int used[N]; bool usede[N][N],close[N][N]; void func(int x){ used[x]=mark; for(int i=0;i<(int)e[x].size();i++) if(!used[e[x][i].first])func(e[x][i].first); } b...
a.cc:9:28: error: 'bool close [100][100]' redeclared as different kind of entity 9 | bool usede[N][N],close[N][N]; | ^ In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from /usr/include/c++/14/c...
s548099887
p00830
C++
#include<map> #include<vector> #include<sstream> using namespace std; #define DIR 1 #define FILE 2 #define ARB 3 #define REP(i,b,e) for(int i=b;i<e;i++) #define rep(i,n) REP(i,0,n) #define all(c) (c).begin(),(c).end() class Tree{ public: int type; string myname; map<string, Tree* > M; Tree(){type=0;M.clear();my...
a.cc: In function 'void check(Tree*)': a.cc:94:3: error: 'assert' was not declared in this scope 94 | assert(a->type != ARB); | ^~~~~~ a.cc:4:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 3 | #include<sstream> +++ |+#include <cassert> ...
s574017320
p00831
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:149:35: error: no match for 'operator=' (operand types are 'std::tuple<int&, int&>' and 'const std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >') 149 | ...
s810197954
p00831
C++
#include <bits/stdc++.h> #define MOD 1000000007LL using namespace std; typedef long long ll; typedef pair<string,string> P; int n,d; int ans=0; set<string> mp[201][18]; int cnt[201][201]; vector<P> vec; string str[201]; void dfs(int v,string s,int nd,int uk=0){ if(nd==0){ mp[v][s.size()].insert(s); for(int i=0;i...
a.cc: In function 'void dfs2(int, std::string, int)': a.cc:44:59: error: request for member 'end' in 'mp[i]', which is of non-class type 'std::set<std::__cxx11::basic_string<char> > [18]' 44 | if(mp[i][s.size()].find(s)!=mp[i].end()){ | ...
s420919268
p00832
C++
#include <algorithm> #include <cmath> #include <climits> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <cassert> #include <func...
a.cc:19:10: fatal error: dice.h: No such file or directory 19 | #include "dice.h" | ^~~~~~~~ compilation terminated.
s755127410
p00833
C++
#include<bits/stdc++.h> using namespace std; struct Point{ int x,y; Point operator + (const Point p)const{ return (Point){x+p.x,y+p.y}; } Point operator - (const Point p)const{ return (Point){x-p.x,y-p.y}; } }; struct Segment{ Point p,v; }; int dot(Point a,Point b){ return a.x*b.x+a.y*b.y; } i...
a.cc: In function 'int main()': a.cc:141:2: error: expected '}' at end of input 141 | } | ^ a.cc:83:11: note: to match this '{' 83 | int main(){ | ^
s397969156
p00833
C++
#include <cstdio> #include <cstring> #include <vector> #include <queue> #include <string> #include <map> #include <iostream> #include <cmath> #define INF 1LL<<5 using namespace std; struct P{ int x,y; P(){} P(int xx,int yy){ x=xx; y=yy; } P operator +(P p){ return P(x+p.x,y+p.y); } P operator -(P p){ ret...
a.cc:71:22: error: 'std::vector<int> index [101]' redeclared as different kind of entity 71 | vector<int> index[101]; | ^ In file included from /usr/include/string.h:462, from /usr/include/c++/14/cstring:43, from a.cc:2: /usr/include/strings.h:50:20: note:...
s712491988
p00833
C++
< "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt"
a.cc:1:1: error: expected unqualified-id before '<' token 1 | < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt" | ^
s481214502
p00833
C++
6 Blizid 0 0 60 0 60 60 0 60 0 50 50 50 50 10 0 10 -1 Blizid 0 10 10 10 10 50 0 50 -1 Windom 10 10 50 10 40 20 20 20 20 40 10 50 -1 Accent 50 10 50 50 35 50 35 25 -1 Pilot 35 25 35 50 10 50 -1 Blizid 20 20 40 20 20 40 -1 4 A1234567890123456789 0 0 0 100 100 100 100 0 -1 B1234567890123456789 100 100 100 200 200 200 200 ...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 6 | ^
s558294340
p00833
C++
#include <iostream> #include <vector> #include <map> #include <string> #include <complex> #include <algorithm> using namespace std; typedef complex<double> Point; typedef vector<Point> Polygon; const int N = 10; const double EPS = 1.0e-10; bool is_Online(Point &a, Point &b, Point &c){ return abs(a-c)+abs(b-c)<abs(...
a.cc:94:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 94 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:115:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double') 115 | cin >> t.real(); | ...
s954983099
p00833
C++
#include <cstdio> #include <iostream> #include <vector> #include <list> #include <cmath> #include <fstream> #include <algorithm> #include <string> #include <queue> #include <set> #include <map> #include <complex> #include <iterator> #include <cstdlib> #include <cstring> #include <sstream> using namespace std; #define...
a.cc: In function 'double multipleLength(P, P, P, P)': a.cc:148:23: error: cannot bind non-const lvalue reference of type 'Edge&' {aka 'std::pair<std::complex<double>, std::complex<double> >&'} to an rvalue of type 'std::pair<std::complex<double>, std::complex<double> >' 148 | Edge &e1=make_pair(a,b); | ...