submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s203611498
p00609
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; #pragma warning(disable:4996) int n, m, r, x[100000], y[100000]; vector<int>dp[11000]; int main() { while (true) { cin >> n >> m >> r; if (n == 0)break; for (int i = 0; i < 11000; i++)dp[i].clear(); for (int i = 0; i < n; i++)cin >> x[i...
a.cc: In function 'int main()': a.cc:22:41: error: 'sqrt' was not declared in this scope 22 | int L = sqrt(r*r*16 - j*j); | ^~~~
s548664854
p00609
C++
import std.algorithm; import std.array; import std.ascii; import std.container; import std.conv; import std.math; import std.numeric; import std.range; import std.stdio; import std.string; import std.typecons; void log(A...)(A arg) { stderr.writeln(arg); } int size(T)(in T s) { return cast(int)s.length; } str...
a.cc:1:1: error: 'import' does not name a type 1 | import std.algorithm; | ^~~~~~ 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 std.array; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1...
s705992287
p00609
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; #include <vector> #include<memory> using namespace std; struct po { int index; vector<int> coors; po(int _d):coors(_d) { index = -1; } po() {} }; template<class T> class axisSorter { int ...
a.cc: In member function 'int kdtree<T, Dim>::query(const T&, int)': a.cc:55:51: error: 'amin' was not declared in this scope; did you mean 'fmin'? 55 | int d = center.coors[i] - amin.coors[i]; | ^~~~ | ...
s072152360
p00609
C++
#include <cstdio> #include <vector> #include <algorithm> using namespace std; #define Dim 2 typedef complex<double> P; typedef vector<int> kdVal; int dist(int p, int base) { return p-base; } int R; bool isInto(kdVal k, kdVal r) { P a(r[0], r[1]), b=(k[0], k[1]); double dd=abs(a-b); if(dd <= 3*R) return true;...
a.cc:7:9: error: 'complex' does not name a type 7 | typedef complex<double> P; | ^~~~~~~ a.cc: In function 'bool isInto(kdVal, kdVal)': a.cc:20:9: error: 'P' was not declared in this scope 20 | P a(r[0], r[1]), b=(k[0], k[1]); | ^ a.cc:21:23: error: 'a' was not declared in thi...
s490277216
p00609
C++
#include <iostream> #include <vector> #include <cmath> #include <map> #include <algorithm> using namespace std; typedef pair<int,int> pii; vector<int> v[10000]; int main(){ int aN,bN,R; while(cin >> aN >> bN >> R , aN){ for(int i = 0 ; i < 10000 ; i++) v.clear(); for(int i = 0 ; i < aN ; i++){ int x,y; c...
a.cc:35:2: error: stray '#' in program 35 | }#include <iostream> | ^ a.cc: In function 'int main()': a.cc:14:52: error: request for member 'clear' in 'v', which is of non-class type 'std::vector<int> [10000]' 14 | for(int i = 0 ; i < 10000 ; i++) v.clear(); | ...
s765752055
p00609
C++
for(;;){ if(0){ }else if(c[j][(xmn+xmx)/2+1]<=vmx){ xmn=(xmn+xmx)/2+1; }else if(c[j][(xmn+xmx)/2]>vmx){ xmx=(xmn+xmx)/2-1; }else{ break; } } } sm+=(xmn+xmx)/2-(nmn+nmx)/2+1; } } } cout<<sm<<endl; } return 0; }
a.cc:1:13: error: expected unqualified-id before 'for' 1 | for(;;){ | ^~~ a.cc:1:19: error: expected unqualified-id before ')' token 1 | for(;;){ | ^ a.cc:11:11: error: expected declaration before '}' token 11 | } | ^...
s102409558
p00609
C++
#include<stdio.h> #include<string.h> #include<vector> #include<iostream> #include<algorithm> using namespace std; #define maxn 100010 #define eps 1e-8 struct Nodes{ int x,y; }p1[maxn],p2[maxn]; vector<int>vect[10010]; int n,m,r; double ly,ry; bool cmp(Nodes a,Nodes b) { if(a.x==b.x)return a.y<b.y; return a.x<b.x; } ...
a.cc: In function 'void cal(int, Nodes)': a.cc:28:16: error: 'sqrt' was not declared in this scope; did you mean 'sqr'? 28 | ly=s.y-sqrt(tmp)-eps; | ^~~~ | sqr
s933099538
p00609
C++
#include <iostream> #include <complex> using namespace std; #define P complex<int> //#define P complex<double> #define EPS 1e-4 #define DEBUG false int an,bn,r; P a[10000], b; int searchX(int lb, int ub, int search ){ // ( -1,an ) while( ub-lb>1 ){ int mid = (lb+ub)/2; if( a[mid].real() >=search ) ub=mid; ...
a.cc: In function 'int main()': a.cc:33:11: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 33 | cin >> a[i].real() >> a[i].imag(); | ~~~ ^~ ~~~~~~~~~~~ | | | | | int | std...
s478258939
p00609
C++
#include <iostream> #include <math.h> using namespace std; int tile[10000][10000]; int r; void printDebug(){ for(int i = 0; i < 10; i++){ for(int j = 0; j < 10; j++){ cout << tile[i][j]; } cout << "\n"; } } void powerPlus(int x, int y, int coordinate[r+1]){ tile[x][y]+...
a.cc:17:46: error: size of array 'coordinate' is not an integral constant-expression 17 | void powerPlus(int x, int y, int coordinate[r+1]){ | ~^~
s708766094
p00609
C++
#include <iostream> #include <math.h> using namespace std; int tile[10000][10000]; int r; void powerPlus(int x, int y, int coordinate[r+1]){ tile[x][y]++; // これは正直どっちでもいい for(int i = 1; i <= r; i++){ if(x+i < 10000) tile[y][x+i]++; if(x-i >= 0) tile[y][x-i]++; if(y+i < 10000) tile[y+i]...
a.cc:8:46: error: size of array 'coordinate' is not an integral constant-expression 8 | void powerPlus(int x, int y, int coordinate[r+1]){ | ~^~
s612064232
p00609
C++
#include <iostream> #include <math.h> using namespace std; int tile[10000][10000]; int r; void powerPlus(int x, int y, int coordinate[r+1]); void powerPlus(int x, int y, int coordinate[r+1]){ tile[x][y]++; // これは正直どっちでもいい for(int i = 1; i <= r; i++){ if(x+i < 10000) tile[y][x+i]++; if(x-i >= ...
a.cc:8:46: error: size of array 'coordinate' is not an integral constant-expression 8 | void powerPlus(int x, int y, int coordinate[r+1]); | ~^~ a.cc:10:46: error: size of array 'coordinate' is not an integral constant-expression 10 | void powerPlus(int x, int y,...
s261910576
p00609
C++
#include <iostream> #include <math.h> using namespace std; int tile[10000][10000]; int r; void powerPlus(int x, int y, const int coordinate[r+1]){ tile[x][y]++; // これは正直どっちでもいい for(int i = 1; i <= r; i++){ if(x+i < 10000) tile[y][x+i]++; if(x-i >= 0) tile[y][x-i]++; if(y+i < 10000) til...
a.cc:8:52: error: size of array 'coordinate' is not an integral constant-expression 8 | void powerPlus(int x, int y, const int coordinate[r+1]){ | ~^~
s624237115
p00612
C++
import java.lang.*; import java.math.*; import java.util.*; class Main{ public static void main(String s[]){ Scanner sc = new Scanner(System.in); BigInteger TWO=new BigInteger("2"); BigInteger FOUR=new BigInteger("4"); BigInteger EIGHT=new BigInteger("8"); while(true){ BigInteger biN = sc.nextBigInteger...
a.cc:1:1: error: 'import' does not name a type 1 | import java.lang.*; | ^~~~~~ 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.math.*; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1...
s526558419
p00612
C++
#include <iostream> #include <cmath> using namespace std; typedef long long ll; int main(){ ll n; while(cin >> n, n){ ll t = n/2; ll sum = 0; for(int i = 1 ; i*i < t ; i++){ sum += (n-2*i-1)/(i-1); } cout << (n+sum)*8 << endl; return 0; }
a.cc: In function 'int main()': a.cc:19:2: error: expected '}' at end of input 19 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s056899801
p00613
Java
import java.util.Scanner; public class CakeMain { private int x;//cake sum private int y; private int[] card; private int sum; Scanner in =new Scanner(System.in); public CakeMain(){ x=in.nextInt(); if (x==0){ return; } } public static void main(String[] args){ CakeMain ck=new CakeMain(); ...
Main.java:3: error: class CakeMain is public, should be declared in a file named CakeMain.java public class CakeMain { ^ 1 error
s078997973
p00613
Java
import java.util.Scanner; public class CakeMain { private int x; private int y; private int[] card; private int sum; Scanner in =new Scanner(System.in); public CakeMain(){ x=in.nextInt(); if (x==0){ return; } } public static void main(String[] args){ CakeMain ck=new CakeMain(); ck.com(); ...
Main.java:3: error: class CakeMain is public, should be declared in a file named CakeMain.java public class CakeMain { ^ 1 error
s117692503
p00613
Java
import java.util.Scanner; class Main { private int x; private int y; private int[] card; private int sum; Scanner in =new Scanner(System.in); public CakeMain(){ x=in.nextInt(); if (x==0){ return; } } public static void main(String[] args){ CakeMain ck=new CakeMain(); ck.com(); ck.rd(); ...
Main.java:9: error: invalid method declaration; return type required public CakeMain(){ ^ 1 error
s323708525
p00613
Java
import java.util.Scanner; class Main { private int x; private int y; private int[] card; private int sum; Scanner in =new Scanner(System.in); public CakeMain(){ x=in.nextInt(); if (x==0){ return; } } public static void main(String[] args){ CakeMain ck=new Main(); ck.com(); ck.rd(); ck...
Main.java:9: error: invalid method declaration; return type required public CakeMain(){ ^ 1 error
s080175746
p00613
Java
import java.util.Scanner; class Main { private int x; private int y; private int[] card; private int sum; Scanner in =new Scanner(System.in); public Main(){ x=in.nextInt(); if (x==0){ return; } } public static void main(String[] args){ CakeMain ck=new Main(); ck.com(); ck.rd(); ck.run...
Main.java:19: error: cannot find symbol CakeMain ck=new Main(); ^ symbol: class CakeMain location: class Main 1 error
s173870700
p00613
Java
import java.util.Scanner; class Main { private int x;//cake sum private int y; private int[] card; private int sum; private static int f=0; Scanner in =new Scanner(System.in); public Main(){ x=in.nextInt(); if (x==0){ f=1; return; } } public static void main(String[] args){ while(true)...
Main.java:29: error: ';' expected continue(); ^ 1 error
s817839862
p00613
C
#include <stdio.h> int main (){ int K,c,i,sum,; while (1){ scanf("%d",&K); if (K==0)break; sum=0; for (i=0 ; i < (K*K-K)/2 ; i++){ scanf("%d",&c); sum=sum+c; } printf("%d\n",sum/(K-1) ); } return 0; }
main.c: In function 'main': main.c:4:17: error: expected identifier or '(' before ';' token 4 | int K,c,i,sum,; | ^
s286351879
p00613
C
#include <stdio.h> int main (){ int K,c,i,sum,; while (1){ scanf("%d",&K); if (K==0)break; sum=0; for (i=0 ; i < (K*K-K)/2 ; i++){ scanf("%d",&c); sum=sum+c; } printf("%d\n",sum/(K-1) ); } return 0; }
main.c: In function 'main': main.c:4:17: error: expected identifier or '(' before ';' token 4 | int K,c,i,sum,; | ^
s850350598
p00613
C
#define _USE_MATH_DEFINES #define INF 100000000 #include <iostream> #include <sstream> #include <cmath> #include <cstdlib> #include <algorithm> #include <queue> #include <stack> #include <limits> #include <map> #include <string> #include <cstring> #include <set> #include <deque> #include <bitset> #include <list> using...
main.c:3:10: fatal error: iostream: No such file or directory 3 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s863698466
p00613
C
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> using namespace std; int sum,i,a,n; int main(){ while (scanf("%d",&n),n){ sum=0; for (i=1;i<=(n-1)*n/2;i++){ scanf("%d",&a); sum+=a; } sum=sum/(n-1); printf("%d\n",sum); }...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s586800423
p00613
C
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> using namespace std; int n,a[100100]; int main(){ while(scanf("%d",&n)==1){ if(n==0) break; int sum=0; for(int i=1;i<=(n*(n-1))/2;i++){ scanf("%d",&a[i]); sum+=a[i];...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s800216854
p00613
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
s340829914
p00613
C++
#include<iostream> #include<string> using namespace std; int main() { int K; int m; while(cin >> K){ if (K == 0){ break } else{ for(int i=0;i<K;++i){ cin >> c m += c; } } int r; r = m/(K-1); cout << r << endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:14: error: expected ';' before '}' token 10 | break | ^ | ; 11 | } | ~ a.cc:14:16: error: 'c' was not declared in this scope 14 | cin >> c | ^
s612841434
p00613
C++
#include<iostream> #include<string> using namespace std; int main() { int K; int m; while(cin >> K){ if (K == 0){ break } else{ for(int i=0;i<K;++i){ cin >> c m += c; } } } int r; r = m/(K-1); cout << r << endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:14: error: expected ';' before '}' token 10 | break | ^ | ; 11 | } | ~ a.cc:14:16: error: 'c' was not declared in this scope 14 | cin >> c | ^ a.cc: At global scope: a.cc:23...
s351497458
p00613
C++
#include<iostream> #include<string> using namespace std; int main() { int K; int m; while(cin >> K){ if (K == 0){ break; } else{ for(int i=0;i<K;++i){ cin >> c; m += c; } } int r; r = m/(K-1); cout << r << endl; } return 0; }
a.cc: In function 'int main()': a.cc:14:16: error: 'c' was not declared in this scope 14 | cin >> c; | ^
s382386864
p00613
C++
#include<iostream> #include<string> using namespace std; int main() { int K; int m; while(cin >> K){ if (K == 0){ break; } else{ for(int i=0;i<K;++i){ cin >> c; m += c; } } int r; r = m/(K-1); cout << r << endl; } return 0; }
a.cc: In function 'int main()': a.cc:14:16: error: 'c' was not declared in this scope 14 | cin >> c; | ^
s171133481
p00613
C++
#include<iostream> #include<string> using namespace std; int main() { int K; int m; while(cin >> K){ if (K == 0){ break; } else{ for(int i=0;i<K;++i){ cin >> c; m += c; } } } int r; r = m/(K-1); cout << r << endl; return 0; }
a.cc: In function 'int main()': a.cc:14:16: error: 'c' was not declared in this scope 14 | cin >> c; | ^
s306143353
p00613
C++
#include<iostream> #include<string> using namespace std; int main() { int K; int m; while(cin >> K){ if (K == 0){ break; } else{ for(int i=0;i<K(K-1)/2;++i){ int c; cin >> c; m += c; } } } int r; r = m/(K-1); cout << r << endl; retu...
a.cc: In function 'int main()': a.cc:13:20: error: 'K' cannot be used as a function 13 | for(int i=0;i<K(K-1)/2;++i){ | ~^~~~~
s506624878
p00613
C++
#include<iostream> #include<string> using namespace std; int main() { int K; int m; while(cin >> K){ if (K == 0){ break; } else{ for(int i=0;i<K(K-1)/2;++i){ int c; cin >> c; m += c; } } int r; r = m/(K-1); cout << r << endl; } ...
a.cc: In function 'int main()': a.cc:13:20: error: 'K' cannot be used as a function 13 | for(int i=0;i<K(K-1)/2;++i){ | ~^~~~~
s562281218
p00613
C++
#include<iostream> #include<string> using namespace std; int main() { int K; while(cin >> K){ if (K == 0){ break; } else{ int m; for(int i=0;i<K*(K-1)/2;++i){ int c; cin >> c; m += c; } } int r; r = m/(K-1); cout << r << endl; } ...
a.cc: In function 'int main()': a.cc:20:9: error: 'm' was not declared in this scope 20 | r = m/(K-1); | ^
s370199770
p00613
C++
int main() { int K; while(cin >> K){ if (K == 0){ break; } else{ int m; for(int i=0;i<K*(K-1)/2;++i){ int c; cin >> c; m += c; } int r; r = m/(K-1); cout << r << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:3:10: error: 'cin' was not declared in this scope 3 | while(cin >> K){ | ^~~ a.cc:16:5: error: 'cout' was not declared in this scope 16 | cout << r << endl; | ^~~~ a.cc:16:18: error: 'endl' was not declared in this scope 16 | cout << r <...
s040389681
p00613
C++
#include<iostream> #include<vector> using namespace std; int main(){ int k,sum=0; vector<int> c(n); while(1){ cin >> k; if(k==0) break; for(int i=0;i<k*(k-1)/2,i++){ cin >> c[i]; sum += c[i]; } cout >> sum/(k-1) >> endl; } }
a.cc: In function 'int main()': a.cc:8:19: error: 'n' was not declared in this scope 8 | vector<int> c(n); | ^ a.cc:12:36: error: expected ';' before ')' token 12 | for(int i=0;i<k*(k-1)/2,i++){ | ^ | ...
s760097437
p00613
C++
#include<iostream> #include<vector> using namespace std; int main(){ while(1){ int k,sum; cin >> k; int n = k*(k-1)/2; vector<int> c(n); if(k==0) break; for(int i=0;i<n,i++){ cin >> c[i]; sum += c[i]; } cout >> sum/(k-1) >> endl; } }
a.cc: In function 'int main()': a.cc:13:28: error: expected ';' before ')' token 13 | for(int i=0;i<n,i++){ | ^ | ; a.cc:17:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 1...
s536153016
p00613
C++
#include<iostream> #include<vector> using namespace std; int main(){ while(1){ int k,sum; cin >> k; int n = k*(k-1)/2; vector<int> c(n); if(k==0) break; for(int i=0;i<n;i++){ cin >> c[i]; sum += c[i]; } cout >> sum/(k-1) >> endl; } }
a.cc: In function 'int main()': a.cc:17:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 17 | cout >> sum/(k-1) >> endl; | ~~~~ ^~ ~~~~~~~~~ | | | | | int | std::ostream {aka std::basic_ost...
s966950148
p00613
C++
{ all=0; for(int i=0;i<k*(k-1)/2;i++){ cin>>c[i]; all+=c[i];} cout << all/(k-1)<<endl;}
a.cc:1:1: error: expected unqualified-id before '{' token 1 | { | ^
s661392643
p00613
C++
#include<iostream> using namespace std; int main(){ int k,c[100]; long long long all; while(cin >>k && k!=0){ all=0; for(int i=0;i<k*(k-1)/2;i++){ cin>>c[i]; all+=c[i];} cout << all/(k-1)<<endl;} return 0; }
a.cc: In function 'int main()': a.cc:5:13: error: 'long long long' is too long for GCC 5 | long long long all; | ^~~~
s236623757
p00613
C++
import java.awt.geom.Point2D; import java.io.*; import java.math.BigInteger; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.Deque; import java.util.HashMap; import java.util.HashSet; import java.util.List; im...
a.cc:2:1: error: 'import' does not name a type 2 | import java.awt.geom.Point2D; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.io.*; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' ...
s967340541
p00613
C++
#include <iostream> using namespace std; int main() { int k; while(cin >> k, k) { int sum; sum = 0; for(int i = 0; i < k; i++) { int a; cin >> a; sum += a; } cout << a / (k-1) << endl; } }
a.cc: In function 'int main()': a.cc:14:9: error: 'a' was not declared in this scope 14 | cout << a / (k-1) << endl; | ^
s145074177
p00613
C++
#include <iostream> using namespace std; int main() { int k; while(cin >> k, k) { int sum; sum = 0; for(int i = 0; i < k*(k-1)/2; i++) { int a; cin >> a; sum += a; } cout << a / (k-1) << endl; } }
a.cc: In function 'int main()': a.cc:14:9: error: 'a' was not declared in this scope 14 | cout << a / (k-1) << endl; | ^
s740342397
p00613
C++
#include<iostream> #include<stdio.h> using namespace std; int main(){ while(1){ int n; cin>>n; if(n==0)break; int ans=0,a; for (int i = 0; i < n * (n - 1) / 2; i++) { cin>>a; ans += ; } cout<<ans/(n-1); } return 0; }
a.cc: In function 'int main()': a.cc:13:40: error: expected primary-expression before ';' token 13 | ans += ; | ^
s982075720
p00613
C++
#include <iostream> uding namespace std; int main() { int n; int num = 0; int w = 0; while(cin >> n && n) { for(int i = 0; i < n*(n-1)/2; i++) { cin >> num; w += num; } cout << w /(n-1) << endl; } return 0; }
a.cc:2:1: error: 'uding' does not name a type 2 | uding namespace std; | ^~~~~ a.cc: In function 'int main()': a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 8 | while(cin >> n && n) { | ^~~ | std::cin In file included from a.cc:1: /usr/includ...
s143685185
p00613
C++
#include <iostream> using namespace std; int main(){ int k; cin >> k; if(k == 0) { break; } for(int i = 0;i < k*(k-1)/2;k++) { cin >> kazu; sum += kazu; } cout << sum/(k-1) << endl; }
a.cc: In function 'int main()': a.cc:12:7: error: break statement not within loop or switch 12 | break; | ^~~~~ a.cc:17:14: error: 'kazu' was not declared in this scope 17 | cin >> kazu; | ^~~~ a.cc:19:7: error: 'sum' was not declared in this scope 19 | sum += k...
s611653941
p00613
C++
#include <iostream> using namespace std; int main(){ while(1) { int k; int sum=0; cin >> k; if(k == 0) { break; } for(int i = 0;i < k*(k-1)/2;k++) { cin >> kazu; sum += kazu; } cout << sum/(k-1) << endl; } }
a.cc: In function 'int main()': a.cc:21:14: error: 'kazu' was not declared in this scope 21 | cin >> kazu; | ^~~~
s224437762
p00613
C++
#include <iostrem> #include <vector> using namespace std; int main() { int K; vector<int> c; while(1) { int sum = 0; cin >> K; if(K == 0) break; for(int i = 0; i < K*(K-1)/2; i++) { int C; cin >> C; sum += C; c.push_back(C); } cout << sum/(K-1) << endl; }...
a.cc:1:10: fatal error: iostrem: No such file or directory 1 | #include <iostrem> | ^~~~~~~~~ compilation terminated.
s879566315
p00613
C++
#include <bits/stdc++.h> using namespace std; int main(){ int k,sum; int a[101]; sum=0;k=0; for(int i=0;i<101;i++){ a[i] =0; } while(1){ cin >> k; if(k == 0)break; for(int i=0;i<k-1;i++){ cin >> a[i]; } for(int i=0;i<k-1;i++){ sum += a[i] } sum = sum / (k ...
a.cc: In function 'int main()': a.cc:20:18: error: expected ';' before '}' token 20 | sum += a[i] | ^ | ; 21 | } | ~ a.cc:26:2: error: expected '}' at end of input 26 | } | ^ a.cc:4:11: note: to match this '{' 4 | int mai...
s725649647
p00613
C++
#include<iostream> using namespace std; int main(void){ int k,c,sum,i; while(1){ sum=0; cin >> k; if(k==0)break; for(i=0;i<(k*(k-1))/2;i++){ cin>>c; sum+=c; } else cout << sum/(k-1)<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:21:5: error: 'else' without a previous 'if' 21 | else cout << sum/(k-1)<<endl; | ^~~~
s190053324
p00613
C++
#include<iostream> using namespace std; int main(){ while(1){          int k,c,sum=0; cin>>k; if(k==0)break; for(int i=0;i<k*(k-1)/2;i++){ cin>>c; sum+=c; } cout<<sum/(k-1)<<endl; } return 0; }
a.cc:5:1: error: extended character   is not valid in an identifier 5 |          int k,c,sum=0; | ^ a.cc:5:1: error: extended character   is not valid in an identifier a.cc:5:1: error: extended character   is not valid in an identifier a.cc:5:1: error: extended character   is not valid in an identifier a.cc:5...
s922703454
p00613
C++
include <iostream> using namespace std; int main(){ int k; while(cin >> k,k){ int ans = 0; for(int i=0;i<k*(k-1)/2;i++){ int tmp; cin >> tmp; ans += tmp; } cout << ans/(k-1) << endl; } }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:9: error: 'cin' was not declared in this scope 6 | while(cin >> k,k){ | ^~~ a.cc:13:5: error: 'cout' was not declared in this scope 13 | cout << ans/(k-1) << endl;...
s719798733
p00614
Java
class AOJ1028 { static final int[] c = { 1, 5, 10, 50, 100, 500 }; public void run() { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { int P = sc.nextInt(); if (P == 0) return; int[] N = new int[6]; for (int i = 0; i < 6; i++) N[i] = sc.nextInt(); int min = 10000; loop: for...
Main.java:20: error: cannot find symbol int dn = max((p - 1) / c[i] + 1, 0); ^ symbol: method max(int,int) location: class AOJ1028 Main.java:26: error: cannot find symbol dn = min(dn, N[i]); ^ symbol: method min(int,int) location: class AOJ1028 Main.java:37: error: cann...
s126065919
p00614
C++
x#include <stdlib.h> #include <limits.h> #include <iostream> using namespace std; int COIN_TYPE_NUM = 6; int coin_price[] = {1, 5, 10, 50, 100, 500}; int coin_payment(int p, int* coin_num); int change_num(int p); int pay(int p, int* coin_num); int main(){ int p; int* coin_num = (int*)malloc(COIN_TYPE_NUM * sizeof(i...
a.cc:1:2: error: stray '#' in program 1 | x#include <stdlib.h> | ^ a.cc:1:1: error: 'x' does not name a type 1 | x#include <stdlib.h> | ^
s249649123
p00614
C++
#include <iostream> using namespace std; int ans = 0; int lest[6]; int sum[6]; int coin[6] = {500, 100, 50, 10, 5, 1}; void search(int cur, int P, int num, int pos){ // cout << cur << " " << P << " " << num << " " << pos << endl; if(num > ans) return ; if(pos == 5){ if(cur < P){ if(lest[5]>=P-cur){ num +=...
a.cc:54:5: error: redefinition of 'int main()' 54 | int main(){ | ^~~~ a.cc:41:5: note: 'int main()' previously defined here 41 | int main(){ | ^~~~
s745225871
p00614
C++
#include <iostream> #include <algorithm> using namespace std; int value[6] = {1, 5, 10, 50, 100, 500}; int ns[6]; int p; #define INF (1<<28) int count_coins(int n) { int cnt = 0; for (int i = 5; i >= 0; i--) { int c = n / value[i]; n -= c * value[i]; cnt += c; if (n == 0) b...
a.cc: In function 'int main()': a.cc:45:17: error: 'can_make' was not declared in this scope 45 | if (can_make(p+i)) { | ^~~~~~~~
s895425223
p00614
C++
#include <iostream> #include <vector> #include <set> #include <map> #include <queue> #include <sstream> #include <algorithm> #include <numeric> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <cstdlib> #include <cassert> &#160; #define rep(i,n) for(int i=0;i<n;i++) #define rp(i,c) rep(...
a.cc:15:2: error: stray '#' in program 15 | &#160; | ^ a.cc:23:2: error: stray '#' in program 23 | &#160; | ^ a.cc:25:2: error: stray '#' in program 25 | &#160; | ^ a.cc:31:2: error: stray '#' in program 31 | &#160; | ^ a.cc:34:2: error: stray '#' in program 34 | &#160; ...
s822801879
p00614
C++
#include <iostream> #include <cmath> #include <vector> #include <algorithm> using namespace std; enum Coin { N1 = 0, N5 = 1, N10 = 2, N50 = 3, N100 = 4, N500 = 5 }; int main_calc(int p, int* coins); int normalize(int &p, int* coins); int recursive_calc(int p, int* coins, int digit); void get_coin_names(Coin &c1, C...
a.cc:124:3: error: expected unqualified-id before 'if' 124 | if (digit == 3) { | ^~ a.cc:135:17: error: expected constructor, destructor, or type conversion before '(' token 135 | get_coin_names(c1, c5, digit); | ^ a.cc:136:12: error: 'coins' was not declared in this scope 136 | ...
s928914943
p00614
C++
#include <iostream> #include <cmath> #include <vector> #include <algorithm> using namespace std; enum Coin { N1 = 0, N5 = 1, N10 = 2, N50 = 3, N100 = 4, N500 = 5 }; int main_calc(int p, int* coins); int normalize(int &p, int* coins); int recursive_calc(int p, int* coins, int digit); void get_coin_names(Coin &c1, C...
a.cc:124:3: error: expected unqualified-id before 'if' 124 | if (digit == 3) { | ^~ a.cc:135:17: error: expected constructor, destructor, or type conversion before '(' token 135 | get_coin_names(c1, c5, digit); | ^ a.cc:136:12: error: 'coins' was not declared in this scope 136 | ...
s489135957
p00614
C++
#include <iostream> #include <cmath> #include <vector> #include <algorithm> using namespace std; enum Coin { N1 = 0, N5 = 1, N10 = 2, N50 = 3, N100 = 4, N500 = 5 }; int main_calc(int p, int* coins); int normalize(int &p, int* coins); int recursive_calc(int p, int* coins, int digit); void get_coin_names(Coin &c1, C...
a.cc:124:3: error: expected unqualified-id before 'if' 124 | if (digit == 3) { | ^~ a.cc:135:17: error: expected constructor, destructor, or type conversion before '(' token 135 | get_coin_names(c1, c5, digit); | ^ a.cc:136:12: error: 'coins' was not declared in this scope 136 | ...
s904538538
p00614
C++
#include <iostream> #include <cmath> #include <vector> #include <algorithm> using namespace std; enum Coin { N1 = 0, N5 = 1, N10 = 2, N50 = 3, N100 = 4, N500 = 5 }; int main_calc(int p, int* coins); int normalize(int &p, int* coins); int recursive_calc(int p, int* coins, int digit); void get_coin_names(Coin &c1, C...
a.cc: In function 'int recursive_calc(int, int*, int)': a.cc:134:34: error: 'v' was not declared in this scope 134 | for(int i = 0; i < digit; i++) v = v / 10; | ^ a.cc:136:3: error: 'v' was not declared in this scope 136 | v %= 10; | ^
s942472382
p00615
Java
package fill_nosubmit; import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; public class AOJ10_29 { public static void main(String[] args) { Scanner in=new Scanner(System.in); for(;;) { int n=in.nextInt(); int m=in.nextInt(); if((n|m)==0) return; int t=n+m; Ar...
Main.java:5: error: class AOJ10_29 is public, should be declared in a file named AOJ10_29.java public class AOJ10_29 ^ 1 error
s848585959
p00615
C
#include <stdio.h> int main(void) { int n, m, x, i, j, t[2000000]; while(1) { i=0; t[1999999]=0; x=0; scanf("%d %d", &n, &m); if(n == 0 && m == 0) break; for(i = 0; i < n+m; i++) { scanf("%d", &t[i]); } for(i = 0; i < m; i++) { scanf("%d", &tr[i]); }...
main.c: In function 'main': main.c:22:24: error: 'tr' undeclared (first use in this function); did you mean 't'? 22 | scanf("%d", &tr[i]); | ^~ | t main.c:22:24: note: each undeclared identifier is reported only once for each function it appears in
s734487898
p00615
C
#define _USE_MATH_DEFINES #define INF 100000000 #include <iostream> #include <sstream> #include <cmath> #include <cstdlib> #include <algorithm> #include <queue> #include <stack> #include <limits> #include <map> #include <string> #include <cstring> #include <set> #include <deque> #include <bitset> #include <list> using...
main.c:3:10: fatal error: iostream: No such file or directory 3 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s525139634
p00615
C++
#include<iostream> #include<string> #include<cmath> #include<vector> #include<stack> #include<queue> #include<algorithm> #include<complex> using namespace std ; typedef vector<int> vi ; typedef vector<vi> vvi ; typedef vector<string> vs ; typedef pair<int, int> pii; typedef long long ll ; #define loop(i,a,b) for(int...
a.cc: In function 'int main()': a.cc:26:20: error: 't' was not declared in this scope 26 | rep(i,n+m)cin>>t[i]; | ^ a.cc:27:5: error: 't' was not declared in this scope 27 | t[n+m]=0; | ^
s083005966
p00615
C++
#include <stdio.h> int main(){ int n, m, tl[10001], tr[10001], i, j, k, befor, maxnum; while(1){ scanf_s("%d %d", &n, &m); if(n==0 && m==0) break; for(i=0;i<n;i++){ scanf_s("%d", &tl[i]); } tl[i]=1000001; for(i=0;i<m;i++){ scanf_s("%d", &tr[i]); } tr[i]=1000001; ...
a.cc: In function 'int main()': a.cc:7:5: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 7 | scanf_s("%d %d", &n, &m); | ^~~~~~~ | scanf
s288509876
p00615
C++
/* Traffic Analysis */ #include <stdio.h> #include <iostream> #include <string.h> #include <stdlib.h> #include <vector> #include <algorithm> #define STRNUM 4096 #define DELIM " " #define CMAX 10000 void main( int argc, char *argv[] ) { // ?????¨?????°?????? char wStrA[STRNUM] = ""; char *tok; char *ctx; int n,...
a.cc:15:1: error: '::main' must return 'int' 15 | void main( int argc, char *argv[] ) | ^~~~ a.cc: In function 'int main(int, char**)': a.cc:27:16: error: 'gets_s' was not declared in this scope 27 | while( gets_s( wStrA, STRNUM ) != NULL ){ | ^~~~~~ a.cc:29:23: error: 'strtok_s...
s724268065
p00615
C++
/* Traffic Analysis */ #include <stdio.h> #include <iostream> #include <string.h> #include <stdlib.h> #include <vector> #include <algorithm> #define STRNUM 4096 #define DELIM " " #define CMAX 10000 int main( int argc, char *argv[] ) { // ?????¨?????°?????? char wStrA[STRNUM] = ""; char *tok; char *ctx; int n, ...
a.cc: In function 'int main(int, char**)': a.cc:27:16: error: 'gets_s' was not declared in this scope 27 | while( gets_s( wStrA, STRNUM ) != NULL ){ | ^~~~~~ a.cc:29:23: error: 'strtok_s' was not declared in this scope; did you mean 'strtok_r'? 29 | tok = strtok_s( wSt...
s466795566
p00615
C++
/* Traffic Analysis */ #include <stdio.h> #include <iostream> #include <string.h> #include <stdlib.h> #include <vector> #include <algorithm> #define STRNUM 4096 #define DELIM " " #define CMAX 10000 int main( int argc, char **argv ) { // ?????¨?????°?????? char wStrA[STRNUM] = ""; char *tok; char *ctx; int n, m...
a.cc: In function 'int main(int, char**)': a.cc:27:16: error: 'gets' was not declared in this scope; did you mean 'getw'? 27 | while( gets( wStrA, STRNUM ) != NULL ){ | ^~~~ | getw
s061817964
p00615
C++
using namespace std; #define MAX 10001 main(){ int n, m, L[MAX], R[MAX], C[MAX*2], i, j, k; while( cin >> n >> m ){ if ( n == 0 && m == 0 ) break; for ( i = 0; i < n; i++ ) cin >> L[i]; for ( i = 0; i < m; i++ ) cin >> R[i]; L[n] = R[m] = 1000001; i = j = k = 0; while( k < n + m ) { C[k++] = (L[i] ...
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:7:12: error: 'cin' was not declared in this scope 7 | while( cin >> n >> m ){ | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>...
s221310502
p00615
C++
#include<set> #include<iostream> int main(){int l,r;for(;;){std::cin>>l>>r;if(!(l+=r))break;set<int> p;int m;p.insert(0);for(r=0;r<l;r++)std::cin>>m,p.insert(m);set<int>::iterator a;for(a=p.begin(),m=0;a!=--p.end();++a)if(*(++a)-*(--a)>m)m=*(++a)-*(--a);std::cout<<m<<"\n";}}
a.cc: In function 'int main()': a.cc:3:60: error: 'set' was not declared in this scope 3 | int main(){int l,r;for(;;){std::cin>>l>>r;if(!(l+=r))break;set<int> p;int m;p.insert(0);for(r=0;r<l;r++)std::cin>>m,p.insert(m);set<int>::iterator a;for(a=p.begin(),m=0;a!=--p.end();++a)if(*(++a)-*(--a)>m)m=*(++a)-*(--a);std:...
s770493926
p00615
C++
#include<set> #include<iostream> int main(){int l,r;for(;;){std::cin>>l>>r;if(!(l+=r))break;std::set<int> p;int m;p.insert(0);for(r=0;r<l;r++)std::cin>>m,p.insert(m);std::set<int>::iteratorツ a;for(a=p.begin(),m=0;a!=--p.end();++a)if(*(++a)-*(--a)>m)m=*(++a)-*(--a);std::cout<<m<<"\n";}}
a.cc:3:149: error: extended character   is not valid in an identifier 3 | int main(){int l,r;for(;;){std::cin>>l>>r;if(!(l+=r))break;std::set<int> p;int m;p.insert(0);for(r=0;r<l;r++)std::cin>>m,p.insert(m);std::set<int>::iteratorツ a;for(a=p.begin(),m=0;a!=--p.end();++a)if(*(++a)-*(--a)>m)m=*(++a)-*(--a);std::cout<...
s778426670
p00615
C++
#include<iostream> using namespace std; int main(void){ int n,m,max,i,x; while(1){ cin >> n >> m; for(i=0;i<n+m;i++){ cin >> x; max= (i==0)?x:(max<x-max)?x-max:; } cout << max << endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:39: error: expected primary-expression before ';' token 12 | max= (i==0)?x:(max<x-max)?x-max:; | ^
s202760599
p00615
C++
#include <iostream> using namespace std; int max(int a, int b) { if( a > b ) return a; else return b; } int main() { int n, m, i, j, k; int out; int tl[100]; int tr[100]; int tmerge[200]; while( cin >> n >> m , (n||m) ) { memset( tl, 0, sizeof(tl)); memset( tr, 0, sizeof(tr)); memset( tmerge, 0,...
a.cc: In function 'int main()': a.cc:23:17: error: 'memset' was not declared in this scope 23 | memset( tl, 0, sizeof(tl)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +...
s010452948
p00615
C++
#include <iostream> using namespace std; int max(int a, int b) { if( a > b ) return a; else return b; } int main() { int n, m, i, j, k; int out; int tl[10000]; int tr[10000]; int tmerge[20000]; while( cin >> n >> m , (n||m) ) { memset( tl, 0, sizeof(tl)); memset( tr, 0, sizeof(tr)); memset( tmer...
a.cc: In function 'int main()': a.cc:23:17: error: 'memset' was not declared in this scope 23 | memset( tl, 0, sizeof(tl)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +...
s836257872
p00615
C++
#import<cstdio> #import<algorithm> int main(){ for(int n,m,f,i;scanf("%d%d",&n,&m),n|m;printf("%d\n",f)){ int a[200010]={0}; for(i=0;i<n+m;i++) scanf("%d"a+i); std::sort(a,a+n+m+1); f=0; for(i=1;i<n+m+1;i++) f=max(f,a[i]+a[i-1]); } }
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:2:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 2 | #import<algorithm> | ^~~~~~ a.cc: In function 'int main()': a.cc:7:31: error: unable to find string literal operator 'ope...
s165703231
p00615
C++
#import<cstdio> #import<algorithm> int main(){ for(int n,m,f,i;scanf("%d%d",&n,&m),n|m;printf("%d\n",f)){ int a[200010]={0}; for(i=0;i<n+m;i++) scanf("%d"a+i); std::sort(a,a+n+m+1); f=0; for(i=1;i<n+m+1;i++) f=std::max(f,a[i]+a[i-1]); } }
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<cstdio> | ^~~~~~ a.cc:2:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 2 | #import<algorithm> | ^~~~~~ a.cc: In function 'int main()': a.cc:7:31: error: unable to find string literal operator 'ope...
s536748205
p00615
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n, m; while(scanf("%d%d",&n, &m, (n | m)){ int N = n+m, arr[N]; for(int i = 0 ; i < N ; i++){ scanf("%d" ,arr+i); } sort(arr, arr+N); int max = arr[0]; for(int i = 0 ; i < N ; i++){ max = std::max(max, arr[i] -...
a.cc: In function 'int main()': a.cc:8:38: error: expected ')' before '{' token 8 | while(scanf("%d%d",&n, &m, (n | m)){ | ~ ^ | )
s711413369
p00616
Java
gimport java.io.*; import java.util.*; class Cube { int x, y, z; Cube(int x, int y, int z) { this.x = x; this.y = y; this.z = z; } @Override public boolean equals(Object obj) { Cube o = (Cube)obj; return x == o.x && y == o.y && z == o.z; } @Override ...
Main.java:1: error: class, interface, enum, or record expected gimport java.io.*; ^ Main.java:2: error: class, interface, enum, or record expected import java.util.*; ^ 2 errors
s754659522
p00616
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main{ public static void main(String args[]){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try { while(true){ String strs[] = br.readLine().split(" "); int n = Integer.parseIn...
Main.java:47: error: reached end of file while parsing } ^ 1 error
s304444833
p00616
Java
import java.io.*; import java.util.*; public class p1030yet { public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try { String line; /* input */ while(true){ line = br.readLine(); ...
Main.java:4: error: class p1030yet is public, should be declared in a file named p1030yet.java public class p1030yet { ^ 1 error
s560871496
p00616
C
#include <stdio.h> #include <string.h> int main(void)[ while(1){ int n, h, a, b, i, j, k; int cube[500][500][500] = {0}; char c[3]; long count = 0; scanf("%d %d", &n, &h); if(n==0 && h==0) break; for(i=0; i<h; i++) { scanf(" %s %d %d", c, &a, &b); if(strcmp(c, "xy")==0){ for(i=0; i<n; i...
main.c:6:9: error: expected expression before 'while' 6 | while(1){ | ^~~~~
s710479707
p00616
C++
#include<iostream> #include<cstdio> #include<string> #include<vector> #include<algorithm> #include<queue> #include<set> #include<unordered_map> using namespace std; bool a[500][500][500]; signed main() { memset(a, -1, sizeof(a)); }
a.cc: In function 'int main()': a.cc:13:9: error: 'memset' was not declared in this scope 13 | memset(a, -1, sizeof(a)); | ^~~~~~ a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 8 | #include<unordered_map> +++ |+#include <...
s111376360
p00616
C++
#include <iostream> #include <cstdio> using namespace std; bool cube[500][500][500]; int main() { int N, H; while (cin >> N >> H) { memset(cube, false, sizeof cube); if (N == 0 && H == 0) {break;} for (int i = 0; i < H; i++) { string s; int x, y; cin >> s >> x >> y; x--, ...
a.cc: In function 'int main()': a.cc:12:5: error: 'memset' was not declared in this scope 12 | memset(cube, false, sizeof cube); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio> +++ |+#include <cstrin...
s358292957
p00616
C++
#include <iostream> #include <string> using namespace std; void check(int a,int b,int c,int hole[], int& count) { bool f=false; point = a*1000000 + b *1000 + c; for(int i=0; i < count; i++){ if(hole[i] == point){ f=true; break; } } if(!f){ hole[count++] = point; } } int main(void){ int n,h; while...
a.cc: In function 'void check(int, int, int, int*, int&)': a.cc:7:9: error: 'point' was not declared in this scope 7 | point = a*1000000 + b *1000 + c; | ^~~~~
s108153209
p00616
C++
#include <iostream> #include <set> #include <string> using namespace std; struct P{ int x,y,z; }; int main(){ int n,h,a,b; string str; while( cin >> n >> h , n||h ){ set<struct P> s; for(int i= 0 ;i < h ; i++ ){ cin >> str >> a >> b; if( str == "xy" ){ for(int z=0 ; z < n ; z++ ){ struct P...
In file included from /usr/include/c++/14/string:49, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s696166766
p00616
C++
#include <iostream> #include <string> #include <set> using namespace std; typedef struct xyz { int x; int y; int z; }pos; int main () { int n, h, a, b; string c; set<pos> s; pos p; while( cin >> n >> h, (n||h) ) { for( int i = 0; i < h; i++) { cin >> c; cin >> a; cin >> b; if( ...
In file included from /usr/include/c++/14/string:49, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/includ...
s699128942
p00616
C++
#include <iostream> #include <stdio.h> const int nmax = 500; const int hmax = 200; using namespace std; int main(void){ int n,h; /* bool*** box = new bool**[nmax]; for(int i=0;i<nmax;++i){ box[i] = new bool*[nmax]; for(int j=0;j<nmax;++j){ box[i][j] = new bool[nmax]; } } */ while(cin >> n >> h){ //...
a.cc: In function 'int main()': a.cc:75:46: error: no match for 'operator+=' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 75 | cout += box[i][j][k]; | ~~~~~^~~~~~~~~~~~~~~ a.cc:80:25: error: 'count'...
s029422002
p00616
C++
#include <iostream> #include <stdio.h> const int nmax = 500; const int hmax = 200; using namespace std; int main(void){ int n,h; /* bool*** box = new bool**[nmax]; for(int i=0;i<nmax;++i){ box[i] = new bool*[nmax]; for(int j=0;j<nmax;++j){ box[i][j] = new bool[nmax]; } } */ while(cin >> n >> h){ //cout ...
a.cc: In function 'int main()': a.cc:75:46: error: no match for 'operator+=' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 75 | cout += box[i][j][k]; | ~~~~~^~~~~~~~~~~~~~~
s405687206
p00617
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Stack; public class Main { static Main main = new P1031(); public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamR...
Main.java:10: error: cannot find symbol static Main main = new P1031(); ^ symbol: class P1031 location: class Main Main.java:39: error: package P1031 does not exist Stack<Panel> stack = new Stack<P1031.Panel>(); ^ 2 errors
s598107057
p00617
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Stack; public class Main { static Main main = new Main(); public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamRe...
Main.java:39: error: package P1031 does not exist Stack<Panel> stack = new Stack<P1031.Panel>(); ^ 1 error
s787708241
p00617
C++
#include<bits/stdc++.h> using namespace std; typedef string::const_iterator Cursol; typedef pair< int, int > Pi; typedef pair< Pi, Pi > Piii; struct Data{ string name; Piii p; vector< Data > foo; }; bool inPosition(const int& x, const int& y, const Data& data){ Piii p = data.p; return (p.first.first <= x &...
a.cc: In function 'std::pair<std::__cxx11::basic_string<char>, int> solve(int, int, const Data&)': a.cc:42:5: error: 'flag' was not declared in this scope 42 | flag = false; | ^~~~ a.cc: At global scope: a.cc:51:2: error: expected unqualified-id before '/' token 51 | */ | ^ a.cc:53:1: error: ...
s803125873
p00617
C++
#include <iostream> #include <string> #include <utility> using namespace std; typedef tuple<int,int,int,int> T; typedef pair<string,T> P; string str; int p; P TagStruct(); string OpenTag(); string CloseTag(); string TagName(); T TagValue(); P TagStruct() { string op = OpenTag(); T t = TagValue(); while (str[p]...
a.cc: In function 'P TagStruct()': a.cc:21:5: error: expected primary-expression before ':' token 21 | :w | ^ a.cc:21:7: error: expected '}' at end of input 21 | :w | ^ a.cc:20:45: note: to match this '{' 20 | while (str[p] == '<' and str[p+1] != '/') { | ...
s149079897
p00617
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:160:10: error: 'shared_ptr' was not declared in this scope 160 | vector<shared_ptr<xml>> children; | ^~~~~~~~~~ a.cc:22:1: note: 'std::shared_ptr' is defined in header '<memory>'; this is probably fixable by adding '#include <memory>' 21 | #include <fstream> +++ |+#include <memory> 22 | ...
s661873697
p00617
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:160:10: error: 'shared_ptr' was not declared in this scope 160 | vector<shared_ptr<xml>> children; | ^~~~~~~~~~ a.cc:22:1: note: 'std::shared_ptr' is defined in header '<memory>'; this is probably fixable by adding '#include <memory>' 21 | #include <fstream> +++ |+#include <memory> 22 | ...
s436044914
p00617
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:155:10: error: 'shared_ptr' was not declared in this scope 155 | vector<shared_ptr<ast>> children; \ | ^~~~~~~~~~ a.cc:199:1: note: in expansion of macro 'DEF_PARSER' 199 | DEF_PARSER(xml, | ^~~~~~~~~~ a.cc:22:1: note: 'std::shared_ptr' is defined in header '<memory>'; this is probably f...
s417579231
p00617
C++
#include <stdio.h> #include <list> using namespace std; class Window{ public: ~Window() { list<class Window*>::iterator it; for (it = child.begin(); it != child.end(); it++){ delete (*it); } } Window* Click(int x, int y) { Window *ret; list<class Window*>::iterator it; ret = this; if (isCl...
a.cc: In function 'Window* input(char*)': a.cc:58:17: error: 'isdigit' was not declared in this scope 58 | while (!isdigit(*tag)) tag++; | ^~~~~~~ a.cc:59:22: error: 'atoi' was not declared in this scope 59 | Parent->sx = atoi(tag); | ^~~~ a.cc:60:1...
s919684662
p00617
C++
#include <stdio.h> #include <stdlib.h> #include <list> using namespace std; class Window{ public: ~Window() { list<class Window*>::iterator it; for (it = child.begin(); it != child.end(); it++){ delete (*it); } } Window* Click(int x, int y) { Window *ret; list<class Window*>::iterator it; re...
a.cc: In function 'Window* input(char*)': a.cc:59:17: error: 'isdigit' was not declared in this scope 59 | while (!isdigit(*tag)) tag++; | ^~~~~~~ a.cc:61:16: error: 'isdigit' was not declared in this scope 61 | while (isdigit(*tag)) tag++; | ^~~~~~~ a.cc...
s005957303
p00617
C++
#define _USE_MATH_DEFINES #include <iostream> #include <memory> #include <memory.h> #include <fstream> #include <cmath> #include <numeric> #include <vector> #include <stack> #include <string> #include <queue> #include <sstream> #include <cstdlib> #include <cassert> #include <cstdio> #include <cstring> #include <map> #i...
a.cc:46:11: error: 'int y1 [200]' redeclared as different kind of entity 46 | int y1[200]; | ^ In file included from /usr/include/features.h:523, from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config....
s261289294
p00618
C
#include<stdio.h> int cnt(int n){ int ret = 0; while(n){ ret++; n ^= (n & (-n)); } return ret; } int main(){ int c[20],k[20],r[20][20]; int n,u; int i,j,l; while(scanf("%d%d",&n,&u), n+u){ int ans = n; for(i=0; i<n; i++){ scanf("%d%d",&c[i],&k[i]); for(j=0; j<k[i]; j++) sc...
main.c:43:5: error: redefinition of 'cnt' 43 | int cnt(int n){ | ^~~ main.c:3:5: note: previous definition of 'cnt' with type 'int(int)' 3 | int cnt(int n){ | ^~~ main.c:52:5: error: redefinition of 'main' 52 | int main(){ | ^~~~ main.c:12:5: note: previous definition of 'main' w...