submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s089835263
p00734
C++
#include <bits/stdc++.h> #define ll long long using namespace std; int n; int m; int s1[105]={}; int s2[105]={}; int main(){ while(1){ int sum1=0; int sum2=0; scanf("%d %d",&n,&m); if(n == 0 && m == 0) break; for(int i=0;i<n;i++){ scanf("%d",&s1[i]); ...
a.cc: In function 'int main()': a.cc:29:17: error: 'sum2' was not declared in this scope; did you mean 's2'? 29 | int d = sum2-sum1; | ^~~~ | s2 a.cc:29:22: error: 'sum1' was not declared in this scope; did you mean 's1'? 29 | int d = sum2-sum1; | ...
s318385037
p00734
C++
#define rep(i,n) for(int i=0;i<n;i++) using namespace std; int main(){ int n,m; while(cin>>n>>m,n){ int cd[200]; int t=0,h=0; rep(i,n)cin>>cd[i],t+=cd[i]; rep(i,m)cin>>cd[i+n],h+=cd[i+n]; sort(cd,cd+n),sort(cd+n,cd+n+m); rep(i,n)rep(j,m){ if(t-cd[i]+cd[j+n]==h-cd[j+n]+cd[i]){ cout<<cd[i]<<" "<<cd[...
a.cc: In function 'int main()': a.cc:5:15: error: 'cin' was not declared in this scope 5 | while(cin>>n>>m,n){ | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | #define rep(i,n)...
s406252120
p00734
C++
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt(), m = sc.nextInt(); if (n == 0 && m == 0) break; int taro[] = new int[n]; int taroTotal = 0; for (int i = 0; i < n; i++) { ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:15: error: expected ':' before 'static' 5 | public static void main(String args[]) | ^~~~~~~ | : a....
s641029696
p00734
C++
#include<iostream> #include<vector> using namespace std; struct DATA{ int x; int y; }; vector<int> ScanData(int); int CalcurateSum(vector<int>); bool Compare(const DATA&, const DATA&); int main(){ int i, j, n, m; int sum_n1, sum_n2, sum_m1, sum_m2; vector<int> data1, data2; DATA equal; vector<DATA> eq...
a.cc: In function 'int main()': a.cc:45:7: error: 'sort' was not declared in this scope; did you mean 'short'? 45 | sort(equals.begin(), equals.end(), Compare); | ^~~~ | short
s786773839
p00734
C++
#include<iostream> #include<string> using namespace std; int main(void){ int n,m,hanaSum,taroSum,gap,hana[100],taro[100]; bool flag; while(cin>>n>>m,n&&m){ flag=false; hanaSum=0; taroSum=0; memset(taro,0,sizeof(taro)); memset(hana,0,sizeof(hana)); for(int i=0;i<n;i++){ cin>>taro[i]; taroS...
a.cc: In function 'int main()': a.cc:15:17: error: 'memset' was not declared in this scope 15 | memset(taro,0,sizeof(taro)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +...
s218634666
p00734
C++
#include<iostream> #include<string.h> using namespace std; int main(void){ int n,m,hanaSum,taroSum,hanacr,tarocr,gap,hana[100],taro[100]; while(cin>>n>>m,n&&m){ flag=false; hanaSum=0; taroSum=0; hanacr=0; tarocr=0; memset(taro,0,sizeof(taro)); memset(hana,0,sizeof(hana)); for(int i=0;i<n;i++...
a.cc: In function 'int main()': a.cc:11:17: error: 'flag' was not declared in this scope 11 | flag=false; | ^~~~
s647157667
p00734
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt(); int m = sc.nextInt(); if (n == 0 && m == 0) break; int[] a = new int[n]; int[] b = new int[m]; int sumA = 0; int sumB = 0; for (in...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: expected unqualified-id before 'public' 2 | public class Main { | ^~~~~~
s727764085
p00734
C++
lude<vector> #include<algorithm> using namespace std; int main() { int n,m; for(;cin>>n>>m,n;) { int s1[n],s2[m]; for(int i=0;i<n;i++) cin>>s1[i]; for(int i=0;i<m;i++) cin>>s2[i]; int x=-1,y=-1; for(int i=0;i<n;i++) for(int j=0;j<m;j++) { swap(s1[i],s2[j]); ...
a.cc:1:1: error: 'lude' does not name a type 1 | lude<vector> | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__i...
s472941066
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 | ^
s481542332
p00734
C++
#include<iostream> #include<cstdio> #include<cstdlib> #include<climits> #include<cmath> #include<cassert> #include<string> #include<vector> #include<queue> #include<stack> #include<set> #include<map> #include<algorithm> #include<utility> using namespace std; int n,m,ns[200],ms[200]; int nsum,msum; /* input data */ v...
/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
s293763742
p00734
C++
#include<iostream> #include<algorithm> using namespace std; void koukan(int*,int*,int,int ); int n,m; void main(){ while(1){ int goukei=0,goukei_t=0; cin>>n>>m; if(!n&&!m) break; int *taro=new int[n]; int *hanako=new int [m]; for(int i=0;i<n;i++){ cin>>taro[i]; goukei+=taro[i]; goukei_t+=taro...
a.cc:10:1: error: '::main' must return 'int' 10 | void main(){ | ^~~~ a.cc: In function 'int main()': a.cc:38:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 38 | return; | ^~~~~~
s864769370
p00734
C++
#include<iostream> #include<algorithm> using namespace std; void koukan(int*,int*,int,int ); int n,m; void main(){ while(1){ int goukei=0,goukei_t=0; cin>>n>>m; if(!n&&!m) break; int *taro=new int[n]; int *hanako=new int [m]; for(int i=0;i<n;i++){ cin>>taro[i]; goukei+=taro[i]; goukei_t+=taro...
a.cc:10:1: error: '::main' must return 'int' 10 | void main(){ | ^~~~ a.cc: In function 'int main()': a.cc:38:9: error: return-statement with no value, in function returning 'int' [-fpermissive] 38 | return; | ^~~~~~
s567986332
p00734
C++
#include <cstdio> #include <cstring> #include <cmath> #include <iostream> #include <sstream> #include <algorithm> #include <numeric> #include <functional> #include <vector> #include <queue> #include <string> #define REP(i,n) for (int i = 0; i < (n); i++) #define FOR(i,s,n) for (int i = (s); i < (n); i++) #define ALLOF...
a.cc: In function 'void write(const std::vector<_Tp>&)': a.cc:35:34: error: 'i' was not declared in this scope 35 | for (auto x : v) ss << v[i] << ' '; | ^
s834008711
p00734
C++
#include <iostream> #include <vector> #include <numeric> int main(int argc, char const* argv[]) { while (true) { int n, m; std::cin >> n >> m; if (n == 0 && m == 0) break; std::vector<int> taro(n); std::vector<int> hanako(m); for (int i = 0; i < n; ++i) std::cin >> taro[i]; fo...
a.cc: In function 'int main(int, const char**)': a.cc:18:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 18 | std::sort(taro.begin(), taro.end()); | ^~~~ | qsort a.cc:19:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 19 | std::sort(hanako....
s997428026
p00735
Java
import java.util.Scanner; public class Main { static boolean[] isPrime = new boolean[300001]; static void prime(int n) { for(int i=2; i*n<300000; i++) { isPrime[n*i] = false; } } public static void main(String[] args) { try(Scanner sc = new Scanner(System.in)) { int[] numprime = new int[300000]; ...
Main.java:53: error: reached end of file while parsing }v ^ 1 error
s222602651
p00735
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; /** * Created by S64 on 15/07/28. */ // ????§?: 2??????32???36?§? // ??????: 1??????49???16?§?????????? class Main { static final List<Integer> msNumbers; static ...
Main.java:47: error: as of release 9, '_' is a keyword, and may not be used as an identifier public static void main(String _[]) throws IOException { ^ 1 error
s775735778
p00735
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; /** * Created by S64 on 15/07/28. */ // ????§?: 2??????32???36?§? // ??????: 1??????49???16?§?????????? class Main { static final List<Integer> msNumbers; static ...
Main.java:47: error: as of release 9, '_' is a keyword, and may not be used as an identifier public static void main(String _[]) throws IOException { ^ 1 error
s350441512
p00735
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; /** * Created by S64 on 15/07/28. */ // ????§?: 2??????32???36?§? // ??????: 1??????49???16?§?????????? class Main { static final List<Integer> msNumbers; static ...
Main.java:47: error: as of release 9, '_' is a keyword, and may not be used as an identifier public static void main(String _[]) throws IOException { ^ 1 error
s315080774
p00735
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.util.TreeSet; import java.math.BigInteger; public class Mai...
Main.java:50: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) throws Exception{ ^ (use --enable-preview to enable unnamed classes) Main.java:153: error: class, interface, enum, or record expected } ^ 2 errors
s030013668
p00735
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.BigInteger; public class Main{ static PrintWriter out...
Main.java:37: error: cannot find symbol if((n/i)%7==1||(n/i)%7==6) al.add(n/i); ^ symbol: variable al location: class Main Main.java:40: error: cannot find symbol Collections.sort(al); ^ symbol: variable al location: class Main Main.java:40: error: can...
s160044779
p00735
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.Collections; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class...
Main.java:37: error: cannot find symbol if(i%7==1||i%7==6) st.add(i); ^ symbol: variable st location: class Main 1 error
s065713804
p00735
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.Collections; import java.util.InputMismatchException; import java.util.NoSuchElementException; import java.math.BigInteger; public class...
Main.java:32: error: unreachable statement for(;;){ ^ 1 error
s193957215
p00735
Java
import java.io.*; import java.util.*; import java.math.*; public class B { public void run() { Scanner sc = new Scanner(System.in); boolean[] p = new boolean[300000]; boolean[] ms = new boolean[300000]; for (int i = 0; i < ms.length; i++) { ms[i] = ((i % 7 == 1) || (i % 7 == 6)); p[i] = ms[i]; } fo...
Main.java:5: error: class B is public, should be declared in a file named B.java public class B { ^ 1 error
s310112574
p00735
Java
import java.util.*; public class AOJ_1154{ void run(){ int MAX = 300000; Scanner sc = new Scanner(System.in); boolean[] is_MS_Prime = new boolean[MAX+1]; Arrays.fill(is_MS_Prime, true); is_MS_Prime[0] = is_MS_Prime[1] = false; for(int i = 0; i <= MAX; i++){ ...
Main.java:3: error: class AOJ_1154 is public, should be declared in a file named AOJ_1154.java public class AOJ_1154{ ^ 1 error
s157845889
p00735
Java
import java.util.ArrayList; import java.util.Scanner; public class no2 { static Scanner stdIn= new Scanner(System.in); static ArrayList<Integer> smPrime = new ArrayList<Integer>(); public static void main(String args[]){ while(true){ int input = stdIn.nextInt(); if(input==1) break; func(input); } ...
Main.java:4: error: class no2 is public, should be declared in a file named no2.java public class no2 { ^ 1 error
s413629342
p00735
Java
import java.util.ArrayList; import java.util.Scanner; public class no2 { static Scanner stdIn= new Scanner(System.in); static ArrayList<Integer> smPrime = new ArrayList<Integer>(); public static void main(String args[]){ while(true){ int input = stdIn.nextInt(); if(input==1) break; func(input); } }...
Main.java:3: error: class no2 is public, should be declared in a file named no2.java public class no2 { ^ 1 error
s579624751
p00735
Java
import java.util.ArrayList; import java.util.Scanner; public class MAIN { static Scanner stdIn= new Scanner(System.in); static ArrayList<Integer> smPrime = new ArrayList<Integer>(); public static void main(String args[]){ while(true){ int input = stdIn.nextInt(); if(input==1) break; func(input); } ...
Main.java:3: error: class MAIN is public, should be declared in a file named MAIN.java public class MAIN { ^ 1 error
s750320763
p00735
Java
import java.util.ArrayList; import java.util.Scanner; public class no2 { static Scanner stdIn= new Scanner(System.in); static ArrayList<Integer> smPrime = new ArrayList<Integer>(); public static void main(String args[]){ while(true){ int input = stdIn.nextInt(); if(input==1) break; func(input); } ...
Main.java:4: error: class no2 is public, should be declared in a file named no2.java public class no2 { ^ 1 error
s056638012
p00735
Java
import java.util.ArrayList; import java.util.Scanner; public class no2 { static Scanner stdIn= new Scanner(System.in); // static ArrayList<Integer> smPrime = new ArrayList<Integer>(); public static void main(String args[]){ while(true){ int input = stdIn.nextInt(); if(input==1) break; func(input); ...
Main.java:4: error: class no2 is public, should be declared in a file named no2.java public class no2 { ^ 1 error
s282171666
p00735
C
#include <stdio.h> #define MAX 1000000 int main(void) { int n; int sosuu[MAX]; int i, j; int getsuyou, doyou; int count = 0; // 素数の数 sosuu[0] = 6; count++; for (i=1; i<42857; i++) { // debug // printf("**%d**\n",i); getsuyou = i*7 +1; for (j=0; j<count; j++) { if (getsuyou %...
main.c:65:3: error: expected identifier or '(' before 'return' 65 | return 0; | ^~~~~~ main.c:67:1: error: expected identifier or '(' before '}' token 67 | } | ^
s425323538
p00735
C
#include <iostream> #include <math.h> using namespace std; void prime(int n); bool subprime(int n); int main(){ int n; while (true){ cin >> n; if (n == 1){ break; } prime(n); } return 0; } void prime(int n){ cout << n << ": "; int s = (int)sqrt(n); //????????? int r = 0; int i = 6; while (i <= n){//6 8 1...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s890731214
p00735
C
#include <iostream> #include <math.h> using namespace std; void prime(int n); bool subprime(int n); int main(){ int n; while (true){ cin >> n; if (n == 1){ break; } prime(n); } return 0; } void prime(int n){ cout << n << ": "; int s = (int)sqrt(n); //????????? int r = 0; int i = 6; while (i <= n){//6 8 1...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s930116386
p00735
C
#include<Stdio.h> #include<math.h> #define MAX 300000 int main(){ int i,j; int n; int board[MAX + 1]; for(i = 0;i < MAX;i++){ board[i] = (i % 7 == 1 || i % 7 == 6); } board[1] = 0; j = 6; while(j < MAX){ for(i = 2 * j;i < MAX;i++)board[i] = 0; j++; while(!board[j]){ if(j == MAX - 1)break; j++; ...
main.c:1:9: fatal error: Stdio.h: No such file or directory 1 | #include<Stdio.h> | ^~~~~~~~~ compilation terminated.
s868208687
p00735
C
#include<Stdio.h> #include<math.h> #define MAX 300000 int main(){ int i,j; int n; int board[MAX + 1]; for(i = 0;i < MAX;i++){ board[i] = (i % 7 == 1 || i % 7 == 6); } board[1] = 0; j = 6; while(j < MAX){ for(i = 2 * j;i < MAX;i++)board[i] = 0; j++; while(!board[j]){ if(j == MAX - 1)break; j++; ...
main.c:1:9: fatal error: Stdio.h: No such file or directory 1 | #include<Stdio.h> | ^~~~~~~~~ compilation terminated.
s281600681
p00735
C
#include <iostream> #include <vector> #include <cstdio> #include <algorithm> using namespace std; bool check(int arg){ int count=0; for(int i=2;i*i<=arg;i++){ if(arg%i==0){ if(i%7==1 || i%7 == 6){ count++; } if((arg/i)%7 == 1 || (arg/i)%7 == 6){ ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s739856115
p00735
C++
//include //------------------------------------------ #include <vector> #include <list> #include <map> #include <set> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <...
a.cc: In function 'int main()': a.cc:89:31: error: expected ';' before 'for' 89 | cout<<tmp<<":" | ^ | ; a.cc:90:21: error: 'j' was not declared in this scope; did you mean 'jn'? 90 | REP(j,SZ(res))cout<<" "<<j...
s418228011
p00735
C++
int isMonSatPrime(int cand){ if (cand % 7 != 1 && cand % 7 != 6){ return(0); } int limit = sqrt(cand); int i = 6; int next = MON; if (cand < 2){ return(0); } while (i > 1){ if (cand % i == 0){ break; } if (next == SAT){ i += 5; next = MON; } else if (next == MON){ i += 2; next ...
a.cc: In function 'int isMonSatPrime(int)': a.cc:7:21: error: 'sqrt' was not declared in this scope 7 | int limit = sqrt(cand); | ^~~~ a.cc:9:20: error: 'MON' was not declared in this scope 9 | int next = MON; | ^~~ a.cc:20:29: error: 'SAT' was ...
s924867731
p00735
C++
#include<stdio.h> int isMonSatPrime(int cand){ if (cand % 7 != 1 && cand % 7 != 6){ return(0); } int limit = sqrt(cand); int i = 6; int next = MON; if (cand < 2){ return(0); } while (i > 1){ if (cand % i == 0){ break; } if (next == SAT){ i += 5; next = MON; } else if (next == MON){ ...
a.cc: In function 'int isMonSatPrime(int)': a.cc:9:21: error: 'sqrt' was not declared in this scope 9 | int limit = sqrt(cand); | ^~~~ a.cc:11:20: error: 'MON' was not declared in this scope 11 | int next = MON; | ^~~ a.cc:22:29: error: 'SAT' was...
s915803726
p00735
C++
#include<stdio.h> #define MON 1 #define SAT 6 int isMonSatPrime(int cand){ if (cand % 7 != 1 && cand % 7 != 6){ return(0); } int limit = sqrt(cand); int i = 6; int next = MON; if (cand < 2){ return(0); } while (i > 1){ if (cand % i == 0){ break; } if (next == SAT){ i += 5; next = MON; ...
a.cc: In function 'int isMonSatPrime(int)': a.cc:11:21: error: 'sqrt' was not declared in this scope 11 | int limit = sqrt(cand); | ^~~~
s952664327
p00735
C++
#include<iostream> using namespace std; int a[500001], i, j, n; int main() { for (i = 2; i < 500001; i++) { if (i % 7 == 1 || i % 7 == 6) { for (j = 2; j <= sqrt(i); j++) { if (a[j] == 1 && i%j==0) { a[i] = 0; goto E; } } a[i] = 1; E:; } } while (true) { cin >> n; if (n < 2) { break;...
a.cc: In function 'int main()': a.cc:6:42: error: 'sqrt' was not declared in this scope 6 | for (j = 2; j <= sqrt(i); j++) { | ^~~~
s904107408
p00735
C++
#include<algorithm> using namespace std;int a[500001],i,j,n; main(){ for(i=2;i<500001;i++){ if(i%7==1||i%7==6){ for(j=2;j<=sqrt(i);j++){ if(a[j]==1&&i%j==0){ a[i]=0;goto E; } } a[i]=1; E:; } } while(true){ cin>>n; if(n<2){break;}printf("%d:",n); for(i=2;i<=n;i++){ if(a[i]==1&&n%i==0){printf(" %d", i);} } cout<<endl; }...
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:6:12: error: 'sqrt' was not declared in this scope 6 | for(j=2;j<=sqrt(i);j++){ | ^~~~ a.cc:16:1: error: 'cin' was not declared in this scope 16...
s289823030
p00735
C++
#include <iostream> using namespace std; void prime(int n); bool subprime(int n); int main(){ int n; while (true){ cin >> n; if (n == 1){ break; } prime(n); } return 0; } void prime(int n){ cout << n << ": "; int s = (int)sqrt(n); //????????? int r = 0; int i = 6; while (i <= n){//6 8 13 15 if (n%i == ...
a.cc: In function 'void prime(int)': a.cc:16:22: error: 'sqrt' was not declared in this scope 16 | int s = (int)sqrt(n); //????????? | ^~~~
s912818591
p00735
C++
#include <iostream> using namespace std; void prime(int n); bool subprime(int n); int main(){ int n; while (true){ cin >> n; if (n == 1){ break; } prime(n); } return 0; } void prime(int n){ cout << n << ": "; int s = (int)sqrt(n); //????????? int r = 0; int i = 6; while (i <= n){//6 8 13 15 if (n%i == ...
a.cc: In function 'void prime(int)': a.cc:16:22: error: 'sqrt' was not declared in this scope 16 | int s = (int)sqrt(n); //????????? | ^~~~
s234578233
p00735
C++
lude <bits/stdc++.h> #define r(i,a,n) for(int i=a;i<n;i++) using namespace std; int main(){ int a[200000],c=0,n; r(i,3,300000)if(i%7==1||i%7==6){ int p=1;if(i>10&&(i%6==0||i%8==0))continue; r(k,0,c)if(i%a[k]==0)p=0; if(p)a[c++]=i; }r(i,0,c)cout<<a[i]<<endl; while(cin>>n,n!=1){ int s=0; cout<<n<<':'; r(i...
a.cc:1:1: error: 'lude' does not name a type 1 | lude <bits/stdc++.h> | ^~~~ a.cc: In function 'int main()': a.cc:10:18: error: 'cout' was not declared in this scope 10 | }r(i,0,c)cout<<a[i]<<endl; | ^~~~ a.cc:10:30: error: 'endl' was not declared in this scope 10 | ...
s586938435
p00735
C++
#include <iostream> #include <vector> #include <math.h> std::vector<int> ans; std::vector<int> prime; void calc( int n, int i ) { for ( int j = i; j < prime.size(); j++ ) { int m = prime[j]; if ( !(n % m) ) { ans.push_back(m); calc(n/m, j); } } } int main() { prime.push_back(6); for ( int i = 7; i <...
a.cc: In function 'int main()': a.cc:43:22: error: 'sort' is not a member of 'std'; did you mean 'sqrt'? 43 | std::sort(ans.begin(), ans.end()); | ^~~~ | sqrt a.cc:44:32: error: 'unique' is not a member of 'std' 44 | ans.erase(s...
s897494208
p00735
C++
#include <iostream> using namespace std; bool is_msprime(int a) // a is ms number { int j; j = 6; while (j * j <= a) { if (a % j == 0) return false; if (j % 7 == 1) { j = 7 *(j / 7) + 6; } else if (j % 7 == 6) j = 7 *(j / 7) + 8; } return a != 1; } int main() { int n; int i; c...
a.cc: In function 'int main()': a.cc:29:23: error: expected ')' before 'i' 29 | if (is_msprime(7 i - 1) && n % (7 i - 1) == 0) { | ~ ^ ~ | ) a.cc:29:41: error: expected ')' before 'i' 29 | if (is_msprime(7 i - 1) && n % (7 i - 1) == 0) { ...
s780939117
p00735
C++
#include <bits/stdc++.h> #define FOR(i, a, b) for(long long int i=(a);i<=(b);i++) #define RFOR(i, a, b) for(long long int i=(a);i>=(b);i--) #define MOD 1000000007 #define INF 1000000000 //2000000000 #define LLINF 1000000000000000000 //9000000000000000000 #define PI 3.14159265358979 using namespace std; typedef long l...
a.cc: In function 'int main()': a.cc:50:37: error: 'check' was not declared in this scope 50 | if (check) { | ^~~~~
s858469618
p00735
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s614905486
p00735
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
s679124324
p00735
C++
#include <iostream> #include <algorithm> #include <vector> #include <map> #include <cmath> #define rep(i,n) for(int i = 0; i < n; i++) #define rrep(i,n) for(int i = n - 1; i >= 0; i--) #define REP(i,k,n) for(int i = k; i < n; i++) #define vi vector<int> #define pb push_back using namespace std; const int MAX_N = 300...
a.cc: In function 'void sieve()': a.cc:19:5: error: 'memset' was not declared in this scope 19 | memset(is_prime,false,sizeof(is_prime)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <cmath> +++ |+#include...
s251265632
p00735
C++
#include <iostream> #include <algorithm> #include <cctype> #include <cstdio> #include <math.h> using namespace std; int main(){ int p[100000],k; memset(p,0,sizeof(p)); p[0]=6; for(int i=1;i<100000;i++){ if(i%2==0)k=i/2*7+6; else k=(i-1)/2*7+8; for(int j=0;j<100000;j++){ if(p[j]==0){p[j]=k;break;} if(...
a.cc: In function 'int main()': a.cc:11:9: error: 'memset' was not declared in this scope 11 | memset(p,0,sizeof(p)); | ^~~~~~ a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <math.h> +++ |+#include <cstring> ...
s128760686
p00735
C++
#include <iostream> using namespace std; int main(){ bool prime[3e5]; for(int i=6;i<3e5;i++){ if (!(i%7-1)||!(i%7-6)){ prime[i] = true; for(int j=1;j*j<=i;j++) if (((7*j-1)<i&&i%(7*j-1)==0)||((7*j+1)<i&&i%(7*j+1)==0)) prime[i] = false; } else prime[i] = false; } cout << <<...
a.cc: In function 'int main()': a.cc:6:14: error: conversion from 'double' to 'long unsigned int' in a converted constant expression 6 | bool prime[3e5]; | ^~~ a.cc:6:14: error: could not convert '3.0e+5' from 'double' to 'long unsigned int' 6 | bool prime[3e5]; | ^~~ ...
s340958426
p00735
C++
#include<iostream> #include<string.h> #define MAX 300001 using namespace std; bool prime[MAX] int main(void){ int n,p,num; p=0; memset(prime,true,sizeof(prime)); for(int i=0;i<6;i++){ prime[i]=false; } for(int i=2;i<=MAX;i++){ for(int j=6*i;j<=MAX;j++){ if(prime[i]){ prime[j]=false; } ...
a.cc:9:1: error: expected initializer before 'int' 9 | int main(void){ | ^~~
s224552405
p00735
C++
#include<iostream> #include<string.h> #define MAX 300001 using namespace std; bool prime[MAX] int main(void){ int n,p,num; p=0; memset(prime,true,sizeof(prime)); for(int i=0;i<6;i++){ prime[i]=false; } for(int i=2;i<=MAX;i++){ for(int j=6*i;j<=MAX;j++){ if(prime[i]){ prime[j]=false; } ...
a.cc:9:1: error: expected initializer before 'int' 9 | int main(void){ | ^~~
s054313060
p00735
C++
#include<iostream> #include<string.h> #define MAX 300001 using namespace std; bool prime[MAX]; int main(void){ int n,p,num; p=0; memset(prime,true,sizeof(prime)); for(int i=0;i<6;i++){ prime[i]=false; } for(int i=2;i<=MAX;i++){ for(int j=6*i;j<=MAX;j++){ if(prime[i]){ prime[j]=false; } ...
a.cc: In function 'int main()': a.cc:34:55: error: expected ')' before '{' token 34 | if(prime[i] && 0==(n%prime[i]){ | ~ ^ | ) a.cc:37:17: error: expected primary-expression ...
s437668052
p00735
C++
#include<iostream> #include<string.h> #define MAX 300001 using namespace std; bool prime[MAX]; int main(void){ int n,p,num; p=0; memset(prime,true,sizeof(prime)); for(int i=0;i<6;i++){ prime[i]=false; } for(int i=2;i<=MAX;i++){ for(int j=6*i;j<=MAX;j++){ if(prime[i]){ prime[j]=false; } ...
a.cc: In function 'int main()': a.cc:34:61: error: expected ')' before '{' token 34 | if(prime[i]==true && 0==(n%prime[i]){ | ~ ^ | ) a.cc:37:17: error: expected p...
s393606973
p00735
C++
#include<iostream> #include<string.h> #define MAX 300001 using namespace std; bool prime[MAX]; int table[MAX]; int main(void){ int n,p,num; p=0; memset(prime,true,sizeof(prime)); memset(table,0,sizeof(table)); for(int i=0;i<6;i++){ prime[i]=false; } for(int i=6;i<=MAX;i++){ for(int j=6*i;j<=MAX;j+...
a.cc:45:1: error: expected declaration before '}' token 45 | } | ^
s486610952
p00735
C++
#include <iostream> #include <sstream> #include <stdio.h> #include <ctype.h> #include <vector> #include <string> #include <algorithm> using namespace std; typedef vector< vector<int> > vector2d; string IntToString(int number) { string stream ss; ss << number; return ss.str(); } int main (){ int i,j,n; ve...
a.cc: In function 'std::string IntToString(int)': a.cc:14:17: error: expected initializer before 'ss' 14 | string stream ss; | ^~ a.cc:15:3: error: 'ss' was not declared in this scope 15 | ss << number; | ^~
s737989792
p00735
C++
#include <iostream> #include <sstream> #include <stdio.h> #include <ctype.h> #include <vector> #include <string> #include <algorithm> using namespace std; typedef vector< vector<int> > vector2d; string IntToString(int number) { stringstream ss; ss << number; return ss.str(); } int main (){ int i,j,n; vec...
a.cc: In function 'int main()': a.cc:23:3: error: 's' was not declared in this scope 23 | s | ^ a.cc:27:5: error: 'judge' was not declared in this scope 27 | judge[i*7+1] = 1; | ^~~~~ a.cc:33:9: error: 'judge' was not declared in this scope 33 | if (judge[i]==1){ | ^~~...
s163122201
p00735
C++
#include <iostream> #include <sstream> #include <stdio.h> #include <ctype.h> #include <vector> #include <string> #include <algorithm> using namespace std; typedef vector< vector<int> > vector2d; string IntToString(int number) { stringstream ss; ss << number; return ss.str(); } int main (){ int i,j,n; vec...
a.cc:61:2: error: stray '#' in program 61 | }#include <iostream> | ^ a.cc:121:2: error: stray '#' in program 121 | }#include <iostream> | ^ a.cc:61:3: error: 'include' does not name a type 61 | }#include <iostream> | ^~~~~~~ a.cc:72:8: error: redefinition of 'std::string IntToString(int)' ...
s343242883
p00735
C++
null
a.cc:1:1: error: 'null' does not name a type 1 | null | ^~~~
s248513127
p00736
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; /** * Created by S64 on 15/07/29. */ // ????§?: 1??????34???43?§? // ??????: 0??????00???00?§? (????????????) class Main { enum Logic { False, // 0 ...
Main.java:42: error: as of release 9, '_' is a keyword, and may not be used as an identifier public static void main(String _[]) throws IOException { ^ 1 error
s186029288
p00736
Java
package icpc2008_java; import java.util.Scanner; public class C { static int and[][] = { { 0, 0, 0 }, { 0, 1, 1 }, { 0, 1, 2 } };// i*j static int or[][] = { { 0, 1, 2 }, { 1, 1, 2 }, { 2, 2, 2 } }; static boolean isNum(char c) { return '0' <= c && c <= '9'; } static void replace(StringBuilder sb, int p, int...
Main.java:5: error: class C is public, should be declared in a file named C.java public class C { ^ 1 error
s212585638
p00736
Java
import java.util.Scanner; public class C { static int and[][] = { { 0, 0, 0 }, { 0, 1, 1 }, { 0, 1, 2 } };// i*j static int or[][] = { { 0, 1, 2 }, { 1, 1, 2 }, { 2, 2, 2 } }; static boolean isNum(char c) { return '0' <= c && c <= '9'; } static void replace(StringBuilder sb, int p, int q, int r) { for (int ...
Main.java:3: error: class C is public, should be declared in a file named C.java public class C { ^ 1 error
s483689721
p00736
Java
import java.util.Scanner; public class Main1 { static char[] s; static char[] var; static int[] PQR; static int[] tuf = {0, 1, 2};// true, unknown, false static int idx; static int varCount; public static void main(String[] args) { Scanner cin = new Scanner(System.in); while(true){ varCount=idx=0; St...
Main.java:3: error: class Main1 is public, should be declared in a file named Main1.java public class Main1 { ^ 1 error
s221940074
p00736
Java
package p1155; import java.util.Scanner; public class Main3 { static char[] s; static int[] PQR; static int[] tuf = {0, 1, 2};// true, unknown, false static int idx; public static void main(String[] args) { Scanner cin = new Scanner(System.in); while(true){ idx=0; String str = cin.next(); if(str.e...
Main.java:6: error: class Main3 is public, should be declared in a file named Main3.java public class Main3 { ^ 1 error
s847858306
p00736
C
#define M(x,y)(x>y?x:y) #define m(x,y)(x<y?x:y) I;int parse(char *p){switch(*p){ case'0':return 0; case'1':return 1; case'2':return 2; case'P':return I%3; case'Q':return I/3%3; case'R':return I/9%3; case'-':return 2-parse(p+1); case'(':{ int x=0; char*q=++p; for(;;p++){ if(*p=='(')x++; if(*p==')')x-...
main.c:3:1: warning: data definition has no type or storage class 3 | I;int parse(char *p){switch(*p){ | ^ main.c:3:1: error: type defaults to 'int' in declaration of 'I' [-Wimplicit-int] main.c: In function 'parse': main.c:22:6: error: 'p' redeclared as different kind of symbol 22 | char p[81];main(s){for...
s551077582
p00736
C++
#include<iostream> #include<string> #include<cctype> #define REP(i,n) for(int i=0;i<(n);i++) using namespace std; typedef long long Int; typedef string::const_iterator Itr; int P, Q, R; int expression(Itr &itr); int term(Itr &itr); int factor(Itr &itr); int letter(Itr &itr); int not(int n) { if (n == 0)return 2; e...
a.cc:16:5: error: expected unqualified-id before 'not' token 16 | int not(int n) | ^~~
s144631819
p00736
C++
#include<iostream> #include<iomanip> #include<string> #include<cstring> #include<vector> #include<set> #include<cmath> using namespace std; typedef vector<int> vi; const int MAX_V=1e3+5; const int INF=1e9; vector< vector<int> > board(25,vector<int>(25,0) ); int w,h; int sy,sx,gy,gx; int dx[]={-1,0,1,0}; int dy[]={0,-1,...
a.cc: In function 'int factor(std::string&, int&)': a.cc:35:3: error: 'assert' was not declared in this scope 35 | assert(s[i]=='('); | ^~~~~~ a.cc:8:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>' 7 | #include<cmath> +++ |+#include <cassert...
s965687945
p00736
C++
string in; int pos; int p,q,r; int formula(){ if(isdigit(in[pos])){ return in[pos++]-'0'; } switch(in[pos]){ case 'P':++pos; return p; case 'Q':++pos; return q; case 'R':++pos; return r; } if(in[pos]=='-'){ ++pos; return 2-formula(); } ++pos; int a=formula(); char cc=in[pos++]; ...
a.cc:1:1: error: 'string' does not name a type 1 | string in; | ^~~~~~ a.cc: In function 'int formula()': a.cc:6:14: error: 'in' was not declared in this scope; did you mean 'int'? 6 | if(isdigit(in[pos])){ | ^~ | int a.cc:6:6: error: 'isdigit' was not declared in t...
s496435401
p00736
C++
#include<iostream> #include<string> string in; int pos; int p,q,r; int formula(){ if(isdigit(in[pos])){ return in[pos++]-'0'; } switch(in[pos]){ case 'P':++pos; return p; case 'Q':++pos; return q; case 'R':++pos; return r; } if(in[pos]=='-'){ ++pos; return 2-formula(); } ++pos; int...
a.cc:4:1: error: 'string' does not name a type; did you mean 'stdin'? 4 | string in; | ^~~~~~ | stdin a.cc: In function 'int formula()': a.cc:9:14: error: 'in' was not declared in this scope; did you mean 'int'? 9 | if(isdigit(in[pos])){ | ^~ | int a.cc:13:10:...
s242399095
p00736
C++
#include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<vector> #include<stack> #include<queue> #include<string> #include<cmath> //#include<> using namespace std; typedef long long ll; #define rep(i,j) for(i=0;i<j;i++) #define rev_rep(i,j) for(i=j;i>=0;i&#8212;-) int not_[3]={2,1,0}; int an...
a.cc:15:20: error: '#' is not followed by a macro parameter 15 | #define rev_rep(i,j) for(i=j;i>=0;i&#8212;-) | ^
s543154307
p00736
C++
#include <iostream> #include <string> using namespace std; int p, q, r, cursor; string s; int not(int a) { return 2 - a; } int and(int a, int b) { if(a == 0 || b == 0) return 0; if(a == 1 || b == 1) return 1; return 2; } int or(int a, int b) { if(a == 2 || b == 2) return 2; if(a == 1 || b == 1) return 1; ret...
a.cc:8:5: error: expected unqualified-id before 'not' token 8 | int not(int a) { | ^~~ a.cc:12:9: error: expected unqualified-id before 'int' 12 | int and(int a, int b) { | ^~~ a.cc:12:9: error: expected ')' before 'int' 12 | int and(int a, int b) { | ~^~~ | ...
s553704959
p00736
C++
#include <iostream> #include <string> using namespace std; int p, q, r, cursor; string s; int not(int a) { return 2 - a; } int and(int a, int b) { if(a == 0 || b == 0) return 0; if(a == 1 || b == 1) return 1; return 2; } int or(int a, int b) { if(a == 2 || b == 2) return 2; if(a == 1 || b == 1) return 1; ret...
a.cc:8:5: error: expected unqualified-id before 'not' token 8 | int not(int a) { | ^~~ a.cc:12:9: error: expected unqualified-id before 'int' 12 | int and(int a, int b) { | ^~~ a.cc:12:9: error: expected ')' before 'int' 12 | int and(int a, int b) { | ~^~~ | ...
s961439456
p00736
C++
#include <iostream> #include <string> using namespace std; int p, q, r, cursor; string s; int not(int a) { return 2 - a; } int and(int a, int b) { if(a == 0 || b == 0) return 0; if(a == 1 || b == 1) return 1; return 2; } int or(int a, int b) { if(a == 2 || b == 2) return 2; if(a == 1 || b == 1) return 1; ret...
a.cc:8:5: error: expected unqualified-id before 'not' token 8 | int not(int a) { | ^~~ a.cc:12:9: error: expected unqualified-id before 'int' 12 | int and(int a, int b) { | ^~~ a.cc:12:9: error: expected ')' before 'int' 12 | int and(int a, int b) { | ~^~~ | ...
s877073107
p00736
C++
#include <iostream> #include <string> using namespace std; int p, q, r, cursor; string s; int Not(int a) { return 2 - a; } int and(int a, int b) { if(a == 0 || b == 0) return 0; if(a == 1 || b == 1) return 1; return 2; } int or(int a, int b) { if(a == 2 || b == 2) return 2; if(a == 1 || b == 1) return 1; ret...
a.cc:12:9: error: expected unqualified-id before 'int' 12 | int and(int a, int b) { | ^~~ a.cc:12:9: error: expected ')' before 'int' 12 | int and(int a, int b) { | ~^~~ | ) a.cc:18:5: error: expected unqualified-id before 'or' token 18 | int or(int a, int b) { | ...
s893470268
p00736
C++
#include<iostream> #include<cstdio> #include<string> #include <cctype> #include <cassert> using namespace std; typedef int value; string s; size_t cur = 0; value P, Q, R; int ans = 0; value formula(); value not(){ assert(s[cur] == '-'); cur++; return 2 - formula(); } value and(value a, value b){ return (a<b) ? ...
a.cc:17:7: error: expected unqualified-id before 'not' token 17 | value not(){ | ^~~ a.cc:22:16: error: expected ')' before 'a' 22 | value and(value a, value b){ | ~ ^~ | ) a.cc:25:7: error: expected unqualified-id before 'or' token 25 | value or(value a, val...
s337724810
p00736
C++
#include<iostream> #include<cstdio> #include<string> #include <cctype> #include <cassert> using namespace std; typedef int value; string s; size_t cur = 0; value P, Q, R; int ans = 0; value not(); value and(value a, value b); value or(value a, value b); value formula(); value not(){ assert(s[cur] == '-'); ...
a.cc:15:7: error: expected unqualified-id before 'not' token 15 | value not(); | ^~~ a.cc:16:16: error: expected ')' before 'a' 16 | value and(value a, value b); | ~ ^~ | ) a.cc:17:7: error: expected unqualified-id before 'or' token 17 | value or(value a, val...
s579570851
p00736
C++
#include<iostream> #include<cstdio> #include<string> #include <cctype> #include <cassert> using namespace std; typedef int value; string s; size_t cur = 0; value P, Q, R; int ans = 0; value and(value a, value b){ return (a<b) ? a : b; } value or(value a, value b){ return (a<b) ? b : a; } value formula(){ value a,...
a.cc:15:16: error: expected ')' before 'a' 15 | value and(value a, value b){ | ~ ^~ | ) a.cc:18:7: error: expected unqualified-id before 'or' token 18 | value or(value a, value b){ | ^~ a.cc: In function 'value formula()': a.cc:53:38: error: expected identifier ...
s117353895
p00736
C++
#include<iostream> #include<cstdio> #include<string> #include <cctype> #include <cassert> using namespace std; typedef int value; string s; size_t cur = 0; value P, Q, R; int ans = 0; static value and(value a, value b){ return (a<b) ? a : b; } static value or(value a, value b){ return (a<b) ? b : a; } val...
a.cc:15:23: error: expected ')' before 'a' 15 | static value and(value a, value b){ | ~ ^~ | ) a.cc:18:14: error: expected unqualified-id before 'or' token 18 | static value or(value a, value b){ | ^~ a.cc: In function 'value formula()': a.c...
s246722061
p00736
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; string S,T; int sum; char U[4]="012"; int x[10000]; int bit(int c,bool d){ if(d==true){return c;} return minus(c); } int minus(int c){return 2-c;} int plus(int c,int d){return max(c,d);} int kake(int c,int d){return max(c,d);} int kaiseki...
a.cc: In function 'int bit(int, bool)': a.cc:13:23: error: class template argument deduction failed: 13 | return minus(c); | ^ a.cc:13:23: error: no matching function for call to 'minus(int&)' In file included from /usr/include/c++/14/string:49, from /usr/include/...
s163168462
p00736
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; string S,T; int sum; char U[4]="012"; int x[10000]; int bit(int c,bool d){ if(d==true){return c;} return minus(c); } int minus(int c){return 2-c;} int plus(int c,int d){return max(c,d);} int kake(int c,int d){return max(c,d);} string tstr...
a.cc: In function 'int bit(int, bool)': a.cc:13:23: error: class template argument deduction failed: 13 | return minus(c); | ^ a.cc:13:23: error: no matching function for call to 'minus(int&)' In file included from /usr/include/c++/14/string:49, from /usr/include/...
s865385400
p00736
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; #define MAX_N 10000 int bit(int c,int d); int minus(int c); int kake(int c,int d); int plus(int c,int d); string tstring(int c); string S,T; int sum; char U[4]="012"; int x[MAX_N]; int bit(int c,bool d){ if(d==true){return c;} return min...
a.cc: In function 'int bit(int, bool)': a.cc:21:16: error: reference to 'minus' is ambiguous 21 | return minus(c); | ^~~~~ 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/bi...
s985243010
p00736
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; #define MAX_N 10000 int bit(int C1,bool C2); int minus(int C3); int kake(int C4,int C5); int plus(int C6,int C7); string tstring(int C8); string S,T; int sum; char U[4]="012"; int x[MAX_N]; int bit(int C1,bool C2){ if(C2==true){return C1;...
a.cc: In function 'int bit(int, bool)': a.cc:21:16: error: reference to 'minus' is ambiguous 21 | return minus(C1); | ^~~~~ 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/b...
s569892852
p00736
C++
#include <algorithm> #include <cmath> #include <climits> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <cassert> #include <func...
a.cc: In function 'int num(std::string&, int&)': a.cc:88:13: error: expected unqualified-id before 'not' token 88 | int not= 0; | ^~~ a.cc:91:22: error: expected primary-expression before ';' token 91 | not++; | ^ a.cc:96:16: error: expected pri...
s842753575
p00736
C++
#include <algorithm> #include <cmath> #include <climits> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <cassert> #include <func...
a.cc: In function 'int num(std::string&, int&)': a.cc:88:13: error: expected unqualified-id before 'not' token 88 | int not= 0; | ^~~ a.cc:91:22: error: expected primary-expression before ';' token 91 | not++; | ^ a.cc:96:16: error: expected pri...
s431316929
p00736
C++
#include <algorithm> #include <cmath> #include <climits> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <cassert> #include <func...
a.cc: In function 'int brac(std::string&, int&)': a.cc:81:49: error: 'number' was not declared in this scope 81 | if (isdigit(s[idx])||s[idx]=='-')return number(s, idx); | ^~~~~~ a.cc: In function 'int number(std::string&, int&)': a.cc:88:13: error: expec...
s343041618
p00736
C++
#include <algorithm> #include <cmath> #include <climits> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <cassert> #include <func...
a.cc: In function 'int brac(std::string&, int&)': a.cc:82:24: error: 'number' was not declared in this scope 82 | return number(s, idx); | ^~~~~~ a.cc: In function 'int number(std::string&, int&)': a.cc:89:13: error: expected unqualified-id before 'not' token 89 | ...
s608206022
p00736
C++
#include <algorithm> #include <cmath> #include <climits> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> #include <cassert> #include <func...
a.cc: In function 'int number(std::string&, int&)': a.cc:89:13: error: expected unqualified-id before 'not' token 89 | int not= 0; | ^~~ a.cc:92:22: error: expected primary-expression before ';' token 92 | not++; | ^ a.cc:97:16: error: expected ...
s564363603
p00736
C++
#include <iostream> #include <cstdio> #include <algorithm> #include <iomanip> #include <cmath> #define MAX_N 100 using namespace std; char form[MAX_N]; char str[MAX_N]; int calc_form(int l, int r){ //l-r???????????????????¨???? int former, latter; int count = 0; int i; if(str[l] == '0') return 0; if(str[l] == ...
a.cc: In function 'int main()': a.cc:54:17: error: 'strcpy' was not declared in this scope 54 | strcpy(str, form); | ^~~~~~ a.cc:6:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 5 | #include <cmath> +++ |+#includ...
s761390597
p00736
C++
#include <iostream> #include <string> using namespace std; int nottable[3] = { 2,1,0 }; int andtable[3][3] = { {0,0,0},{0,1,1},{0,1,2} }; int ortable[3][3] = { {0,1,2},{1,1,2},{2,2,2} }; char tochar(int num) { if (num == 0) { return '0'; } else if (num == 1) { return '1'; } else { return '2'; } } int sol...
a.cc: In function 'int main()': a.cc:86:61: error: cannot bind non-const lvalue reference of type 'std::__cxx11::basic_string<char>::iterator&' to an rvalue of type 'std::__cxx11::basic_string<char>::iterator' 86 | if (solve(temp.begin()) == 2) { | ...
s885258135
p00736
C++
#include <iostream> #include <string> using namespace std; int nottable[3] = { 2,1,0 }; int andtable[3][3] = { {0,0,0},{0,1,1},{0,1,2} }; int ortable[3][3] = { {0,1,2},{1,1,2},{2,2,2} }; char tochar(int num) { if (num == 0) { return '0'; } else if (num == 1) { return '1'; } else { return '2'; } } int sol...
a.cc: In function 'int main()': a.cc:86:61: error: cannot bind non-const lvalue reference of type 'std::__cxx11::basic_string<char>::iterator&' to an rvalue of type 'std::__cxx11::basic_string<char>::iterator' 86 | if (solve(temp.begin()) == 2) { | ...
s006206402
p00736
C++
package icpc2008_java; import java.util.Scanner; public class C { static int and[][] = { { 0, 0, 0 }, { 0, 1, 1 }, { 0, 1, 2 } };// i*j static int or[][] = { { 0, 1, 2 }, { 1, 1, 2 }, { 2, 2, 2 } }; static boolean isNum(char c) { return '0' <= c && c <= '9'; } static void replace(StringBuilder sb, int p, int...
a.cc:1:1: error: 'package' does not name a type 1 | package icpc2008_java; | ^~~~~~~ a.cc:3:1: error: 'import' does not name a type 3 | import java.util.Scanner; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: expected unqualified-id before 'public' 5 ...
s475470322
p00736
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
s298141093
p00736
C++
#include <bits/stdc++.h> using namespace std; #define INF_LL (int64)1e18 #define INF (int32)1e9 #define REP(i, n) for(int i = 0;i < (n);i++) #define FOR(i, a, b) for(int i = (a);i < (b);i++) #define all(x) x.begin(),x.end() #define fs first #define sc second using int32 = int_fast32_t; using uint32 = uint_fast32_t; u...
a.cc: In function 'int32 add(int32, int32)': a.cc:28:19: error: no matching function for call to 'min(int, int32)' 28 | return min(2, a+b); | ~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, ...
s976450301
p00736
C++
#include<iostream> #include<string> using namespace std; string exp; int now,ans,p,q,r; int multi(int x,int y){ return min(x,y); } int plus(int x,int y){ return max(x,y); } int minus(int x){ if(x==2) return 0; if(x==1) return 1; if(x==0) return 2; } int calc(){ if(exp[now]=='0' || exp[now]=='1' || exp[...
a.cc:5:8: warning: built-in function 'exp' declared as non-function [-Wbuiltin-declaration-mismatch] 5 | string exp; | ^~~ a.cc: In function 'int calc()': a.cc:41:24: error: reference to 'minus' is ambiguous 41 | return minus(calc()); | ^~~~~ In file incl...
s044247473
p00736
C++
#include<iostream> #include<string> using namespace std; string exp; int now,ans,p,q,r; int multi(int x,int y){ return min(x,y); } int plus(int x,int y){ return max(x,y); } int minus(int x){ if(x==2) return 0; if(x==1) return 1; if(x==0) return 2; return false; } int calc(){ if(exp[now]=='0' || exp[now...
a.cc:5:8: warning: built-in function 'exp' declared as non-function [-Wbuiltin-declaration-mismatch] 5 | string exp; | ^~~ a.cc: In function 'int calc()': a.cc:42:24: error: reference to 'minus' is ambiguous 42 | return minus(calc()); | ^~~~~ In file incl...
s535946408
p00736
C++
#include <vector> #include <iostream> #include <algorithm> #include <string> #include <cassert> using namespace std; #define FOR(i,a,n) for(int i=a;i<n;i++) #define REP(i,n) FOR(i,0,n) typedef vector<int> vi; typedef vector<vi> vii; #define ALL(a) a.begin(),a.end() int not(int n){ switch(n){ case 0:return 2; case ...
a.cc:14:5: error: expected unqualified-id before 'not' token 14 | int not(int n){ | ^~~ a.cc:21:9: error: expected unqualified-id before 'int' 21 | int and(int x,int y){ | ^~~ a.cc:21:9: error: expected ')' before 'int' 21 | int and(int x,int y){ | ~^~~ | ) a....
s771689265
p00736
C++
#include <iostream> #include <string> using namespace std; struct node_t { virtual int eval(int p, int q, int r) = 0; }; struct lit : public node_t { const int val; lit(int v) : val(v) { } int eval(int p, int q, int r) { return val; } }; struct var : public node_t { const char name; var(char name) : name(na...
a.cc:30:8: error: expected identifier before 'not' token 30 | struct not : public node_t | ^~~ a.cc:30:8: error: expected unqualified-id before 'not' token a.cc:45:8: error: expected identifier before 'or' token 45 | struct or : public node_t | ^~ a.cc:45:8: error: expected unqualified-i...
s164648895
p00736
C++
#include <iostream> #include <cstdio> #include <set> #include <cassert> using namespace std; string str; int P,Q,R; int Minus[] = {2, 1, 0}; int Prod[][3] = { {0, 0, 0}, {0, 1, 1}, {0, 1, 2}}; int Sum[][3] = { {0, 1, 2}, {1, 1, 2}, {2, 2, 2}}; typedef pair<int, int> Res; Res formula(int i) { if (st...
a.cc:90:8: error: redefinition of 'std::string str' 90 | string str; | ^~~ a.cc:8:8: note: 'std::string str' previously declared here 8 | string str; | ^~~ a.cc:92:5: error: redefinition of 'int P' 92 | int P,Q,R; | ^ a.cc:10:5: note: 'int P' previously declared here 10 ...