submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s800830534
p00731
C++
#include <iostream> #include <queue> using namespace std; typedef long long ll; typedef pair<ll, ll> P; const ll MAX = 1LL << 50; ll h, w; ll a[30][50]; char b[30][50]; ll minr[30][50];//????????°???????°???? ll minl[30][50];//????????°???????°???? int dx[] = {1, 1, 1, 1, 1, 2, 2, 2, 3}; int dy[] = {2, 1, 0, -1, -2...
/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
s728311829
p00731
C++
#include <iostream> #include <queue> using namespace std; typedef long long ll; typedef pair<ll, ll> P; const ll MAX = 1LL << 50; ll h, w; ll a[30][50]; char b[30][50]; ll minr[30][50];//????????°???????°???? ll minl[30][50];//????????°???????°???? int dx[] = {1, 1, 1, 1, 1, 2, 2, 2, 3}; int dy[] = {2, 1, 0, -1, -2...
/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
s320278572
p00731
C++
#include <iostream> #include <queue> #include <functional> constexpr int CANT_GO = 114514; int field[60][30] = {0}; int dp[2][60][30][5][3] = { 0 }; //[?¬???????][??????y][x][?????????y][x] = cost int dx[] = {1, 1, 1, 1, 1, 2, 2, 2, 3}; int dy[] = {2, 1, 0, -1, -2, 1, 0, -1, 0}; struct Node { int x, y; int rx, ry...
a.cc: In function 'int main()': a.cc:25:22: error: 'memset' is not a member of 'std'; did you mean 'wmemset'? 25 | std::memset(dp, 0x7f, sizeof(int) * 2 * 60 * 30 * 5 * 3); | ^~~~~~ | wmemset
s723188773
p00731
C++
#include <bits/stdc++.h> using namespace std; int xv[]={1,1,1,1,1,2,2,2,3},yv[]={2,1,0,-1,-2,1,0,-1,0}; void solve(int w,int h){ char in; bool l; int r,c; stack<pair<bool,pair<int,int>>> q; pair<int,int> n; vector<vector<int>> mp=vector<vector<int>>(h+4,vector<int>(w+6,-1)); vector<vector<v...
a.cc: In function 'void solve(int, int)': a.cc:38:16: error: invalid use of 'void' 38 | l=q.pop().first;n=q.front().second;q.pop(); | ~~~~~^~ a.cc:38:29: error: 'class std::stack<std::pair<bool, std::pair<int, int> > >' has no member named 'front' 38 | l=q.pop().first;n=q.front().s...
s797558450
p00731
C++
#include <cstdio> #include <queue> using namespace std; int W, H; char board[100][100]; int dist[100][100][2]; const int INF = 1 << 28; const int LEFT = 0; const int RIGHT = 1; const int dx[][9] = {{0, 0, 0, 1, 1, 2, -1, -1, -2}, {0, 0, 0, 1, 1, 2, -1, -1, -2}}; const int dy[][9] = {{1, 2, 3, 1, 2, 1, 1, 2, 1}, {-1,...
a.cc: In function 'void solve()': a.cc:47:28: error: 'isdigit' was not declared in this scope 47 | bool t_or_s = !isdigit(board[nx][ny]); | ^~~~~~~
s057794666
p00731
C++
#include <iostream> #include <queue> using namespace std; const int INF = 999999; class Node{ public: int x, y, foot, cost; Node(int x, int y, int foot, int cost) : x(x), y(y), foot(foot), cost(cost) {} bool operator < (const Node &n) const { return cost > n.cost; } }; int main(){ int w, h; char b[60][30]; bo...
a.cc: In function 'int main()': a.cc:24:17: error: 'memset' was not declared in this scope 24 | memset(visit, false, sizeof(visit)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <queu...
s668819811
p00731
C++
#include <iostream> #include <string> #include <queue> #include <utility> #include <cstdlib> using namespace std; struct Node { int step, s, x, y; }; struct NodeComparator { bool operator()(const Node &a, const Node &b) const { return a.step > b.step; } }; int memo[2][64][34]; ...
a.cc: In function 'int main()': a.cc:28:17: error: 'memset' was not declared in this scope 28 | memset(field, -1, sizeof(field)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <cstdlib...
s280896135
p00731
C++
#include<iostream> #define INF 100000000 #include<algorithm> #include<queue> #include<map> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; struct pla{ int lx,ly,rx,ry,nowc; pla(){} pla(int lx,int ly,int rx,int ry,int nowc): lx(lx),ly(ly),rx(rx),ry(ry),nowc(nowc){} operator<(const pla &x)const{ return ...
a.cc:13:9: error: ISO C++ forbids declaration of 'operator<' with no type [-fpermissive] 13 | operator<(const pla &x)const{ | ^~~~~~~~
s198082329
p00731
C++
#include<iostream> #include<vector> #include<string> #include<queue> using namespace std; int W,H; struct Node{ int x,y,cost,dir; Node(int p_x,int p_y,int p_c,int p_dir){ x=p_x;y=p_y;dir=p_dir;cost=p_c; } }; bool operator < (Node a,Node b){ return a.cost>b.cost; }; bool in(int x,int y){ if(x<0 || y<0 || x>=W ...
a.cc: In function 'int solve()': a.cc:41:9: error: 'memset' was not declared in this scope 41 | memset(cost,-1,sizeof(cost)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<queue> +++ |+#include <cst...
s804426493
p00731
C++
#include <algorithm> #include <queue> #include <cstdio> #include <vector> using namespace std; #define reps(i,f,n) for(int i=f; i<int(n); ++i) #define rep(i,n) reps(i,0,n) typedef vector<int> vi; typedef vector<vi> vvi; const int INF = 1001001001; struct Data { int ry, rx, ly, lx; int cost; bool nextr; Data(int...
a.cc: In function 'int main()': a.cc:91:52: error: 'isdigit' was not declared in this scope 91 | int pc = d.cost + (isdigit(c) ? c-'0' : 0); | ^~~~~~~
s968096940
p00731
C++
#include <cctype> #include <cstdio> #include <queue> #include <vector> #include <functional> #define INF 100000000 using namespace std; typedef pair<int,int> P; class Node{ public: Node(int x, int y, int f):x(x),y(y),f(f){} int x,y,f; int tonum(){return (x<<7)+(y<<1)+f;} }; Node tonode(int num){ return Node(...
a.cc: In function 'int main()': a.cc:81:11: error: 'assert' was not declared in this scope 81 | assert('0' < c && c <= '9'); | ^~~~~~ a.cc:6:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 5 | #include <functional> +++ |+#inc...
s280658040
p00732
C++
#include <cmath> #include <cstdlib> #include <iostream> #include <vector> using namespace std; template<class T> inline void chmax(T &a, const T &b) { if(b > a) a = b; } template<class T> inline void chmin(T &a, const T &b) { if(b < a) a = b; } #define REP(i, a, b) for(int i = (a); i < (int)(b); ++i) #define rep(i, n...
a.cc: In function 'point crosspoint(const segment&, const segment&)': a.cc:141:43: error: 'INT_MAX' was not declared in this scope 141 | if(!intersect(s, t)) return point(INT_MAX, INT_MAX); | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; th...
s386520920
p00732
C++
#include<cstdio> #include<cmath> #include<utility> #include<vector> #include<complex> #include<algorithm> using namespace std; typedef long double Real; typedef complex<Real> Point; typedef complex<Real> Vector; typedef pair<Point,Point> Line; typedef pair<Point,Point> Segment; typedef vector<Point> Polygon; cons...
a.cc: In function 'Point iLL(Line, Line)': a.cc:250:22: error: no match for 'operator*' (operand types are 'std::complex<long double>' and 'double') 250 | return b1+(b2-b1)*(num/den); | ~~~~~~~^~~~~~~~~~ | | | | | double | ...
s410997834
p00733
C++
#include<iostream> #include<string> #include<set> #include<iterator> #include<algorithm> #include<vector> using namespace std; typedef basic_string<bool> BS; const BS T=BS(1,true); const BS F=BS(1,false); char str[999]; char *p; struct Cell{ Cell *l,*r; BS bs; set<BS> sbs; int num,den; Cell():l(),r(),num(...
a.cc:83:2: error: expected '}' at end of input 83 | } | ^ a.cc:17:12: note: to match this '{' 17 | struct Cell{ | ^ a.cc: In member function 'void Cell::print(bool)': a.cc:69:3: error: no match for 'operator~' (operand type is 'Cell') 69 | ~Cell(){ | ^~~~~~~ In file included f...
s847477262
p00733
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; struct Node{ Node* l; Node* r; double R; string s; set<string> set; Node() : l(nullptr), r(nullptr){} }; int c; int N; string s; map<pair<Node*, Node*>, int> compm; // X????????????????§°??§????????? -1 // ?????? 0 // Y????????????????§°??§???...
a.cc:10:21: error: declaration of 'std::set<std::__cxx11::basic_string<char> > Node::set' changes meaning of 'set' [-Wchanges-meaning] 10 | set<string> set; | ^~~ a.cc:10:9: note: used here to mean 'class std::set<std::__cxx11::basic_string<char> >' 10 | set<string> set; ...
s330652182
p00733
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; #define REP(i,b,n) for(int i=b;i<n;i++) #define rep(i,n) REP(i,0,n) #define LEFT false #define RIGHT true class Tree{ public: Tree *l,*r; double similar; Tree():l(NULL),r(NULL),similar(0){}; //function for arrangement symmetry bo...
a.cc: In function 'void parse(std::string&, int&, Tree&)': a.cc:117:3: error: 'assert' was not declared in this scope 117 | assert(a[p] ==' '); | ^~~~~~ a.cc:4:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 3 | #include<algorithm> +++ |+#inc...
s529665800
p00733
C++
#include <vector> #include <utility> #include <string> #include <iostream> #include <algorithm> using namespace std; #define TEST 0 struct tree { tree *l,*r; tree():l(0),r(0){} tree(tree* l,tree* r):l(l),r(r){} bool isLeaf()const{return l==(tree*)0;} string toString()const { if(this->isLeaf())return "x"; ...
a.cc: In function 'void adjust(tree*, bool, bool)': a.cc:133:18: error: '\U0000ff10' was not declared in this scope 133 | if(TEST |0) | ^~
s918559767
p00734
Java
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { while(true) { Scanner stdIn = new Scanner(System.in); int n = stdIn.nextInt(); int m = stdIn.nextInt(); if(n==0 && m==0) { break; } int[] tarou = new int[n]; int[] h...
Main.java:27: error: cannot find symbol Arrays.fill(hantei[i],false); ^ symbol: variable hantei location: class Main 1 error
s757268103
p00734
Java
import java.util.Scanner; import jdk.internal.org.objectweb.asm.tree.IntInsnNode; public class Main { void run() { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt(); int m = sc.nextInt(); int tsum = 0; int hsum = 0; int anst = 0; int ansh = 0; int min = 200; ...
Main.java:5: error: package jdk.internal.org.objectweb.asm.tree is not visible import jdk.internal.org.objectweb.asm.tree.IntInsnNode; ^ (package jdk.internal.org.objectweb.asm.tree is declared in module java.base, which does not export it to the unnamed module) 1 error
s713124903
p00734
Java
import java.util.Scanner; import jdk.internal.org.objectweb.asm.tree.IntInsnNode; public class Main { void run() { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt(); int m = sc.nextInt(); int tsum = 0; int hsum = 0; int anst = 0; int ansh = 0; int min = 200; ...
Main.java:5: error: package jdk.internal.org.objectweb.asm.tree is not visible import jdk.internal.org.objectweb.asm.tree.IntInsnNode; ^ (package jdk.internal.org.objectweb.asm.tree is declared in module java.base, which does not export it to the unnamed module) 1 error
s780061643
p00734
Java
import java.util.Scanner; import jdk.internal.org.objectweb.asm.tree.IntInsnNode; public class Main { void run() { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt(); int m = sc.nextInt(); int tsum = 0; int hsum = 0; int anst = 0; int ansh = 0; int min = 200; ...
Main.java:5: error: package jdk.internal.org.objectweb.asm.tree is not visible import jdk.internal.org.objectweb.asm.tree.IntInsnNode; ^ (package jdk.internal.org.objectweb.asm.tree is declared in module java.base, which does not export it to the unnamed module) 1 error
s072499550
p00734
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigDecimal; import java.math.BigInteger; public cl...
Main.java:36: error: not a statement total+-b[i]; ^ 1 error
s578338987
p00734
Java
import java.io.InputStream; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigDecimal; import java.math.BigInteger; public cl...
Main.java:32: error: ';' expected int aa=total ^ 1 error
s948517817
p00734
Java
import java.io.*; import java.util.*; import java.math.*; public class A { public void run(){ Scanner sc = new Scanner(System.in); for(;;){ int n = sc.nextInt(); int m = sc.nextInt(); int taro []= new int[n]; int hana [] = new int [m]; int tsum = 0; int hsum = 0; for(int i = 0 ; i < n ; i...
Main.java:5: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s335562431
p00734
Java
import java.*; import java.io.*; import java.util.*; public class Myon { public static void main(String args[]) throws Exception{ new Myon().run(); } public void run() { Scanner cin=new Scanner(System.in); while(true){ int a,b; a = cin.nextInt(); b = cin.nextInt(); if(a==0 && b==0) return; ...
Main.java:5: error: class Myon is public, should be declared in a file named Myon.java public class Myon ^ Main.java:1: error: package java does not exist import java.*; ^ 2 errors
s243830325
p00734
Java
import java.util.*; public class AOJ_1153{ void run(){ Scanner sc = new Scanner(System.in); while(true){ int n = sc.nextInt(); int m = sc.nextInt(); if( n == 0 && m == 0){ break; } int[] taro = new int[n]; int[]...
Main.java:3: error: class AOJ_1153 is public, should be declared in a file named AOJ_1153.java public class AOJ_1153{ ^ 1 error
s013836841
p00734
Java
import java.util.Scanner; public class EqualTotaolScore { public static void main(String[] args) { Scanner s = new Scanner(System.in); while (true) { int n = s.nextInt(); int m = s.nextInt(); if (n == 0 && m == 0) break; int[] taro = new int[n]; int[] hana = new int[m]; int sumt = 0; ...
Main.java:3: error: class EqualTotaolScore is public, should be declared in a file named EqualTotaolScore.java public class EqualTotaolScore { ^ 1 error
s021554262
p00734
C
2 2 1 5 3 7 6 5 3 9 5 2 3 3 12 2 7 3 5 4 5 10 0 3 8 1 9 6 0 6 7 4 1 1 2 1 2 1 4 2 3 4 3 2 3 1 1 2 2 2 0 0
main.c:1:1: error: expected identifier or '(' before numeric constant 1 | 2 2 | ^
s205918496
p00734
C
#include <stdio.h> #include <stdlib.h> int main(void) { int n,m; int i,j; int tarou[100]; int hanako[100]; int tarou_sum = 0,hanako_sum = 0; int sa; int ok = 0; int min_tarou = 999,min_hanako = 999; int min = 999; int hen = 0; while(1){ scanf("%d %d",&m,&n); ok = 0;min_tarou =999;min_hanako = 999; min...
main.c: In function 'main': main.c:41:75: error: lvalue required as left operand of assignment 41 | if(abs(tarou[i] - hanako[j]) == sa && min = tarou[i] + hanako[j] < min){ | ^
s771241993
p00734
C
#include<stdio.h> int main() { int n,x[400],y[400],i,m,j,x1,y1,l,t; char d,N,E,S,W; while(1){ x1=10; y1=10; t=0; scanf("%d",&n); if(n==0)break; for(i=0;i<n;i++){ scanf("%d%d",&x[i],&y[i]); } scanf("%d",m); for(j=0;j<m;j++){ scanf("%c %d",&d,&l); if(d==N){y1=y1...
main.c: In function 'main': main.c:30:3: error: expected declaration or statement at end of input 30 | return 0; | ^~~~~~
s866603567
p00734
C
#include<stdio.h> #include<stdlib.h> int main(void) { int n,m,i,sum,sum1,sum2,d; int ansa,ansb; int a[100]; int b[100]; while(scanf("%d%d",&n,&m),n+m){ sum=0; min=0; for(i=0;i<n;i++){ scanf("%d",&a[i]); sum1+=a[i]; } for(i=0;i<m;i++){ scanf("%d",&b[i]); sum2+=b[i]; } sum=sum1+sum2; if(sum%2){ printf("-1\n"); } els...
main.c: In function 'main': main.c:14:1: error: 'min' undeclared (first use in this function); did you mean 'main'? 14 | min=0; | ^~~ | main main.c:14:1: note: each undeclared identifier is reported only once for each function it appears in main.c:31:5: error: 'j' undeclared (first use in this function) ...
s045002795
p00734
C
#include<stdio.h> int main(void) { int n,m; int a[100]; int b[100]; int c[100]; int i,j,k=0; int sum1=0,sum2=0; int x,y; int dec; int u1[100]; int u2[100]; int u3[100]; int min,mini; int l=0; while(1){ scanf("%d %d", &n, &m); if(n==0 && m==0)break; for(i=0;i<n,i++){ scanf(...
main.c: In function 'main': main.c:21:20: error: expected ';' before ')' token 21 | for(i=0;i<n,i++){ | ^ | ; main.c:29:5: error: 'u' undeclared (first use in this function) 29 | u=0; | ^ main.c:29:5: note: each undeclared identifier is reported ...
s052272157
p00734
C
#include <stdio.h> int main(void){ while(1){ int n,m; scanf("%d%d",&n,&m); if(n==0&&m==0) break; int Taro[100]={0},hanako[100]={0}; int sum[3]={200,200,200},sumtaro=0,sumhanako=0,i...
main.c: In function 'main': main.c:17:96: error: expected ';' before '{' token 17 | if(sumtaro-Taro[i]+hanako[o]==sumhanako+Taro[i]-hanako[o]) 18 { | ...
s851049071
p00734
C
#include<iostream> using namespace std; int sum(int[] ,int ); int main(void){ int n,m,sub,flag,cnum1,cnum2,i,j; scanf("%d%d",&n,&m); int a[n],b[m]; while( (n==0&&m==0) != 1 ){ for(i=0;i<n;i++) scanf("%d",&a[i]); for(j=0;j<m;j++) scanf("%d",&b[j]); sub = sum(a,n) - sum(b,m); flag=0; ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s466024475
p00734
C
#include<iostream> using namespace std; int sum(int[] ,int ); int main(void){ int n,m,sub,flag,cnum1,cnum2,i,j; scanf("%d%d",&n,&m); int a[n],b[m]; while( (n==0&&m==0) != 1 ){ for(i=0;i<n;i++) scanf("%d",&a[i]); for(j=0;j<m;j++) scanf("%d",&b[j]); sub = sum(a,n) - sum(b,m); flag=0; ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s811741382
p00734
C
#include<iostream.h> using namespace std; int sum(int[] ,int ); int main(void){ int n,m,sub,flag,cnum1,cnum2,i,j; scanf("%d%d",&n,&m); int a[n],b[m]; while( (n==0&&m==0) != 1 ){ for(i=0;i<n;i++) scanf("%d",&a[i]); for(j=0;j<m;j++) scanf("%d",&b[j]); sub = sum(a,n) - sum(b,m); flag=0; ...
main.c:1:9: fatal error: iostream.h: No such file or directory 1 | #include<iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s810426421
p00734
C
#include<iostream> using namespace std; int sum(int[] ,int ); int main(void){ int n,m,sub,flag,cnum1,cnum2,i,j; scanf("%d%d",&n,&m); int a[n],b[m]; while( (n==0&&m==0) != 1 ){ for(i=0;i<n;i++) scanf("%d",&a[i]); for(j=0;j<m;j++) scanf("%d",&b[j]); sub = sum(a,n) - sum(b,m); flag=0; ...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s383521825
p00734
C
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(void){ int n,m,in,sumt,sumh; vector<int>taro,hanako; while(cin >> n >> m,n|m){ taro.clear(); hanako.clear(); sumt=0; sumh=0; for(int i=0;i<n;i++){ cin >> in; sumt+=in; taro.push_back(i...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s665388840
p00734
C
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <queue> #include <stack> #include <string> #include <map> #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #define rep(i, n) for(int i = 0; i < n; i ++) #define ALL(T) T.begin(), T.end() #define mp make_pair #def...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s730463367
p00734
C
#include<iostream> #include<stdlib.h> #include<math.h> using namespace std ; int main(){ int a[100]={} , b[100]={} ; int n , m , rem ; int x , y , max ; while(1){ cin >> n >> m ; if( n==0 && m==0 ) break; int sum[2] = {} ; for( int i=0 ; i<n ; i++ ){ cin >> a[i] ; sum[0] += a[i] ; } for...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s472020955
p00734
C++
2 2 1 5 3 7 6 5 3 9 5 2 3 3 12 2 7 3 5 4 5 10 0 3 8 1 9 6 0 6 7 4 1 1 2 1 2 1 4 2 3 4 3 2 3 1 1 2 2 2 0 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 2 | ^
s807018558
p00734
C++
#include<iostream> #include<cstdlib> using namespace std; int main(){ int t_num, h_num, sw_taro = 101, sw_hana = 101; int t_tot = 0, h_tot = 0, tmp, taro[100], hana[100]; bool found = false; while (true){ memset(taro, 0, sizeof(taro)); memset(hana, 0, sizeof(hana)); cin >> t_num >> h_num; if (t_num == 0) ...
a.cc: In function 'int main()': a.cc:11:17: error: 'memset' was not declared in this scope 11 | memset(taro, 0, sizeof(taro)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<cstdlib> ...
s707581253
p00734
C++
#include <iostream> #include <vector> #include <numeric> #include <algorithm> using namespace std; #define REP(i,n) for(int i=0;i<(int)(n);++i) #define ALL(a) (a).begin(),(a).end() #define EXIST(s,e) ((s).find(e)!=(s).end()) #define SORT(c) sort((c).begin(),(c).end()) int main() { int n, m; while (cin >> n >...
a.cc: In function 'int main()': a.cc:27:28: error: 'INT_MAX' was not declared in this scope 27 | pair<int, int> ans(INT_MAX, INT_MAX); | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 4 | #includ...
s669149177
p00734
C++
#include <iostream> #include <vector> #include <numeric> #include <algorithm> using namespace std; #define REP(i,n) for(int i=0;i<(int)(n);++i) #define ALL(a) (a).begin(),(a).end() #define EXIST(s,e) ((s).find(e)!=(s).end()) #define SORT(c) sort((c).begin(),(c).end()) int main() { int n, m; while (cin >> n >...
a.cc: In function 'int main()': a.cc:27:28: error: 'INT_MAX' was not declared in this scope 27 | pair<int, int> ans(INT_MAX, INT_MAX); | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 4 | #includ...
s350112479
p00734
C++
2 2 1 5 3 7 6 5 3 9 5 2 3 3 12 2 7 3 5 4 5 10 0 3 8 1 9 6 0 6 7 4 1 1 2 1 2 1 4 2 3 4 3 2 3 1 1 2 2 2 0 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 2 | ^
s940595091
p00734
C++
#include <iostream> #include <vector> #define rep(i,a) for(int i = 0 ; i < a ; i ++) using namespace std; int main(void){ int T,H; whiele(cin>>T>>H){ vector<int> taro(T),hanako(H); int tsum,hsum; rep(i,T){ cin>>taro[i]; tsum+=taro[i]; } rep(i,H){ cin>>hanako[i]; hsum+=hanako[i]; } int tt...
a.cc: In function 'int main()': a.cc:8:9: error: 'whiele' was not declared in this scope 8 | whiele(cin>>T>>H){ | ^~~~~~
s586637615
p00734
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; while(cin>>n>>m,n){ int a[n],b[m]; for(int &i:int *a)cin>>i; for(int &i:b)cin>>i; int sumA,sumB; sumA = sumB = 0; for( int i : a)sumA += i; for( int i : b)sumB += i; int diff = sumA - sumB; sort(a,a+n); sort...
a.cc: In function 'int main()': a.cc:9:16: error: expected primary-expression before 'int' 9 | for(int &i:int *a)cin>>i; | ^~~ a.cc:9:16: error: expected ')' before 'int' 9 | for(int &i:int *a)cin>>i; | ~ ^~~ | ) a.cc:9:22: error: expected ini...
s257283602
p00734
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; while(cin>>n>>m,n){ int a[n],b[m]; for(int &i:int *a)cin>>i; for(int &i:b)cin>>i; int sumA,sumB; sumA = sumB = 0; for( int i : a)sumA += i; for( int i : b)sumB += i; int diff = sumA - sumB; sort(a,a+n); sort...
a.cc: In function 'int main()': a.cc:9:16: error: expected primary-expression before 'int' 9 | for(int &i:int *a)cin>>i; | ^~~ a.cc:9:16: error: expected ')' before 'int' 9 | for(int &i:int *a)cin>>i; | ~ ^~~ | ) a.cc:9:22: error: expected ini...
s348354256
p00734
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; while(cin>>n>>m,n){ int a[n],b[m]; for(int &i:int *a)cin>>i; for(int &i:int *b)cin>>i; int sumA,sumB; sumA = sumB = 0; for( int i : int *a)sumA += i; for( int i : int *b)sumB += i; int diff = sumA - sumB; sort(a...
a.cc: In function 'int main()': a.cc:9:16: error: expected primary-expression before 'int' 9 | for(int &i:int *a)cin>>i; | ^~~ a.cc:9:16: error: expected ')' before 'int' 9 | for(int &i:int *a)cin>>i; | ~ ^~~ | ) a.cc:9:22: error: expected ini...
s768780274
p00734
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; while(cin>>n>>m,n){ int a[n],b[m]; for(int &i:int *a)cin>>i; for(int &i:int *b)cin>>i; int sumA,sumB; sumA = sumB = 0; for( int i : int a)sumA += i; for( int i : int b)sumB += i; int diff = sumA - sumB; sort(a,a...
a.cc: In function 'int main()': a.cc:9:16: error: expected primary-expression before 'int' 9 | for(int &i:int *a)cin>>i; | ^~~ a.cc:9:16: error: expected ')' before 'int' 9 | for(int &i:int *a)cin>>i; | ~ ^~~ | ) a.cc:9:22: error: expected ini...
s113834956
p00734
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; while(cin>>n>>m,n){ int a[n],b[m]; for(int &i:int *a)cin>>i; for(int &i:int *b)cin>>i; int sumA,sumB; sumA = sumB = 0; for( int i : int a)sumA += i; for( int i : int b)sumB += i; int diff = sumA - sumB; sort(a,a...
a.cc: In function 'int main()': a.cc:9:16: error: expected primary-expression before 'int' 9 | for(int &i:int *a)cin>>i; | ^~~ a.cc:9:16: error: expected ')' before 'int' 9 | for(int &i:int *a)cin>>i; | ~ ^~~ | ) a.cc:9:22: error: expected ini...
s954383677
p00734
C++
#include<bis/stdc++.h> using namespace std; int main(){ int n,m; while(cin>>n>>m,n){ int a[n],b[m]; for(int i=0;i<n;i++){ cin>>a[i]; } for(int i=0;i<m;i++){ cin>>b[i]; } int sumA,sumB; sumA = sumB = 0; for( int i=0;i<n;i++)sumA += a[i]; for( int i=0;i<m;i++)sumB +=...
a.cc:1:9: fatal error: bis/stdc++.h: No such file or directory 1 | #include<bis/stdc++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s545358606
p00734
C++
2 2 1 5 3 7 6 5 3 9 5 2 3 3 12 2 7 3 5 4 5 10 0 3 8 1 9 6 0 6 7 4 1 1 2 1 2 1 4 2 3 4 3 2 3 1 1 2 2 2 0 0
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 2 | ^
s565588225
p00734
C++
// ConsoleApplication3.cpp : コンソール アプリケーションのエントリ ポイントを定義します。 // #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { return 0; } #include <iostream> #include <vector> #include <algorithm> #include <list> using namespace std; int main(){ int n, m,o; list<int> A,B; while (cin >> n >> m){ if (n == 0 && m...
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s963054761
p00734
C++
// AOJ 1153 #include<iostream> #include<algorithm> using namespace std; #define REP(i,n) for(int i=0;i<(int)(n);i++) const int NMAX = 108; int sum(vector<int> v) { int s = 0; for (int x : v) { s += x; } return s; } int main() { int n, m; while (cin >> n >> m and n) { vector<int> S(n), T(m); R...
a.cc:9:9: error: 'vector' was not declared in this scope 9 | int sum(vector<int> v) { | ^~~~~~ a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 3 | #include<algorithm> +++ |+#include <vector> 4 | using namespace std; a.cc:9...
s508642273
p00734
C++
for (int i=0; i < n; i++){ cin >> sn[i]; sumn += sn[i]; } for (int i=0; i < m; i++){ cin >> sm[i]; summ += sm[i]; } for (int i=0; i < n; i++){ for (int j=0; j < m; j++){ int a = sumn - sn[i] + sm[j]; int b = summ - sm[j] + sn[i]; if (a==b && sn[i]+sm[j] < min){ mi...
a.cc:1:5: error: expected unqualified-id before 'for' 1 | for (int i=0; i < n; i++){ | ^~~ a.cc:1:19: error: 'i' does not name a type 1 | for (int i=0; i < n; i++){ | ^ a.cc:1:26: error: 'i' does not name a type 1 | for (int i=0; i < n; i++){ | ...
s470376387
p00734
C++
#include <iostream> #include <utility> #include <string> #include <vector> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); ++i) int main() { int n, m; while(cin >> n >> m, (n|m)) { int t[n]; int ts = 0; int h[m]; int hs = 0; rep(i, n) { cin >> t[i]; ts += t[i]...
a.cc:61:5: error: redefinition of 'int main()' 61 | int main() | ^~~~ a.cc:10:5: note: 'int main()' previously defined here 10 | int main() | ^~~~
s481851836
p00734
C++
#include<iostream> using namespace std; int main(void){ int n,m; int i,j; int sn[101],sm[101]; int s; while(true){ cin >> n >> m; if(n == 0) break; memset(sn,0,sizeof(sn)); memset(sm,0,sizeof(sm)); s = 0; for(i = 0;i < n;i++){ cin >> j; s += j; sn[j]++; } fo...
a.cc: In function 'int main()': a.cc:13:5: error: 'memset' was not declared in this scope 13 | memset(sn,0,sizeof(sn)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2...
s073054405
p00734
C++
#include<iostream> #include<cstdio> #include<vector> #include<algorithm> #include<functional> #include<stdint.h> using namespace std; int main() { int n,m; int ansn,ansm; while(cin>>n>>m,n) { bool b=false; vector<int> nn; vector<int> mm; for(int i=0;i<n;i++) { ...
a.cc: In function 'int main()': a.cc:42:19: error: 'INT_MAX' was not declared in this scope 42 | int minmn=INT_MAX; | ^~~~~~~ a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 6 | #include<stdint.h> +++ |+#include...
s761280828
p00734
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define vec vector int main(void) { while(1) { int n, m; cin >> n >> m; if (n == 0 || m == 0) break; vec<int> a(n), b(m); int sum = 0; int suma = 0, sumb = 0; rep(i, n) { ci...
a.cc: In function 'int main()': a.cc:27:37: error: expected ';' before '}' token 27 | sumb += b[i] | ^ | ; 28 | } | ~
s605728252
p00734
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <queue> #include <vector> using namespace std; int main() { int n,m,t,h,p,q,tmp,x; int a[102]; int b[102]; while(cin>>n>>m&&n!=0){t=0;h=0; for(int i=0;i<n;i++){ cin>>a[i];t+=a[i];} for(int i=0;i<m;i++) ...
a.cc: In function 'int main()': a.cc:16:19: error: 'INT_MAX' was not declared in this scope 16 | x=t-h;tmp=INT_MAX; | ^~~~~~~ a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>' 4 | #include <queue> +++ |+#include <...
s771716370
p00734
C++
include<stdio.h> int main(){ int i,j; int n,m; int s[300]; int rel1=0; int rel2=0; int flag=0; int ans1=1000,ans2,ans3; while(1){ rel1=0; rel2=0; flag=0; ans1=1000; scanf("%d %d",&n,&m); if(n==0&&m==0) break; for(i=0;i<n;i++){ scanf("%d",&s[i]); rel1+=s[i]; ...
a.cc:1:1: error: 'include' does not name a type 1 | include<stdio.h> | ^~~~~~~
s833431130
p00734
C++
#include <bits/stdc++.h> using namespace std; #define LOG(...) fprintf(stderr, __VA_ARGS__) //#define LOG(...) #define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); ++i) #define RFOR(i, a, b) for (int i = (int)(b - 1); i >= (int)(a); --i) #define REP(i, n) for (int i = 0; i < (int)(n); ++i) #define RREP(i, n) for...
a.cc: In function 'int main()': a.cc:62:2: error: expected '}' at end of input 62 | } | ^ a.cc:36:25: note: to match this '{' 36 | while (cin >> n,m, n|m) { | ^ a.cc:62:2: error: expected '}' at end of input 62 | } | ^ a.cc:34:12: note: to match this '{' 34 | int ...
s021242133
p00734
C++
#include <iostream> using namespace std; int T[100]; int H[100]; int main(){ int n, m; int Half,Tsum, Hsum; int Tn, Hn,Tans,Hans; while (1){ cin >> n >> m; if (n == 0 && m == 0) break; Tsum = Hsum = 0; for (int i = 0; i < n; i++){ cin >> T[i]; Tsum += T[i]; } for (int i = 0; i < m; i++){ cin ...
a.cc: In function 'int main()': a.cc:49:18: error: expected '}' at end of input 49 | return 0; | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s959172675
p00734
C++
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i = 0; i < n; ++i) typedef vector<int> V; int n, m; int sn, sm; int temp; void swapsum(int i, int j, V &taro, V &hanako) { sn += hanako[j] - taro[i]; sm += taro[i] - hanako[j]; swap(taro[i], hanako[j]); } int main() { for(;;) { scanf("...
a.cc: In function 'int main()': a.cc:50:6: error: 'else' without a previous 'if' 50 | }else if(sn > sm) { | ^~~~
s451096280
p00734
C++
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i = 0; i < n; ++i) typedef vector<int> V; int n, m; int sn, sm; int temp; void swapsum(int i, int j, V &taro, V &hanako) { sn += hanako[j] - taro[i]; sm += taro[i] - hanako[j]; swap(taro[i], hanako[j]); } int main() { for(;;) { scanf("...
a.cc: In function 'int main()': a.cc:50:6: error: 'else' without a previous 'if' 50 | }else if(sn > sm) { | ^~~~
s372051769
p00734
C++
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> P; int n, w, ans, wt; int main() { vector<P> v(120); scanf("%d", &n); for(int i = 0; i < n; ++i) scanf("%d %d", &v[i].second, &v[i].first); scanf("%d", &w); sort(v.begin(), v.end(), greater<P>()); for(int i = 0; i < n; ++i) { if(wt + ...
a.cc:21:7: error: stray '@' in program 21 | [rexia@AR prog]$ cat prog-3.cpp | ^ a.cc:21:1: error: expected unqualified-id before '[' token 21 | [rexia@AR prog]$ cat prog-3.cpp | ^ a.cc:26:5: error: redefinition of 'int n' 26 | int n, m; | ^ a.cc:4:5: note: 'int n' previously declare...
s638533092
p00734
C++
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> P; int n, w, ans, wt; int main() { vector<P> v(120); scanf("%d", &n); for(int i = 0; i < n; ++i) scanf("%d %d", &v[i].second, &v[i].first); scanf("%d", &w); sort(v.begin(), v.end(), greater<P>()); for(int i = 0; i < n; ++i) { if(wt + ...
a.cc:21:7: error: stray '@' in program 21 | [rexia@AR prog]$ cat prog-3.cpp | ^ a.cc:21:1: error: expected unqualified-id before '[' token 21 | [rexia@AR prog]$ cat prog-3.cpp | ^ a.cc:26:5: error: redefinition of 'int n' 26 | int n, m; | ^ a.cc:4:5: note: 'int n' previously declare...
s350799247
p00734
C++
#include <cstdio> #include <algorithm> using namespace std; const int INF; const int MAX; int x,y; int sum [2]; int card[2][MAX]; void solve(){ int n,m; int mini = INF; for(int i=0;i<x;i++){ for(int j=0;j<y;j++){ if(sum[0] - card[0][i] + card[1][j] ==sum[1] +card[0][i]-card[1][j]){ if(card[0][i] + ...
a.cc:5:11: error: uninitialized 'const INF' [-fpermissive] 5 | const int INF; | ^~~ a.cc:6:11: error: uninitialized 'const MAX' [-fpermissive] 6 | const int MAX; | ^~~ a.cc:10:13: error: size of array 'card' is not an integral constant-expression 10 | int card[2][MAX]; |...
s316807468
p00734
C++
#include <cstdio> #include <algorithm> const int INF = 1 << 28; const int MAX = 100; int n, m; int sum[2]; int card[2][MAX]; void solve(){ int t, h; int min_val = INF; for(int i = 0; i < n; ++i){ for(int j = 0; j < m; ++j){ if(sum[0] - card[0][i] + card[1][j] == sum[1] + card[...
a.cc: In function 'int main()': a.cc:41:9: error: 'fill_n' was not declared in this scope; did you mean 'std::fill_n'? 41 | fill_n(sum, 2, 0); | ^~~~~~ | std::fill_n In file included from /usr/include/c++/14/algorithm:86, from a.cc:2: /usr/include/c++/14/pstl/glue...
s041735192
p00734
C++
#include <cstdio> #include <algorithm> using namespace std; const int INF = 1 << 100; const int MAX = 100; int n, m; int sum[2]; int card[2][MAX]; void solve(){ int x, y; int min_val = INF; for(int i = 0; i < x; ++i){ for(int j = 0; j < y; ++j){ if(sum[0] - card[0][i] + card[1]...
a.cc:5:19: warning: left shift count >= width of type [-Wshift-count-overflow] 5 | const int INF = 1 << 100; | ~~^~~~~~ a.cc: In function 'int main()': a.cc:44:42: error: 'x' was not declared in this scope 44 | for(int j = 0, l = (i == 0 ? x: y); j < l; ++j){ | ...
s522940773
p00734
C++
#include <cstdio> #include <algorithm> using namespace std; const int INF = 1 << 100; const int MAX = 100; int n, m; int sum[2]; int card[2][MAX]; void solve(){ int x, y; int min_val = INF; for(int i = 0; i < x; ++i){ for(int j = 0; j < y; ++j){ if(sum[0] - card[0][i] + card[1]...
a.cc:5:19: warning: left shift count >= width of type [-Wshift-count-overflow] 5 | const int INF = 1 << 100; | ~~^~~~~~ a.cc: In function 'int main()': a.cc:41:8: error: 'in_n' was not declared in this scope 41 | in_n(sum, 2, 0); | ^~~~
s819874271
p00734
C++
#include <cstdio> #include <algorithm> using namespace std; const int INF = 1 << 50; const int MAX = 100; int n, m; int sum[2]; int card[2][MAX]; void solve(){ int x, y; int min_val = INF; for(int i = 0; i < x; ++i){ for(int j = 0; j < y; ++j){ if(sum[0] - card[0][i] + card[1][...
a.cc:5:19: warning: left shift count >= width of type [-Wshift-count-overflow] 5 | const int INF = 1 << 50; | ~~^~~~~ a.cc: In function 'int main()': a.cc:41:8: error: 'in_n' was not declared in this scope 41 | in_n(sum, 2, 0); | ^~~~
s257204699
p00734
C++
#include <cstdio> #include <algorithm> using namespace std; const int INF = 1 << 28; const int MAX = 100; int n, m; int sum[2]; int card[2][MAX]; void solve(){ int x, y; int min_val = INF; for(int i = 0; i < x; ++i){ for(int j = 0; j < y; ++j){ if(sum[0] - card[0][i] + card[1][...
a.cc: In function 'int main()': a.cc:41:8: error: 'in_n' was not declared in this scope 41 | in_n(sum, 2, 0); | ^~~~
s355483284
p00734
C++
#include <cstdio> #include <algorithm> using namespace std; const int INF = 1 << 28; const int MAX = 100; int taro, hanako; int sum[2]; int card[2][MAX]; void solve(){ int x, y; int min_val = INF; for(int i = 0; i < x; ++i){ for(int j = 0; j < y; ++j){ if(sum[0] - card[0][i] +...
a.cc: In function 'int main()': a.cc:42:8: error: 'fill_taro' was not declared in this scope 42 | fill_taro(sum, 2, 0); | ^~~~~~~~~
s432795262
p00734
C++
if(a==0 && b==0)break; flag=0; sumx=0; sumy=0; l=0; for(i=0;i<a;i++){ scanf("%d",&c[i]); sumx+=c[i]; } for(i=0;i<b;i++){ scanf("%d",&d[i]); sumy+=d[i]; } ans=sumx-sumy; if(sumx<=sumy){ for(i=0;i<a;i++){ for(j=0;j<b;j++){ if((d[j]-c[i])*2==-an...
a.cc:1:5: error: expected unqualified-id before 'if' 1 | if(a==0 && b==0)break; | ^~ a.cc:2:5: error: 'flag' does not name a type 2 | flag=0; | ^~~~ a.cc:3:5: error: 'sumx' does not name a type 3 | sumx=0; | ^~~~ a.cc:4:5: error: 'sumy' does not name a type 4 | ...
s684600921
p00734
C++
#include<iostream> #include<algorithm> using namespace std; int s[100], t[100]; int main(){ while(1){ int n, m; cin>> n>> m; if(n==0&&m==0) break; for(int i=0; i<n; i++) cin>> s[i]; for(int i=0; i<m; i++) cin>> t[i]; int mi=300; vector<pair<int, int>> ans;...
a.cc: In function 'int main()': a.cc:17:9: error: 'vector' was not declared in this scope 17 | vector<pair<int, int>> ans; | ^~~~~~ a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 2 | #include<algorithm> +++ |+#include ...
s699737758
p00734
C++
#include <iostream> #include <vector> #include <numeric> using namespace std; int main(void){ int n, m; int tmp; int sum_tarou, sum_hanako; bool frag; while(1){ cin >> n >> m; if(n == 0 && m == 0){ break; } int t_change = 101, h_change = 101; frag = true; vector<int> tarou; vector<int> hanako;...
a.cc: In function 'int main()': a.cc:42:59: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int)' 42 | vector<int>::iterator citer = find(hanako.begin(), hanako.end(), *itr - diff/2); | ...
s608992094
p00734
C++
#include <iostream> #include <vector> #include <numeric> using namespace std; int main(void){ int n, m; int tmp; int sum_tarou, sum_hanako; bool frag; while(1){ cin >> n >> m; if(n == 0 && m == 0){ break; } int t_change = 101, h_change = 101; frag = true; vector<int> tarou; vector<int> hanako;...
a.cc: In function 'int main()': a.cc:42:59: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int)' 42 | vector<int>::iterator citer = find(hanako.begin(), hanako.end(), *itr - diff/2); | ...
s558559370
p00734
C++
#include <iostream> #include <vector> #include <numeric> using namespace std; int main(void){ int n, m; int tmp; int sum_tarou, sum_hanako; bool frag; while(1){ cin >> n >> m; if(n == 0 && m == 0){ break; } int t_change = 101, h_change = 101; frag = true; vector<int> tarou; vector<int> hanako;...
a.cc: In function 'int main()': a.cc:42:59: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int)' 42 | vector<int>::iterator citer = find(hanako.begin(), hanako.end(), *itr - diff/2); | ...
s730262201
p00734
C++
#include <iostream> #include <vector> #include <numeric> using namespace std; int main(void){ int n, m; int tmp; int sum_tarou, sum_hanako; bool frag; while(1){ cin >> n >> m; if(n == 0 && m == 0){ break; } int t_change = 101, h_change = 101; frag = true; vector<int> tarou; vector<int> hanako;...
a.cc: In function 'int main()': a.cc:42:59: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int)' 42 | vector<int>::iterator citer = find(hanako.begin(), hanako.end(), *itr - diff/2); | ...
s373684592
p00734
C++
#include <iostream> #include <vector> #include <numeric> using namespace std; int main(void){ int n, m; int tmp; int sum_tarou, sum_hanako; bool frag; while(1){ cin >> n >> m; if(n == 0 && m == 0){ break; } int t_change = 101, h_change = 101; frag = true; vector<int> tarou; vector<int> hanako;...
a.cc: In function 'int main()': a.cc:42:59: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int)' 42 | vector<int>::iterator citer = find(hanako.begin(), hanako.end(), *itr - diff/2); | ...
s542526794
p00734
C++
#include <iostream> #include <vector> #include <numeric> using namespace std; int main(void){ int n, m; int tmp; int sum_tarou, sum_hanako; bool frag; while(1){ cin >> n >> m; if(n == 0 && m == 0){ break; } int t_change = 101, h_change = 101; frag = true; vector<int> tarou; vector<int> hanako;...
a.cc: In function 'int main()': a.cc:42:59: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int)' 42 | vector<int>::iterator citer = find(hanako.begin(), hanako.end(), *itr - diff/2); | ...
s458051914
p00734
C++
#include <iostream> #include <vector> #include <numeric> using namespace std; int main(void){ int n, m; int tmp; int sum_tarou, sum_hanako; bool frag; while(1){ cin >> n >> m; if(n == 0 && m == 0){ break; } int t_change = 101, h_change = 101; frag = true; vector<int> tarou; vector<int> hanako;...
a.cc: In function 'int main()': a.cc:42:59: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int)' 42 | vector<int>::iterator citer = find(hanako.begin(), hanako.end(), *itr - diff/2); | ...
s911696876
p00734
C++
#include <iostream> #include <vector> #include <numeric> using namespace std; int main(void){ int n, m; int tmp; int sum_tarou, sum_hanako; bool frag; while(1){ cin >> n >> m; if(n == 0 && m == 0){ break; } int t_change = 101, h_change = 101; frag = true; vector<int> tarou; vector<int> hanako;...
a.cc: In function 'int main()': a.cc:42:59: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int)' 42 | vector<int>::iterator citer = find(hanako.begin(), hanako.end(), *itr - diff/2); | ...
s275592745
p00734
C++
#include <iostream> #include <vector> #include <numeric> using namespace std; int main(void){ int n, m; int tmp; int sum_tarou, sum_hanako; bool frag; while(1){ cin >> n >> m; if(n == 0 && m == 0){ break; } int t_change = 101, h_change = 101; frag = true; vector<int> tarou; vector<int> hanako; ...
a.cc: In function 'int main()': a.cc:41:62: error: 'class std::vector<int>' has no member named 'find' 41 | vector<int>::iterator citer = hanako.find(hanako.begin(), hanako.end(), *itr - diff/2); | ^~~~
s698624793
p00734
C++
#include <iostream> #include <vector> using namespace std; int main(){ int n, m, t, d, st, sh; while (cin >> n >> m, n||m){ st = 0; sh = 0; vector<int> ta, ha; for (int i = 0; i < n; ++i){ cin >> t; ta.push_back(t); st += t; } for (int i = 0; i < m; ++i){ cin >> t; ...
a.cc: In function 'int main()': a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(ta.begin(), ta.end()); | ^~~~ | short
s466832201
p00734
C++
#include <iostream> #include <vector> using namespace std; int main(){ int n, m, t, d, st, sh; while (cin >> n >> m, n||m){ st = 0; sh = 0; vector<int> ta, ha; for (int i = 0; i < n; ++i){ cin >> t; ta.push_back(t); st += t; } for (int i = 0; i < m; ++i){ cin >> t; ...
a.cc: In function 'int main()': a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(ta.begin(), ta.end()); | ^~~~ | short
s046017093
p00734
C++
#include <iostream> #include <vector> using namespace std; int main(){ int n, m, t, d, st, sh; while (cin >> n >> m, n||m){ st = 0; sh = 0; vector<int> ta, ha; for (int i = 0; i < n; ++i){ cin >> t; ta.push_back(t); st += t; } for (int i = 0; i < m; ++i){ cin >> t; ...
a.cc: In function 'int main()': a.cc:21:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 21 | std::sort(ta.begin(), ta.end()); | ^~~~ | qsort a.cc:22:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 22 | std::sort(ha.begin(), ha.end()); ...
s674391647
p00734
C++
#include<iostream> using namespace std; int main(){ int n,m,i,j,sums,sumt,anss,anst,judge; int s[100]; int t[100]; while(cin>>n>>m,n||m){ sums=sumt=0; anss=anst=100; judge=0; for(i=0;i<n;i++){ cin>>s[i]; sums+=s[i]; } for(i=0;i<m;i++){ cin>>t[i]; sumt+=t[i]; } for(i=0;i<n;i++){ for...
a.cc:42:2: error: stray '#' in program 42 | }#include<iostream> | ^ a.cc:42:3: error: 'include' does not name a type 42 | }#include<iostream> | ^~~~~~~ a.cc:45:5: error: redefinition of 'int main()' 45 | int main(){ | ^~~~ a.cc:4:5: note: 'int main()' previously defined here 4 | in...
s818248776
p00734
C++
#include <iostream> #include <algorithm> #include <cmath> using namespace std; return 0; }
a.cc:6:9: error: expected unqualified-id before 'return' 6 | return 0; | ^~~~~~ a.cc:7:1: error: expected declaration before '}' token 7 | } | ^
s390835131
p00734
C++
#include<iostream> #include <vector> using namespace std; int main(){ while(true){ int n, m; cin >> n >> m; if(n == 0) break; vector<int> taro(n+1), hana(m+1); int sumt = 0, sumh = 0; for(int i=0; i<n; i++){ cin >> taro[i]; sumt += taro[i]; } taro[n] = 101; for(...
a.cc: In function 'int main()': a.cc:24:5: error: 'sort' was not declared in this scope; did you mean 'short'? 24 | sort(taro.begin(), taro.end()); | ^~~~ | short
s983517824
p00734
C++
#include <iostream> using namespace std; int main() { int n,m; //number of cards int ct[100],ch[100]; //each card int sub; //substraction while(cin >> n >> m && n){ memset(ct,0,100); memset(ch,0,1...
a.cc: In function 'int main()': a.cc:9:5: error: 'memset' was not declared in this scope 9 | memset(ct,0,100); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> 2 | usin...
s081960434
p00734
C++
} } } if(tmpt>0 && tmph>0) cout << tmpt << ' ' << tmph << endl; else cout << "-1" <<endl; } } } }
a.cc:1:1: error: expected declaration before '}' token 1 | } | ^ a.cc:2:11: error: expected declaration before '}' token 2 | } | ^ a.cc:3:9: error: expected declaration before '}' token 3 | } | ^ a.cc:4:9: error: expected unqualified-id before 'if' 4...
s060198012
p00734
C++
} } } if(tmpt>0 && tmph>0) cout << tmpt << ' ' << tmph << endl; else cout << "-1" <<endl; } } } }
a.cc:1:1: error: expected declaration before '}' token 1 | } | ^ a.cc:2:11: error: expected declaration before '}' token 2 | } | ^ a.cc:3:9: error: expected declaration before '}' token 3 | } | ^ a.cc:4:9: error: expected unqualified-id before 'if' 4...
s255328685
p00734
C++
#include <iostream> using namespace std; int main() { int n,m; //number of cards int ct[100],ch[100]; //each card int sub; //substraction while(cin >> n >> m && n){ memset(ct,0,100); memset(ch,0,1...
a.cc: In function 'int main()': a.cc:9:5: error: 'memset' was not declared in this scope 9 | memset(ct,0,100); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#include <cstring> 2 | usin...
s249427326
p00734
C++
while True: n, m = map(int, raw_input().split()) if n == 0 and m == 0: break taro = sorted([int(raw_input()) for _ in range(n)]) hanako = sorted([int(raw_input()) for _ in range(m)]) diff = sum(taro) - sum(hanako) flag = False def fnc(): global flag for i in taro...
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while True: | ^~~~~
s171996648
p00734
C++
while True: n, m = map(int, raw_input().split()) if n == 0 and m == 0: break taro = sorted([int(raw_input()) for _ in range(n)]) hanako = sorted([int(raw_input()) for _ in range(m)]) diff = sum(taro) - sum(hanako) flag = False def fnc(): global flag for i in taro...
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while True: | ^~~~~
s223686268
p00734
C++
#include "stdafx.h" #include"iostream" using namespace std; int main() { int n, m, t[100], h[100], sumt = 0, sumh = 0, mint = 101, minh = 101; while (1) { cin >> n >> m; if (n == 0 && m == 0)break; for (int i = 0; i < n; i++) { cin >> t[i]; sumt += t[i]; } for (int i = 0; i < m; ++) { cin >> h[i];a...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s231014947
p00734
C++
#include"iostream" using namespace std; int main() { int n, m, t[100], h[100], sumt = 0, sumh = 0, mint = 101, minh = 101; while (1) { cin >> n >> m; if (n == 0 && m == 0)break; for (int i = 0; i < n; i++) { cin >> t[i]; sumt += t[i]; } for (int i = 0; i < m; ++) { cin >> h[i];a sumh += h[i]; ...
a.cc: In function 'int main()': a.cc:13:42: error: expected primary-expression before ')' token 13 | for (int i = 0; i < m; ++) { | ^ a.cc:14:37: error: 'a' was not declared in this scope 14 | cin >> h[i];a | ...