submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s801128832
p03693
Java
public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int[] a = { 0, 0, 0, 0 }; int[] b = { 0, 0, 0, 0 }; int n = 0; for (int i = 1; i < 4; i++) { do { do { a[i] = stdIn.nextInt(); } while (a[i] < 0 && 10 < a[i]); for (int j = 1; j <= i; j++) { if (b[j] == a[i]) { n = 1; break; } else n = 0; } b[i] = a[i]; } while (n == 1); } System.out.println(); n = a[1]*100+a[2]*10+a[3]; if(n % 4 == 0) System.out.println("Yes"); else System.out.println("No"); }
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) 1 error
s161975654
p03693
Java
package main.java.tasks; import java.util.Scanner; import java.io.PrintWriter; public class Gayle1_1 { public void solve(int testNumber, Scanner in, PrintWriter out) { String checkString = in.next(); for (int ii=0;ii<checkString.length();ii++) { String chkchr = checkString.substring(ii,ii+1); if (checkString.indexOf(chkchr.charAt(0))!=ii) { out.print("exist"); return; } } out.print("not exist"); return; } }
Main.java:6: error: class Gayle1_1 is public, should be declared in a file named Gayle1_1.java public class Gayle1_1 { ^ 1 error
s609976752
p03693
C++
#include<stdio.h> int main(void) { int a; scanf("%d",&a); if(a%4=0){ printf("YES\n"); } else{ printf("NO\n"); } return 0; }
a.cc: In function 'int main()': a.cc:6:13: error: lvalue required as left operand of assignment 6 | if(a%4=0){ | ~^~
s139799273
p03693
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.StringTokenizer; public class A { public static void main(String[] args) throws IOException { FastScanner in = new FastScanner(System.in); int n= in.nextInt(); int a= in.nextInt()*10; int b= in.nextInt(); if((a+b)%4==0){ System.out.println("YES"); return; } System.out.println("NO"); } static class FastScanner { BufferedReader br; StringTokenizer st; public FastScanner(InputStream in) { br = new BufferedReader(new InputStreamReader(in)); st = new StringTokenizer(""); } public double nextDouble() throws NumberFormatException, IOException { return Double.parseDouble(next()); } public String next() throws IOException { if (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); return next(); } return st.nextToken(); } public int nextInt() throws IOException { return Integer.parseInt(next()); } public long nextLong() throws IOException { return Long.parseLong(next()); } } }
Main.java:7: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s706770702
p03693
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(void){ int r,g,b,num; cin >> r; cin >> g; cin >> b; num = g*10+b; cout << (num%4==0) ? "YES" : "NO" << endl; }
a.cc: In function 'int main()': a.cc:12:39: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 12 | cout << (num%4==0) ? "YES" : "NO" << endl; | ~~~~~^~~~~~~
s026326755
p03693
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(void){ int ai[100],c[9]; int N,i,sum,max,min; scanf("%d",&N); for(i = 0;i < 9; i++) c[i] = 0; for(i = 0;i < N; i++){ scanf("%d",&ai[i]) if((ai[i] / 400) < 8){ c[ai[i] / 400] = 1; }else{ c[ai[9] / 400]++; } } for(i = 0;i < 8; i++) sum += c[i]; min = sum; max = sum; if(c[ai[9]] > 0){ min++; max + c[ai[9]]; } if(min > 8) min = 8; if(max > 8) max = 8; }
main.c: In function 'main': main.c:12:43: error: expected ';' before 'if' 12 | scanf("%d",&ai[i]) | ^ | ; 13 | if((ai[i] / 400) < 8){ | ~~
s181432621
p03693
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(void){ int ai[100]; int N,i,max,min; scanf("&d",&N); for(i = 0;i < N; i++) scanf("&d",&ai[i]); max = ai[0]; min = ai[0]; for(i = 0;i < N; i++){ if(max < ai[i]) max = ai[i]; if(mix > ai[i]) min = ai[i]; } printf("%d" , max - min); }
main.c: In function 'main': main.c:15:28: error: 'mix' undeclared (first use in this function); did you mean 'min'? 15 | if(mix > ai[i]) min = ai[i]; | ^~~ | min main.c:15:28: note: each undeclared identifier is reported only once for each function it appears in
s723803695
p03693
C
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int ai[100]; int N,i,max,min; scanf("&d",&N); for(i = 0;i < N; i++) scanf("&d",&ai[i]); max = ai[0]; min = ai[0]; for(i = 0;i < N; i++){ if(max < ai[i]) max = ai[i]; if(mix > ai[i]) min = ai[i]; } printf("%d" , max - min); }
main.c: In function 'main': main.c:15:28: error: 'mix' undeclared (first use in this function); did you mean 'min'? 15 | if(mix > ai[i]) min = ai[i]; | ^~~ | min main.c:15:28: note: each undeclared identifier is reported only once for each function it appears in
s001085925
p03693
C++
#include<iostream> #include<string> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int r,g,b,total; cin >> r >> g >> b; r = r *100; g = g*10; sum = r+g+b; if (4 % total == 0) { cout << "YES" << endl; } else { cout << "NO" << endl; } system("pause"); return 0; }
a.cc: In function 'int main()': a.cc:16:9: error: 'sum' was not declared in this scope 16 | sum = r+g+b; | ^~~
s347830340
p03693
C++
num = raw_input().split() a = num[0] b = num[1] * 10 + num[2] if (a % 2 == 0 and b % 4 == 0) or (a % 2 == 1 and b % 4 == 2): print("YES") else: print("NO")
a.cc:1:1: error: 'num' does not name a type; did you mean 'enum'? 1 | num = raw_input().split() | ^~~ | enum
s909400498
p03693
C++
#include <iostream> using namespace std; int main(){ int r,g,b; cin>>r>>g>>b; if((r*100+g*10+b)%4=0)cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:7:18: error: lvalue required as left operand of assignment 7 | if((r*100+g*10+b)%4=0)cout<<"YES"<<endl; | ~~~~~~~~~~~~~~^~
s075217747
p03693
C
#include <stdio.h> int main(){ int i,N,max,min,ans; int a; max = 0; min = 1000; ans = 0; scanf( "%d", &N ); for( i = 0; i < N; i++){ scanf( "%d", &a ); if( a > max){ max =; } if( a < min ){ min = a; } } ans = max - min; printf("%d\n",ans); return 0; }
main.c: In function 'main': main.c:17:18: error: expected expression before ';' token 17 | max =; | ^
s069947072
p03693
Java
import java.util.*; public class RGBCards { public static void main(String[] args){ Scanner sc = new Scanner(System.in); // 整数の入力 int a = sc.nextInt(); // スペース区切りの整数の入力 int b = sc.nextInt(); int c = sc.nextInt(); if(((a*100+b*10+c) % 4) == 0){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:2: error: class RGBCards is public, should be declared in a file named RGBCards.java public class RGBCards { ^ 1 error
s233759951
p03693
C++
#include<iostream> int main(){ int r,g,b; cin >> r >> g >> b; int sum; sum = 100*r+10*g+b; if(sum%4 == 0) cout << "YES" << endl; else cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >> r >> g >> b; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:10:18: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | if(sum%4 == 0) cout << "YES" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:10:35: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | if(sum%4 == 0) cout << "YES" << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:11:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | else cout << "NO" << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | else cout << "NO" << endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s054351807
p03693
Java
public class Main { public static void main(String[] args) { System.out.println(new Main().run(args, System.in)); } public String run(String[] args, InputStream in) { String result = null; try { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String[] val = reader.readLine().replaceAll("\\s+", " ").split(" "); int R = Integer.parseInt(val[0]); int G = Integer.parseInt(val[1]); int B = Integer.parseInt(val[2]); if (((R*100 + G *10 + B) % 4) == 0) { result = "YES"; } else { result = "NO"; } } catch (IOException ex) { Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); } return result; } }
Main.java:5: error: cannot find symbol public String run(String[] args, InputStream in) { ^ symbol: class InputStream location: class Main Main.java:9: error: cannot find symbol BufferedReader reader = new BufferedReader(new InputStreamReader(in)); ^ symbol: class BufferedReader location: class Main Main.java:9: error: cannot find symbol BufferedReader reader = new BufferedReader(new InputStreamReader(in)); ^ symbol: class BufferedReader location: class Main Main.java:9: error: cannot find symbol BufferedReader reader = new BufferedReader(new InputStreamReader(in)); ^ symbol: class InputStreamReader location: class Main Main.java:21: error: cannot find symbol } catch (IOException ex) { ^ symbol: class IOException location: class Main Main.java:22: error: cannot find symbol Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); ^ symbol: variable Level location: class Main Main.java:22: error: cannot find symbol Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); ^ symbol: variable Logger location: class Main 7 errors
s269514519
p03693
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class main { public static void main(String[] args) throws IOException{ // 読み込み BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line; String[] temp; line=br.readLine(); temp=line.split(" "); String s = temp[0]+temp[1]+temp[2]; int i = Integer.valueOf(s); if (i%4==0){ System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:6: error: class main is public, should be declared in a file named main.java public class main { ^ 1 error
s431716263
p03693
Java
class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int r = in.nextInt(); int g = in.nextInt(); int b = in.nextInt(); int rgb = 100*r+10*g+b; if(rgb%4==0){ out.println("YES"); }else{ out.println("NO"); } }
Main.java:14: error: reached end of file while parsing } ^ 1 error
s885207273
p03693
C
#include <stdio.h> int main(void) { int r, g, b, A; printf("Rの値\n"); scanf_s("%d", &r); printf("Gの値\n"); scanf_s("%d", &g); printf("Bの値\n"); scanf_s("%d", &b); A = (r * 100 + g * 10 + b) % 4; if (A == 0) { printf("YES\n"); } else { printf("NO\n"); } return 0; }
main.c: In function 'main': main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 7 | scanf_s("%d", &r); | ^~~~~~~ | scanf
s539891092
p03693
C
#include <stdio.h> int main(void) { int r, g, b; scanf_s("%d", &r); scanf_s("%d", &g); scanf_s("%d", &b); if ((r * 100 + g * 10 + b) % 4 == 0) { printf("YES\n"); } else { printf("NO\n"); } return 0; }
main.c: In function 'main': main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | scanf_s("%d", &r); | ^~~~~~~ | scanf
s724971482
p03693
C++
#include<iostream> using namespace std; int main() { int r, g, b,sum; cin >> r >> g >> b; sum = 100 * r + 10 * g + b; if (sum % 4 == 0) cout << "YES" << endl; else count << "NO" << endl; }
a.cc: In function 'int main()': a.cc:14:17: error: 'count' was not declared in this scope 14 | count << "NO" << endl; | ^~~~~
s176008457
p03693
C++
# -*- coding: utf-8 -*- r, g, b = map(int,input().split()) a = g+b answer = a % 4 if answer == 0: print("YES") else: print("NO")
a.cc:1:3: error: invalid preprocessing directive #- 1 | # -*- coding: utf-8 -*- | ^ a.cc:3:1: error: 'r' does not name a type 3 | r, g, b = map(int,input().split()) | ^
s669853817
p03693
C++
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define ff first #define ss second #define mp make_pair #define pb push_back typedef long long llong; typedef pair<int, int> pii; void solve() { const int n = 3; int res = 0; for (int i = 0; i < n; i++) { int val; cin >> val; res = res * 10 + val; } bool ans = res % 4 == 0; if (ans) << cout << "YES"; else cout << "NO"; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); #ifdef LOCAL ifstream in("in"); cin.rdbuf(in.rdbuf()); #endif solve(); }
a.cc: In function 'void solve()': a.cc:25:18: error: expected primary-expression before '<<' token 25 | if (ans) << cout << "YES"; | ^~
s316526216
p03693
Java
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { static int r; static int g; static int b; static int rgb; public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); String[] param = line.split(" "); String s = param[0]; String s2 = param[1]; String s3 = param[2]; r = 100 * Integer.parseInt(param[0]); g = 10 * Integer.parseInt(param[1]); b = Integer.parseInt(param[2]); rgb = r + g + b; if( (rgb % 4) == 0){ System.out.println("Yes"); }else{ System.out.println("No"); } }
Main.java:30: error: reached end of file while parsing } ^ 1 error
s845220710
p03693
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <cmath> using namespace std; int n; vector<int> a; void mainmain(){ for (int i = 0;i < 3; i++){ int n; cin >> n; a.push_back(n); } string str = to_string(a[1]) + to_string(a[2]); int b = stoi(str); if (b%4==0){cout << "YES" << endl;} else{cout << "NO" << endl;} }
/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
s620353581
p03693
C++
#include <iostream> using namespace std; int main(){ int r, g,b,sum; cin>>r>>g>>b; sum=r*100+g*10+b; if(sum%4==0)cout<<YES; if(sum%4!=0)cout<<NO; return 0; }
a.cc: In function 'int main()': a.cc:7:19: error: 'YES' was not declared in this scope 7 | if(sum%4==0)cout<<YES; | ^~~ a.cc:8:19: error: 'NO' was not declared in this scope 8 | if(sum%4!=0)cout<<NO; | ^~
s852170942
p03693
C++
#include <iostream> using namespace std; int main() { int r, g, b; cin >> r >> g >> b; cout << ((r * 100 + g * 10 + b) % 4 == 0) ? "YES" : "NO" << endl; }
a.cc: In function 'int main()': a.cc:10:66: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 10 | cout << ((r * 100 + g * 10 + b) % 4 == 0) ? "YES" : "NO" << endl; | ~~~~~^~~~~~~
s883155127
p03693
C++
#include <iostream> using namespace std; int main() { int r, g, b; cin >> r >> g >> b; cout << ((r * 100 + g * 10 + b) % 4 == 0) ? "YES" : "NO" << endl; }
a.cc: In function 'int main()': a.cc:10:66: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 10 | cout << ((r * 100 + g * 10 + b) % 4 == 0) ? "YES" : "NO" << endl; | ~~~~~^~~~~~~
s271090287
p03693
C
#include <stdio.h> int main(void){ // Here your code ! int a,b,c,ans; scanf("%d %d %d",&a,&b,&c); ans=100*a+10*b+c; if(ans%4==0){ printf("YES"); }else{ printf("NO") } }
main.c: In function 'main': main.c:10:21: error: expected ';' before '}' token 10 | printf("NO") | ^ | ; 11 | } | ~
s920367163
p03693
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Test { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String s = new String(in.readLine()); s = s.replaceAll(" ", ""); int i = Integer.parseInt(s); String opt; if(i%4 == 0) opt = "YES"; else opt = "NO"; System.out.println(opt); } }
Main.java:5: error: class Test is public, should be declared in a file named Test.java public class Test { ^ 1 error
s159242522
p03693
C++
int main(){ int N; std::cin >> N; int a[100]; for (int i = 0; i < N; ++i) { std::cin >> a[i]; } int col[13]{}; for (int i = 0; i < N; ++i) { col[(a[i] / 400)] += 1; } int colcount = 0; for (int i = 0; i < 8; ++i) { colcount += (col[i] ? 1 : 0); } int colfree = 0; for (int i = 8; i < 13; ++i) { colfree += col[i]; } int min = colcount; int max = colcount + colfree; if (min == 0) { min = 1; } std::cout << min << ' ' << max << std::endl; return 0; }
a.cc: In function 'int main()': a.cc:5:14: error: 'cin' is not a member of 'std' 5 | std::cin >> N; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | a.cc:10:22: error: 'cin' is not a member of 'std' 10 | std::cin >> a[i]; | ^~~ a.cc:10:22: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:35:14: error: 'cout' is not a member of 'std' 35 | std::cout << min << ' ' << max << std::endl; | ^~~~ a.cc:35:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:35:48: error: 'endl' is not a member of 'std' 35 | std::cout << min << ' ' << max << std::endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 |
s934771919
p03693
Java
import java.util.Scanner; import java.util.Arrays; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int a[] = new int[n]; Arrays.sort(a[]); System.out.println(a[n-1] - a[0]); } }
Main.java:10: error: '.class' expected Arrays.sort(a[]); ^ 1 error
s374238747
p03693
C++
#include<stdio.h> #include<string.h> int main(){ int no,i,left=0,right=0; scanf("%d",&no); getchar(); char s[200]; gets(s); for(i=0;i<no;i++){ if(s[i]=='(') left++; if(s[i]==')'){ if(left==0) right++; else left--; } } for(i=0;i<right;i++) printf("("); printf("%s",s); for(i=0;i<left;i++) printf(")"); printf("\n"); return 0; }
a.cc: In function 'int main()': a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'? 8 | gets(s); | ^~~~ | getw
s076336165
p03693
C++
#include <iostream> using namespace std; int main(void){ // Here your code ! int a,b,c; cin >> a >> b >> c; cout << (!((a*100+b*10+c)%4))?"YES":"NO" << endl; }
a.cc: In function 'int main()': a.cc:7:46: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<' 7 | cout << (!((a*100+b*10+c)%4))?"YES":"NO" << endl; | ~~~~~^~~~~~~
s240149952
p03693
C++
#include <iostream> int main(int argc, char const *argv[]) { int r,g,b std::cin >> r >> g >> b; r = 100 * r + 10 * g + b; r %= 4; if (r == 0) { std::cout << "YES" << '\n'; } else{ std::cout << "NO" << '\n'; } return 0; }
a.cc: In function 'int main(int, const char**)': a.cc:5:9: error: expected initializer before 'std' 5 | std::cin >> r >> g >> b; | ^~~ a.cc:6:32: error: 'b' was not declared in this scope 6 | r = 100 * r + 10 * g + b; | ^
s791866725
p03693
C++
#include <bits\stdc++.h> using namespace std; int main() { int r, g, b; cin >> r >> g >> b; int num = r*100 + g*10 + b; printf("%s\n", num%4==0?"YES":"NO"); return 0; }
a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory 1 | #include <bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s940434366
p03693
C++
#include <bits\stdc++.h> using namespace std; int main() { int r, g, b; cin >> r >> g >> b; int num = r*100 + g*10 + b; printf("%s\n", num%4==0?"YES":"NO"); return 0; }
a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory 1 | #include <bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s639109912
p03693
Java
import java.util.Scanner; public class MainA { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int r; int g; int b; while(true) { r = sc.nextInt(); g = sc.nextInt(); b = sc.nextInt(); if(r > 0 && r < 10 && g > 0 && g < 10 && b > 0 && b < 10) { break; } } String R = String.valueOf(r); String G = String.valueOf(g); String B = String.valueOf(b); String rgb = R + G + B; int changeRGB = Integer.parseInt(rgb); if(changeRGB % 4 == 0) { System.out.println("YES"); }else{ System.out.println("NO"); } } }
Main.java:3: error: class MainA is public, should be declared in a file named MainA.java public class MainA { ^ 1 error
s322072099
p03693
C++
#include <bits/stdc++.h> using namespace std; int main(){ int r, g, b; cin >> r >> g >> b; cout << ((10*g+b)%4 == 0 ? "YES" : "NO) << endl; return 0; }
a.cc:7:36: warning: missing terminating " character 7 | cout << ((10*g+b)%4 == 0 ? "YES" : "NO) << endl; | ^ a.cc:7:36: error: missing terminating " character 7 | cout << ((10*g+b)%4 == 0 ? "YES" : "NO) << endl; | ^~~~~~~~~~~~~ a.cc: In function 'int main()': a.cc:8:1: error: expected primary-expression before 'return' 8 | return 0; } | ^~~~~~ a.cc:7:35: error: expected ')' before 'return' 7 | cout << ((10*g+b)%4 == 0 ? "YES" : "NO) << endl; | ~ ^ | ) 8 | return 0; } | ~~~~~~
s477774967
p03693
Java
import java.util.Scanner; public class Zadanie { public static void main(String[] args) { Scanner a = new Scanner(System.in); char r = a.next().charAt(0); char g = a.next().charAt(0); char b = a.next().charAt(0); String l =""+ r + g+ b ; int w = Integer.valueOf(l); if (w % 4 == 0 ){ System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:3: error: class Zadanie is public, should be declared in a file named Zadanie.java public class Zadanie { ^ 1 error
s526801654
p03693
Java
import java.util.Scanner; /** * Created by Irka on 10.06.2017. */ public class a { public static void main(String[] args) { Scanner a = new Scanner(System.in); char r = a.next().charAt(0); char g = a.next().charAt(0); char b = a.next().charAt(0); String l =""+ r + g+ b ; int w = Integer.valueOf(l); if (w % 4 == 0 ){ System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:6: error: class a is public, should be declared in a file named a.java public class a { ^ 1 error
s955517085
p03693
Java
import java.util.Scanner; /** * Created by Irka on 10.06.2017. */ public class A { public static void main(String[] args) { Scanner a = new Scanner(System.in); char r = a.next().charAt(0); char g = a.next().charAt(0); char b = a.next().charAt(0); String l =""+ r + g+ b ; int w = Integer.valueOf(l); if (w % 4 == 0 ){ System.out.println("YES"); } else { System.out.println("NO"); } } }
Main.java:6: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s440258066
p03693
C++
include<bits/stdc++.h> using namespace std; int r,g,b; int main(){ cin>>r>>g>>b; int a=r*100+g*10+b; if(a%4==0){ cout<<"YES"<<endl; }else cout<<"NO"<<endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:5:5: error: 'cin' was not declared in this scope 5 | cin>>r>>g>>b; | ^~~ a.cc:8:9: error: 'cout' was not declared in this scope 8 | cout<<"YES"<<endl; | ^~~~ a.cc:8:22: error: 'endl' was not declared in this scope 8 | cout<<"YES"<<endl; | ^~~~ a.cc:9:11: error: 'cout' was not declared in this scope 9 | }else cout<<"NO"<<endl; | ^~~~ a.cc:9:23: error: 'endl' was not declared in this scope 9 | }else cout<<"NO"<<endl; | ^~~~
s609479287
p03693
Java
import java.util.Scanner; import java.io.*; import java.util.*; import java.math.*; import java.lang.*; import static java.lang.Math.*; class main implements Runnable{ static ArrayList <Integer> adj[]; static int co=0,f=0; static void Check2(int n){ adj=new ArrayList[n+1]; for(int i=0;i<=n;i++){ adj[i]=new ArrayList<>(); } } static void add(int i,int j){ adj[i].add(j); adj[j].add(i); } public static void main(String[] args) throws Exception { new Thread(null, new main(), "Check2", 1<<26).start();// to increse stack size in java } static long mod=(long)(1e9+7); public void run(){ /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ //Scanner in=new Scanner(System.in); InputReader in=new InputReader(System.in); PrintWriter w=new PrintWriter(System.out); int n=in.nextInt(); int a[]=new int[n]; for(int i=0;i<n;i++){ a[i]=in.nextInt(); } Arrays.sort(a); w.println(a[n-1]-a[0]); w.close(); } static class pair { int x,y; pair(int c,int d){ x=c; y=d; } } static class node{ int y; int val; node(int a,int b){ y=a; val=b; } } static void rec(String s,int a,int b,int n){ if(b==n){ System.out.println(s); return ; } String p=s; if(a>b){ s=p+")" ; rec(s,a,b+1,n); } if(a<n){ s=p+"("; rec(s,a+1,b,n); } } static class InputReader { private InputStream stream; private byte[] buf = new byte[1024]; private int curChar; private int numChars; private SpaceCharFilter filter; public InputReader(InputStream stream) { this.stream = stream; } public int read() { if (numChars==-1) throw new InputMismatchException(); if (curChar >= numChars) { curChar = 0; try { numChars = stream.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if(numChars <= 0) return -1; } return buf[curChar++]; } public String nextLine() { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } public int nextInt() { int c = read(); while(isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } int res = 0; do { if(c<'0'||c>'9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public long nextLong() { int c = read(); while (isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } long res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = read(); } while (!isSpaceChar(c)); return res * sgn; } public double nextDouble() { int c = read(); while (isSpaceChar(c)) c = read(); int sgn = 1; if (c == '-') { sgn = -1; c = read(); } double res = 0; while (!isSpaceChar(c) && c != '.') { if (c == 'e' || c == 'E') return res * Math.pow(10, nextInt()); if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = read(); } if (c == '.') { c = read(); double m = 1; while (!isSpaceChar(c)) { if (c == 'e' || c == 'E') return res * Math.pow(10, nextInt()); if (c < '0' || c > '9') throw new InputMismatchException(); m /= 10; res += (c - '0') * m; c = read(); } } return res * sgn; } public String readString() { int c = read(); while (isSpaceChar(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isSpaceChar(c)); return res.toString(); } public boolean isSpaceChar(int c) { if (filter != null) return filter.isSpaceChar(c); return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } public String next() { return readString(); } public interface SpaceCharFilter { public boolean isSpaceChar(int ch); } } }
Note: Main.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
s599649081
p03693
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if((a+b+c)%4==0) printf("YES\n); else printf("NO\n"); }
a.cc:7:26: warning: missing terminating " character 7 | if((a+b+c)%4==0) printf("YES\n); | ^ a.cc:7:26: error: missing terminating " character 7 | if((a+b+c)%4==0) printf("YES\n); | ^~~~~~~~ a.cc: In function 'int main()': a.cc:8:2: error: expected primary-expression before 'else' 8 | else printf("NO\n"); | ^~~~
s916215625
p03693
Java
import sun.security.mscapi.PRNG; import java.io.*; import java.util.*; public class GG { private static final int max = (int) 1e6 + 1; private static int[] prime = new int[max]; public static void main(String args[]) throws IOException { Reader in = new Reader(); PrintWriter out = new PrintWriter(System.out); int x = in.nextInt(); int y = in.nextInt(); int z = in.nextInt(); int total = (x * 100) + (y * 10) + (z); out.println(total % 4 == 0 ? "YES" : "NO"); out.close(); } private static void sieve() { for (int i = 2; i < max; i++) { if (prime[i] == 0) { prime[i] = i; for (int j = 2 * i; j < max; j += i) { prime[j] = i; } } } } static class Reader { final private int BUFFER_SIZE = 1 << 16; private DataInputStream din; private byte[] buffer; private int bufferPointer, bytesRead; public Reader() { din = new DataInputStream(System.in); buffer = new byte[BUFFER_SIZE]; bufferPointer = bytesRead = 0; } public Reader(String file_name) throws IOException { din = new DataInputStream(new FileInputStream(file_name)); buffer = new byte[BUFFER_SIZE]; bufferPointer = bytesRead = 0; } public String next() throws IOException { byte[] buf = new byte[64]; // line length int cnt = 0, c; while ((c = read()) != -1) { if (c == ' ') break; buf[cnt++] = (byte) c; } return new String(buf, 0, cnt); } public String nextLine() throws IOException { byte[] buf = new byte[64]; // line length int cnt = 0, c; while ((c = read()) != -1) { if (c == '\n') break; buf[cnt++] = (byte) c; } return new String(buf, 0, cnt); } public int nextInt() throws IOException { int ret = 0; byte c = read(); while (c <= ' ') c = read(); boolean neg = (c == '-'); if (neg) c = read(); do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (neg) return -ret; return ret; } public long nextLong() throws IOException { long ret = 0; byte c = read(); while (c <= ' ') c = read(); boolean neg = (c == '-'); if (neg) c = read(); do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (neg) return -ret; return ret; } public double nextDouble() throws IOException { double ret = 0, div = 1; byte c = read(); while (c <= ' ') c = read(); boolean neg = (c == '-'); if (neg) c = read(); do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (c == '.') { while ((c = read()) >= '0' && c <= '9') { ret += (c - '0') / (div *= 10); } } if (neg) return -ret; return ret; } private void fillBuffer() throws IOException { bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE); if (bytesRead == -1) buffer[0] = -1; } private byte read() throws IOException { if (bufferPointer == bytesRead) fillBuffer(); return buffer[bufferPointer++]; } public void close() throws IOException { if (din == null) return; din.close(); } } }
Main.java:6: error: class GG is public, should be declared in a file named GG.java public class GG { ^ Main.java:1: error: package sun.security.mscapi does not exist import sun.security.mscapi.PRNG; ^ 2 errors
s098076494
p03693
C++
#include <stdio.h> #include <stdlib.h> int main(void){ char str[3]; int i; scanf("%c %c %c",&str[0],&str[1],&str[2]); srt[3] = "\0"; if(atoi(str)%4 == 0){ printf("YES"); }else{ printf("NO"); } return 0; }
a.cc: In function 'int main()': a.cc:10:3: error: 'srt' was not declared in this scope; did you mean 'str'? 10 | srt[3] = "\0"; | ^~~ | str
s064131611
p03693
C
#include <stdio.h> #include <stdlib.h> int main(void){ char str[3]; int i; scanf("%c %c %c",&str[0],&str[1],&str[2]); if(atoi(str)%4 == 0){ printf("YES"); }else{ printf("NO"); } return 0;
main.c: In function 'main': main.c:17:3: error: expected declaration or statement at end of input 17 | return 0; | ^~~~~~
s135450633
p03693
Java
public class Main { public static void solveRGBCards() throws IOException { int r; int g; int b; String line; String[] split; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); line = br.readLine(); split = line.split(" "); r = Integer.parseInt(split[0]); g = Integer.parseInt(split[1]); b = Integer.parseInt(split[2]); if ((g * 10 + b) % 4 == 0) { System.out.println("YES"); } else { System.out.println("NO"); } br.close(); } public static void main(String[] args) { try { solveRGBCards(); } catch (IOException e) { e.printStackTrace(); } } }
Main.java:2: error: cannot find symbol public static void solveRGBCards() throws IOException { ^ symbol: class IOException location: class Main Main.java:8: error: cannot find symbol BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:8: error: cannot find symbol BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class BufferedReader location: class Main Main.java:8: error: cannot find symbol BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ^ symbol: class InputStreamReader location: class Main Main.java:26: error: cannot find symbol } catch (IOException e) { ^ symbol: class IOException location: class Main 5 errors
s667851343
p03693
C++
def main(): s = raw_input().split(" ") s = int(s[0]*100) + int(s[1]*10) + int(s[2]) if s%4==0: print("YES") else: print("NO") if __name__ == "__main__": main()
a.cc:1:1: error: 'def' does not name a type 1 | def main(): | ^~~
s182755737
p03693
C++
a = map(int, raw_input().split()) d = a[0] * 100 + a[1] * 10 * a[2] if d % 4 == 0: print "YES" else: print "NO"
a.cc:1:1: error: 'a' does not name a type 1 | a = map(int, raw_input().split()) | ^
s765086379
p03693
Java
public class A { public static int main(String[] args) { int number = Integer.parseInt(args[0])*100 + Integer.parseInt(args[1])*10 + Integer.parseInt(args[2]); if((number % 4) == 0){ System.out.println("Yes"); } else{ System.out.println("NO"); } return 0; } }
Main.java:1: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s845764561
p03693
Java
public static void main(String[] args) { int r = Integer.parseInt(args[0])*100; int g = Integer.parseInt(args[1])*10; int b = Integer.parseInt(args[2]); int number = r + g + b; if((number % 4) == 0){ System.out.println("Yes"); } System.out.println("NO"); }
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. public static void main(String[] args) { ^ (use --enable-preview to enable unnamed classes) 1 error
s082182201
p03693
Java
public class A { public static void main(String[] args) { int r = Integer.parseInt(args[0])*100; int g = Integer.parseInt(args[1])*10; int b = Integer.parseInt(args[2]); int number = r + g + b; if((number % 4) == 0){ System.out.println("Yes"); } System.out.println("NO"); } }
Main.java:1: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s912563105
p03693
C++
#include<stdio.h> #include<bits/stdc++.h> using namespace std; int main() { scanf("%d %d %d",&r,&g,&b); int a=(10*g)+b; if(a%4==0) printf("YES\n"); else printf("NO\n"); return 0; }
a.cc: In function 'int main()': a.cc:8:24: error: 'r' was not declared in this scope 8 | scanf("%d %d %d",&r,&g,&b); | ^ a.cc:8:27: error: 'g' was not declared in this scope 8 | scanf("%d %d %d",&r,&g,&b); | ^ a.cc:8:30: error: 'b' was not declared in this scope 8 | scanf("%d %d %d",&r,&g,&b); | ^
s214860915
p03693
C++
#include<stdio.h> #include<bits/stdc++.h> using namespace std; int main() { scanf("%d %d %d",&r,&g,&b); int a=(10*g)+b; if(a%4==0) printf("YES\n"); else printf("NO\n"); return 0; }
a.cc: In function 'int main()': a.cc:7:20: error: 'r' was not declared in this scope 7 | scanf("%d %d %d",&r,&g,&b); | ^ a.cc:7:23: error: 'g' was not declared in this scope 7 | scanf("%d %d %d",&r,&g,&b); | ^ a.cc:7:26: error: 'b' was not declared in this scope 7 | scanf("%d %d %d",&r,&g,&b); | ^
s479499740
p03693
C++
#include<iostream> #include<string> using namespace std; int main() { int r; int g; int b; cin >> r; cin >> g; cin >> b; while ((g*10+b*1)%== 0) { cout << "YES" << endl; } while ((g * 10 + b * 1) %!=0) { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:15:28: error: expected primary-expression before '=' token 15 | while ((g*10+b*1)%== 0) { | ^ a.cc:18:34: error: expected primary-expression before '!=' token 18 | while ((g * 10 + b * 1) %!=0) { | ^~
s777328266
p03693
C++
#include<bits/stdc++.h> #include<unordered_map> /* *▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ * ▀▀ ▀▀▀▀▀▀ ▀ ▀▀▀▀▀▀ ▀ ▀ * ▀ ▀ ▀ ▀ ▀ ▀ ▀ * ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀ * ▀ ▀▀▀▀ ▀ ▀ ▀ ▀ ▀ *▀ ▀ ▀ ▀ ▀ ▀ *▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ */ using namespace std; void afify() { ios::sync_with_stdio(0); ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } #define ll long long #define ld long double #define mk make_pair #define loop(i,intial,n) for(int i=int(intial);i<n;i++) #define loopn(j,n) for(int j=int(n-1);j>=0;j--) #define min3(a,b,c) min(a,min(b,c)) #define max3(a,b,c) max(a,max(b,c)) #define all(v) v.begin(),v.end() /////////////////////////////////////// #define SCD(a) scanf("%d",&a) #define SCD2(a,b) scanf("%d %d",&a,&b) #define SCLL(a) scanf("%lld",&a) #define SCLL2(a,b) scanf("%lld %lld",&a,&b) #define PRD(a) printf("%d\n",a) #define PRLL(a) printf("%lld\n",a) /////////////////////////////////////// typedef vector <int> vi; typedef vector <ll> vll; typedef vector <vi> vvi; typedef vector <vll> vvll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<pii> vpii; typedef vector<pll> vpll; typedef vector<vpll> vvpll; typedef vector<vpii> vvpii; typedef stringstream ss; const ll oo = (ll) 10e9 + 7; const double EPS = 1e-4; //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); //ifstream ifs("input.txt"); //ofstream ofs("output.txt"); int main() { afify(); int n; cin >> n; ll g = 0, b = 0, gn = 0, c = 0, b1 = 0, y = 0, o = 0, r = 0, dif = 0; loop(i, 0, n) { ll x; cin >> x; if (x >= 1 && x <= 399) { g = 1; } else if (x >= 400 && x <= 799) { b = 1; } else if (x >= 800 && x <= 1199) { gn = 1; } else if (x >= 1200 && x <= 1599) { c = 1; } else if (x >= 1600 && x <= 1999) { b1 = 1; } else if (x >= 2000 && x <= 2399) { y = 1; } else if (x >= 2400 && x <= 2799) { o = 1; } else if (x >= 2800 && x <= 3199) { r = 1; } else if (x > 3199) { dif++; } } ll z = g + b + gn + c + b1 + y + o + r; cout << max(z,ll(1)) << " " << z + dif; return 0; }
a.cc: In function 'int main()': a.cc:20:12: error: expected primary-expression before 'long' 20 | #define ll long long | ^~~~ a.cc:91:23: note: in expansion of macro 'll' 91 | cout << max(z,ll(1)) << " " << z + dif; | ^~
s481209423
p03693
C++
#include <bits/stdc++.h> using namespace std; #define INF 0x3f3f3f3f typedef long long ll; const int N = 310; #define FI first #define SE second typedef pair<int, int>pii; char num[N]; bool vis[N]; int main() int n; while (~scanf("%d%s", &n, num)) { memset(vis, 0, sizeof(vis)); string pre = ""; string end = ""; for (int i = 0; i < n; i++) if (!vis[i]) { int cur = i; if (num[i] == ')') { for (int j = i - 1; j >= 0; j--) if (num[j] == '(' && !vis[j]) { cur = j; vis[j] = true; break; } if (cur == i) pre = "(" + pre; }else if (num[i] == '(') { for (int j = i + 1; j < n; j++) if (num[j] == ')' && !vis[j]) { cur = j; vis[j] = true; break; } if (cur == i) end += ")"; } vis[i] = true; } printf("%s%s%s\n", pre.c_str(), num, end.c_str()); } return 0; }
a.cc:14:4: error: expected initializer before 'int' 14 | int n; | ^~~ a.cc:15:4: error: expected unqualified-id before 'while' 15 | while (~scanf("%d%s", &n, num)) | ^~~~~ a.cc:52:4: error: expected unqualified-id before 'return' 52 | return 0; | ^~~~~~ a.cc:54:1: error: expected declaration before '}' token 54 | } | ^
s462784615
p03693
C++
#include <iostream> #include <algorithm> using namespace std; int main() { int N; cin >> N; int t = N -1; int a[t]; for(int c = 0; c < N;c++){ cin >> a[c]; } sort(0,t); cout << a[t] - a[0] << "\n"; return 0; }
In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:17:7: required from here 17 | sort(0,t); | ~~~~^~~~~ /usr/include/c++/14/bits/stl_algo.h:1780:17: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~ In file included from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h:1780:25: error: invalid type argument of unary '*' (have 'int') 1780 | __val = _GLIBCXX_MOVE(*__i); | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1782:15: error: invalid type argument of unary '*' (have 'int') 1782 | *__first = _GLIBCXX_MOVE(__val); | ^~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = int; _Iterator2 = int]': /usr/include/c++/14/bits/stl_algo.h:1777:14: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1777 | if (__comp(__i, __first)) | ~~~~~~^~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1817:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1817 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1908:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1908 | std::__final_insertion_sort(__first, __last, __comp); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:17:7: required from here 17 | sort(0,t); | ~~~~^~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:16: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ /usr/include/c++/14/bits/predefined_ops.h:45:25: error: invalid type argument of unary '*' (have 'int') 45 | { return *__it1 < *__it2; } | ^~~~~~ In file included from /usr/include/c++/14/bits/stl_algo.h:61: /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1593:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1593 | std::__make_heap(__first, __middle, __comp); | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:17:7: required from here 17 | sort(0,t); | ~~~~^~~~~ /usr/include/c++/14/bits/stl_heap.h:344:11: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 344 | _ValueType; | ^~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:346:11: error: no type named 'difference_type' in 'struct std::iterator_traits<int>' 346 | _DistanceType; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h: In instantiation of 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/include/c++/14/bits/stl_algo.h:1596:19: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1596 | std::__pop_heap(__first, __middle, __i, __comp); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1868:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1868 | std::__heap_select(__first, __middle, __last, __comp); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1884:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = int; _Size = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1884 | std::__partial_sort(__first, __last, __last, __comp); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1905:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]' 1905 | std::__introsort_loop(__first, __last, | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ 1906 | std::__lg(__last - __first) * 2, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1907 | __comp); | ~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:4772:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = int]' 4772 | std::__sort(__first, __last, __gnu_cxx::__ops::__iter_less_iter()); | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ a.cc:17:7: required from here 17 | sort(0,t); | ~~~~^~~~~ /usr/include/c++/14/bits/stl_heap.h:258:9: error: no type named 'value_type' in 'struct std::iterator_traits<int>' 258 | _ValueType; | ^~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:260:9: error: no type named 'difference_type' in 'struct std::iterator_traits<int>' 260 | _DistanceType; | ^~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_heap.h:262:28: error: invalid type argument of unary '*' (have 'int') 262 | _ValueType __value = _GLIBCXX_MOVE(*__result); | ^~~~~~~~~~~~~ /usr/include/
s531952332
p03693
C++
#include<iostream> #include<math.h> using namespace std; int main(void){ int num[3]; cin >> num[2] >> num[1] >> num[0]; int sum = 0; for(int i = 2; i >= 0;i--;){ sum += num[i] * pow(10,i); } if(sum % 4 == 0){ cout << "YES" << endl; }else{ cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:30: error: expected ')' before ';' token 13 | for(int i = 2; i >= 0;i--;){ | ~ ^ | ) a.cc:13:31: error: expected primary-expression before ')' token 13 | for(int i = 2; i >= 0;i--;){ | ^
s187978204
p03693
C++
int main() { int a, b, c; cin >> a >> b >> c; cout << (((a * 100 + b * 10 + c) % 4 == 0) ? "YES" : "NO" )<< endl; return 0; }
a.cc: In function 'int main()': a.cc:3:9: error: 'cin' was not declared in this scope 3 | cin >> a >> b >> c; | ^~~ a.cc:4:9: error: 'cout' was not declared in this scope 4 | cout << (((a * 100 + b * 10 + c) % 4 == 0) ? "YES" : "NO" )<< endl; | ^~~~ a.cc:4:71: error: 'endl' was not declared in this scope 4 | cout << (((a * 100 + b * 10 + c) % 4 == 0) ? "YES" : "NO" )<< endl; | ^~~~
s527714262
p03693
C++
#include<iostream> #include<fstream> #include<stdio.h> #include<string> #include<vector> #include<map> #include<math.h> #include<algorithm> #include<iomanip> #include<set> using namespace std; int main() { int a, b,c; cin >> a >> b >> c; cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; return 0; }
a.cc: In function 'int main()': a.cc:18:34: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'int') 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~ | | | | | int | std::basic_ostream<char> a.cc:18:34: note: candidate: 'operator==(int, int)' (built-in) 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ a.cc:18:34: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int' In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)' 192 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:192:5: note: template argument deduction/substitution failed: a.cc:18:37: note: 'std::basic_ostream<char>' is not derived from 'const std::fpos<_StateT>' 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/string:43, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44: /usr/include/c++/14/bits/allocator.h:235:5: note: candidate: 'template<class _T1, class _T2> bool std::operator==(const allocator<_CharT>&, const allocator<_T2>&)' 235 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:235:5: note: template argument deduction/substitution failed: a.cc:18:37: note: 'std::basic_ostream<char>' is not derived from 'const std::allocator<_CharT>' 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/string:48: /usr/include/c++/14/bits/stl_iterator.h:441:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 441 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:441:5: note: template argument deduction/substitution failed: a.cc:18:37: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 486 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:486:5: note: template argument deduction/substitution failed: a.cc:18:37: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1667 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1667:5: note: template argument deduction/substitution failed: a.cc:18:37: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1737 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1737:5: note: template argument deduction/substitution failed: a.cc:18:37: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1033:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1033 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1033:5: note: template argument deduction/substitution failed: a.cc:18:37: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:629:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 629 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:629:5: note: template argument deduction/substitution failed: a.cc:18:37: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/string_view:637:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 637 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:637:5: note: template argument deduction/substitution failed: a.cc:18:37: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/string_view:644:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 644 | operator==(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:644:5: note: template argument deduction/substitution failed: a.cc:18:37: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/basic_string.h:3755:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3755 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3755:5: note: template argument deduction/substitution failed: a.cc:18:37: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/basic_string.h:3772:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3772 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3772:5: note: template argument deduction/substitution failed: a.cc:18:37: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ^ /usr/include/c++/14/bits/basic_string.h:3819:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3819 | operator==(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3819:5: note: template argument deduction/substitution failed: a.cc:18:37: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2558:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2558 | operator==(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2558:5: note: template argument deduction/substitution failed: a.cc:18:37: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 18 | cout << (a*100+b*10+c)%4 == 0 ? "YES" : "NO" << endl; | ^ In file included from /usr/include/c++/14/bits/locale_facets.h:48, from /usr/include/c++/14/bits/basic_ios.h:37,
s668733926
p03693
C++
#include <iostream> using namespace std; int r,g,b,ans; int main() { cin>>r>>g>>b; ans=(100*r+10*g+b)%4; if(ans==0)cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; } #include <iostream> using namespace std; int r,g,b,ans; int main() { cin>>r>>g>>b; ans=(100*r+10*g+b)%4; if(ans==0)cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }
a.cc:13:5: error: redefinition of 'int r' 13 | int r,g,b,ans; | ^ a.cc:3:5: note: 'int r' previously declared here 3 | int r,g,b,ans; | ^ a.cc:13:7: error: redefinition of 'int g' 13 | int r,g,b,ans; | ^ a.cc:3:7: note: 'int g' previously declared here 3 | int r,g,b,ans; | ^ a.cc:13:9: error: redefinition of 'int b' 13 | int r,g,b,ans; | ^ a.cc:3:9: note: 'int b' previously declared here 3 | int r,g,b,ans; | ^ a.cc:13:11: error: redefinition of 'int ans' 13 | int r,g,b,ans; | ^~~ a.cc:3:11: note: 'int ans' previously declared here 3 | int r,g,b,ans; | ^~~ a.cc:14:5: error: redefinition of 'int main()' 14 | int main() { | ^~~~ a.cc:4:5: note: 'int main()' previously defined here 4 | int main() { | ^~~~
s972870572
p03693
C++
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.List; import java.util.ArrayList; import java.util.Arrays; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] ss0 = br.readLine().trim().split(" ", 0); int r = Integer.parseInt(ss0[0]); int g = Integer.parseInt(ss0[1]); int b = Integer.parseInt(ss0[2]); int i = 0; i = r*100 + g*10 + b; if(i % 4 == 0){ System.out.println("YES"); } else { System.out.println("NO"); } return; } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.io.InputStreamReader; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import java.util.List; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:1: error: 'import' does not name a type 4 | import java.util.ArrayList; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: 'import' does not name a type 5 | import java.util.Arrays; | ^~~~~~ a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:7:1: error: expected unqualified-id before 'public' 7 | public class Main { | ^~~~~~
s005527212
p03693
C++
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} import Control.Applicative import Control.Monad import Control.Arrow import Data.List import Data.Maybe import Data.Char import qualified Data.ByteString.Char8 as B import Text.Printf readInt = ( readLn :: IO Int ) readInts = map ( read :: String -> Int ) . words <$> getLine getList = map ( fst . fromJust . B.readInt ) . B.words <$> B.getLine which a b f = if f then a else b mp [ a, b ] = ( a, b ) main = getLine >>= putStrLn . which "YES" "NO" . ( == 0 ) . ( `mod` 4 ) . read . concat . words
a.cc:1:3: error: stray '#' in program 1 | {-# LANGUAGE ScopedTypeVariables #-} | ^ a.cc:1:34: error: stray '#' in program 1 | {-# LANGUAGE ScopedTypeVariables #-} | ^ a.cc:2:3: error: stray '#' in program 2 | {-# LANGUAGE BangPatterns #-} | ^ a.cc:2:27: error: stray '#' in program 2 | {-# LANGUAGE BangPatterns #-} | ^ a.cc:21:63: error: stray '`' in program 21 | main = getLine >>= putStrLn . which "YES" "NO" . ( == 0 ) . ( `mod` 4 ) . read . concat . words | ^ a.cc:21:67: error: stray '`' in program 21 | main = getLine >>= putStrLn . which "YES" "NO" . ( == 0 ) . ( `mod` 4 ) . read . concat . words | ^ a.cc:1:1: error: expected unqualified-id before '{' token 1 | {-# LANGUAGE ScopedTypeVariables #-} | ^ a.cc:2:1: error: expected unqualified-id before '{' token 2 | {-# LANGUAGE BangPatterns #-} | ^ a.cc:4:1: error: 'import' does not name a type 4 | import Control.Applicative | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
s074755044
p03693
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class pRGBCards { public static void solveRGBCards() throws IOException { int r; int g; int b; String line; String[] split; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); line = br.readLine(); split = line.split(" "); r = Integer.parseInt(split[0]); g = Integer.parseInt(split[1]); b = Integer.parseInt(split[2]); if ((g * 10 + b) % 4 == 0) { System.out.println("YES"); } else { System.out.println("NO"); } br.close(); } public static void main(String[] args) { try { solveRGBCards(); } catch (IOException e) { e.printStackTrace(); } } }
Main.java:5: error: class pRGBCards is public, should be declared in a file named pRGBCards.java public class pRGBCards { ^ 1 error
s345303594
p03693
C++
#include <iostream> using namespace std; int main(){ int a,b,c; cin>>a>b>>c; int z=a*100+b*10+c; if(z%4==0){ cout<<"YES"<<endl; }else{ cout<<"NO"<<endl; } }
a.cc: In function 'int main()': a.cc:6:15: error: no match for 'operator>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 6 | cin>>a>b>>c; | ~~~~~~^~~~~ | | | | | int | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:6:15: note: candidate: 'operator>(int, int)' (built-in) 6 | cin>>a>b>>c; | ~~~~~~^~~~~ a.cc:6:15: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 462 | operator>(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 507 | operator>(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1714 | operator>(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1774 | operator>(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 6 | cin>>a>b>>c; | ^ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>' 6 | cin>>a>b>>c; | ^ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 695 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/string_view:702:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 702 | operator> (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/string_view:710:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed: a.cc:6:19: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/basic_string.h:3915:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/basic_string.h:3929:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3929 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3929:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 6 | cin>>a>b>>c; | ^ /usr/include/c++/14/bits/basic_string.h:3942:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3942 | operator>(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3942:5: note: template argument deduction/substitution failed: a.cc:6:19: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>' 6 | cin>>a>b>>c; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2619:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2619 | operator>(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2619:5: note: template argument deduction/substitution failed: a.cc:6:19: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>' 6 | cin>>a>b>>c; | ^
s167018231
p03693
C
#include<stdio.h> int main(void){ int r=0,g=0,b=0; int num; scanf("%d %d %d",&r,&g,&b); num = 100*r + 10*g + b if(num % 4 == 0) printf("YES"); else printf("NO"); return 0; }
main.c: In function 'main': main.c:7:31: error: expected ';' before 'if' 7 | num = 100*r + 10*g + b | ^ | ; 8 | if(num % 4 == 0) printf("YES"); | ~~ main.c:9:9: error: 'else' without a previous 'if' 9 | else printf("NO"); | ^~~~
s226901580
p03693
C++
#include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int main() { int r, g, b; cin >> r >> g >> b; int total = 100 * r + 10 * g + b; if (total % 4 == 0) { cout << "YES" << endl; } else{ cout << "NO" << endl; }
a.cc: In function 'int main()': a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:8:12: note: to match this '{' 8 | int main() { | ^
s178217024
p03693
C++
#include <bits/stdc++.h> using namespace std; int a[10]; int main() { int a,b,c; int sum=0; for(int i=0;i<3;i++) { scanf("%d",&a[i]); sum=sum*10+a[i]; } if(sum%4==0) printf("YES\n"); else printf("NO\n"); return 0; }
a.cc: In function 'int main()': a.cc:11:30: error: invalid types 'int[int]' for array subscript 11 | scanf("%d",&a[i]); | ^ a.cc:12:29: error: invalid types 'int[int]' for array subscript 12 | sum=sum*10+a[i]; | ^
s133827022
p03693
C++
#include <bits/stdc++.h> #define FOR(i, m, n) for(int i = m;i < n;i++) #define FORR(i, m, n) for(int i = m;i >= n;i--) #define SORT(v, n) sort(v, v+n); #define SORTR(v,n) sort(v, v+n, greater<int>()); // #define int long long // %d=>%lld #define pb push_back #define INF 100000000 using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<int, pii> piii; typedef pair<ll, pll> plll; int r; int g; int b; signed main(){ scanf("%d", &r); scanf("%d", &g); scanf("%d", &b); if((g*10+b)%4 == 0){ printf("YES\n"); }else{ printf("NO\n") } return 0; }
a.cc: In function 'int main()': a.cc:32:23: error: expected ';' before '}' token 32 | printf("NO\n") | ^ | ; 33 | } | ~
s317967518
p03693
C
#include<stdio.h> int main(void){ int r=0,g=0,b=0; int num; scanf("%d %d %d",r,g,b); num = 100*r + 10*g + b if(num % 4 == 0) printf("YES"); else printf("NO"); return 0; }
main.c: In function 'main': main.c:7:31: error: expected ';' before 'if' 7 | num = 100*r + 10*g + b | ^ | ; 8 | if(num % 4 == 0) printf("YES"); | ~~ main.c:9:9: error: 'else' without a previous 'if' 9 | else printf("NO"); | ^~~~
s808793774
p03693
C++
#include<bits\stdc++.h> int main(){ int a,b,c; scanf("%d %d %d",&a,&b,&c); int sum=a*100+10*b+c; if(sum%4==0) printf("YES\n"); else printf("NO\n"); }
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s932084386
p03693
C
#include<stdio.h> #include<string.h> int main(void){ char a,b,c; int d,e,f; scanf("%c %c %c",&a,&b,&c); d = a - '0'; e = b - '0'; f = c - '0'; if((a*100+b*#include<stdio.h> #include<string.h> int main(void){ char a,b,c; int d,e,f; scanf("%c %c %c",&a,&b,&c); d = a - '0'; e = b - '0'; f = c - '0'; if((a*100+b*10+c)%4==0){printf("YES\n");} else{printf("NO\n");} return 0; }10+c)%4==0){printf("YES\n");} else{printf("NO\n");} return 0; }
main.c: In function 'main': main.c:15:21: error: stray '#' in program 15 | if((a*100+b*#include<stdio.h> | ^ main.c:15:22: error: 'include' undeclared (first use in this function) 15 | if((a*100+b*#include<stdio.h> | ^~~~~~~ main.c:15:22: note: each undeclared identifier is reported only once for each function it appears in main.c:15:30: error: 'stdio' undeclared (first use in this function); did you mean 'stdin'? 15 | if((a*100+b*#include<stdio.h> | ^~~~~ | stdin main.c:18:1: error: expected expression before 'int' 18 | int main(void){ | ^~~
s670044112
p03693
C++
#include <cstdio> using namespace std; int main(){ int r, g, b; scanf_s("%d", &r); scanf_s("%d", &g); scanf_s("%d", &b); if ((10 * g + b) % 4 == 0) { printf("YES\n"); } else { printf("NO\n"); } }
a.cc: In function 'int main()': a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 7 | scanf_s("%d", &r); | ^~~~~~~ | scanf
s723010604
p03693
C++
#include <iostream> int r,g,b; int main() { std::cin>>r>>g>>b; if((r*100+g*10+b)%4==0)#include <iostream> int r,g,b; int main() { std::cin>>r>>g>>b; if((r*100+g*10+b)%4==0) std::cout<<"YES"<<std::endl; else std::cout<<"NO"<<std::endl; return 0; } std::cout<<"YES"<<std::endl; else std::cout<<"NO"<<std::endl; return 0; }
a.cc:9:28: error: stray '#' in program 9 | if((r*100+g*10+b)%4==0)#include <iostream> | ^ a.cc: In function 'int main()': a.cc:9:29: error: 'include' was not declared in this scope 9 | if((r*100+g*10+b)%4==0)#include <iostream> | ^~~~~~~ a.cc:9:38: error: 'iostream' was not declared in this scope; did you mean 'std::iostream'? 9 | if((r*100+g*10+b)%4==0)#include <iostream> | ^~~~~~~~ | std::iostream In file included from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/iosfwd:146:41: note: 'std::iostream' declared here 146 | typedef basic_iostream<char> iostream; | ^~~~~~~~ a.cc:11:1: error: expected primary-expression before 'int' 11 | int r,g,b; | ^~~ a.cc:13:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 13 | int main() { | ^~ a.cc:13:9: note: remove parentheses to default-initialize a variable 13 | int main() { | ^~ | -- a.cc:13:9: note: or replace parentheses with braces to value-initialize a variable a.cc:13:12: error: a function-definition is not allowed here before '{' token 13 | int main() { | ^ a.cc:25:5: error: 'else' without a previous 'if' 25 | else | ^~~~
s059036127
p03693
C++
#include <climits> #include <cstring> #include <cmath> #include <iostream> #include <string> #include <algorithm> #include <vector> #include <queue> #include <map> #include <set> #include <functional> #define fi first #define se second #define FO(x, n) for (int x = 0; x < n; ++x) #define FOR(x, a, b) for (int x = a; x < b; ++x) #define RFO(x, n) for (int x = n - 1; x >= 0; --x) #define RFOR(x, a, b) for (int x = b - 1; x >= a; --x) using namespace std; typedef unsigned char byte; typedef long long llong; typedef unsigned long long ullong; typedef pair<int, int> pii; typedef pair<double, double> pdd; typedef pair<string, string> pss; typedef pair<llong, llong> pll; inline bool feq(const double& a, const double& b) { return fabs(a - b) < 1e-10; } int main() { int r, g, b; cin >> r >> g >> b; int val = r * 100 + g * 10 + b; cout << ((val % 4) ? "NO" : "YES") << endl; return; }
a.cc: In function 'int main()': a.cc:34:5: error: return-statement with no value, in function returning 'int' [-fpermissive] 34 | return; | ^~~~~~
s638950157
p03693
C++
#include<iostream> #include<stdio.h> int main() { int a,b,c; cin>>a>>b>>c; int num=a*100+b*10+c; if(num%4==0)cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin>>a>>b>>c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:9:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 9 | if(num%4==0)cout<<"YES"<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:9:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 9 | if(num%4==0)cout<<"YES"<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~ a.cc:10:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 10 | else cout<<"NO"<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:10:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 10 | else cout<<"NO"<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s621033839
p03693
C++
#include<iostream> #include<string> #include<cstdlib> #include<algorithm> #include<vector> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if((100*a+10*b+c) % 4 == 0){ cout << "YES" < endl; } else cout << "NO" < endl; return 0; }
a.cc: In function 'int main()': a.cc:14:31: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 14 | cout << "YES" < endl; | ~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 14 | cout << "YES" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 14 | cout << "YES" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:14:33: note: couldn't deduce template parameter '_CharT' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:14:33: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 14 | cout << "YES" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 14 | cout << "YES" < endl; | ^~~~ In file included from /usr/include/c++/14/vector:66, from a.cc:5: /usr/include/c++/14/bits/stl_vector.h:2089:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)' 2089 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:2089:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::vector<_Tp, _Alloc>' 14 | cout << "YES" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&' 507 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~ a.cc:17:30: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 17 | cout << "NO" < endl; | ~~~~~~~~~~~~~^~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_itera
s158505164
p03693
C++
#include<bits/stdc++.h> using namespace std; int main { int r,g,b; cin>>r>>g>>b; if((r*100+g*10+b)%4==0)cout<<"YES"<<endl; else cout<<"NO"<<endl; }
a.cc:4:5: error: cannot declare '::main' to be a global variable 4 | int main | ^~~~ a.cc:6:3: error: expected primary-expression before 'int' 6 | int r,g,b; | ^~~ a.cc:6:3: error: expected '}' before 'int' a.cc:5:1: note: to match this '{' 5 | { | ^ a.cc:7:3: error: 'cin' does not name a type 7 | cin>>r>>g>>b; | ^~~ a.cc:8:3: error: expected unqualified-id before 'if' 8 | if((r*100+g*10+b)%4==0)cout<<"YES"<<endl; | ^~ a.cc:9:3: error: expected unqualified-id before 'else' 9 | else cout<<"NO"<<endl; | ^~~~ a.cc:10:1: error: expected declaration before '}' token 10 | } | ^
s164294913
p03693
C++
#include <iostream> #include <string> using namespace std; int main(void){ char a, b, c; int n; cin >> a >> b >> c; string s=""; s += a; s += b; s += c; n = atoi(s); if(n%4 == 0){ cout << "YES" << endl; }else{ cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:14: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*' 13 | n = atoi(s); | ^ | | | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/14/cstdlib:79, from /usr/include/c++/14/ext/string_conversions.h:43, from /usr/include/c++/14/bits/basic_string.h:4154, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/stdlib.h:105:30: note: initializing argument 1 of 'int atoi(const char*)' 105 | extern int atoi (const char *__nptr) | ~~~~~~~~~~~~^~~~~~
s608355001
p03693
C++
/** * @author Finn Lidbetter */ import java.util.*; import java.io.*; import java.awt.geom.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); String[] s= br.readLine().split(" "); int r = Integer.parseInt(s[0]); int g = Integer.parseInt(s[1]); int b = Integer.parseInt(s[2]); int val = 100*r + 10*g + b; if (val%4==0) { System.out.println("YES"); } else { System.out.println("NO"); } } }
a.cc:4:1: error: 'import' does not name a type 4 | import java.util.*; | ^~~~~~ a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:1: error: 'import' does not name a type 5 | import java.io.*; | ^~~~~~ a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:1: error: 'import' does not name a type 6 | import java.awt.geom.*; | ^~~~~~ a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:8:1: error: expected unqualified-id before 'public' 8 | public class Main { | ^~~~~~
s566701630
p03693
C++
#include <algorithm> #include <stdint.h> using ll = long long; int main() { int R, G, B, x; scanf("%d %d %d", &R, &G, &B); x = R * 100 + G * 10 + B; printf("%s\n", (x % 4 ? "NO" : "YES")); }
a.cc: In function 'int main()': a.cc:7:9: error: 'scanf' was not declared in this scope 7 | scanf("%d %d %d", &R, &G, &B); | ^~~~~ a.cc:9:9: error: 'printf' was not declared in this scope 9 | printf("%s\n", (x % 4 ? "NO" : "YES")); | ^~~~~~ a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' 2 | #include <stdint.h> +++ |+#include <cstdio> 3 | using ll = long long;
s190882154
p03693
C++
#include<iostream> #include<string> #include<cstdlib> #include<algorithm> #include<vector> using namespace std; int main(){ int a,b,c; cin >> a >> b >> c; if(100*a+10*b+c % 4 == 0){ cout << "YES" < endl; } else cout << "NO" < endl; return 0; }
a.cc: In function 'int main()': a.cc:14:31: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 14 | cout << "YES" < endl; | ~~~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:48, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 493 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1694 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1760 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>' 14 | cout << "YES" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>' 14 | cout << "YES" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54: /usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 673 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 680 | operator< (basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed: a.cc:14:33: note: couldn't deduce template parameter '_CharT' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 14 | cout << "YES" < endl; | ^~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3901 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed: a.cc:14:33: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>' 14 | cout << "YES" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2600 | operator<(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>' 14 | cout << "YES" < endl; | ^~~~ In file included from /usr/include/c++/14/vector:66, from a.cc:5: /usr/include/c++/14/bits/stl_vector.h:2089:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)' 2089 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_vector.h:2089:5: note: template argument deduction/substitution failed: a.cc:14:33: note: 'std::basic_ostream<char>' is not derived from 'const std::vector<_Tp, _Alloc>' 14 | cout << "YES" < endl; | ^~~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&' 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)' 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&' 507 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~ a.cc:17:30: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 17 | cout << "NO" < endl; | ~~~~~~~~~~~~~^~~~~~ /usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 448 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_itera
s570994994
p03693
C++
#include <stdio.h> int main(void) { int a, b, c; scanf("%i %i %i", &a, &b, &c); puts((a*100+b*10+c) % 4 == 0 ? "YES" : "NO"); return 0 }
a.cc: In function 'int main()': a.cc:7:11: error: expected ';' before '}' token 7 | return 0 | ^ | ; 8 | } | ~
s621510897
p03693
C++
#include<bits/stdc++.h> using namespace std; inline long long getnum() { long long now=0;long long fh=1;char ch=getchar(); while(ch<'0' || ch>'9'){if(ch=='-')fh=-1;ch=getchar();} while(ch>='0' && ch<='9'){now=(now<<3)+(now<<1)+ch-'0';ch=getchar();} return now*fh; } int main() { int x=getnum()*100; x+=getnum()*10; x+=getnum(); if (x%4==0) printf("YES\n");else printf("NO\n") return 0; }
a.cc: In function 'int main()': a.cc:15:50: error: expected ';' before 'return' 15 | if (x%4==0) printf("YES\n");else printf("NO\n") | ^ | ; 16 | return 0; | ~~~~~~
s457973749
p03693
C++
#include <iostream> int main(){ int a,b,c; cin>>a>>b>>c; if((b*10+c)%4==0){ cout<<"YES"; }else cout<<"NO"; }
a.cc: In function 'int main()': a.cc:4:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | cin>>a>>b>>c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 6 | cout<<"YES"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:7:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 7 | }else cout<<"NO"; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~
s558775168
p03693
C++
#include <iostream> using namespace std; int main(void){ // Here your code ! int r,g,b; cin >> r >> g >> b; int total = t * 100 + g * 10 + b; if(total % 4 == 0){ cout << "YES" << endl; }else{ cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:7:17: error: 't' was not declared in this scope 7 | int total = t * 100 + g * 10 + b; | ^
s839029867
p03693
C++
import java.util.*; /** * Created by santa on 2016/10/16. */ public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); int ans = a * 100 + b * 10 + c; if(ans % 4 == 0){ System.out.println("YES"); }else{ System.out.println("NO"); } }// mainMethod } // MainClass
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:8:1: error: expected unqualified-id before 'public' 8 | public class Main { | ^~~~~~
s179546297
p03693
C++
#include <algorithm> #include <cfloat> #include <climits> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <memory> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; typedef long long ll; #define sz size() #define pb push_back #define mp make_pair #define fi first #define se second #define all(c) (c).begin(), (c).end() #define rep(i,a,b) for(ll i=(a);i<(b);++i) #define per(i,a,b) for(ll i=b-1LL;i>=(a);--i) #define clr(a, b) memset((a), (b) ,sizeof(a)) #define ctos(c) string(1,c) #define print(x) cout<<#x<<" = "<<x<<endl; #define MOD 1000000007 int main() { ll a,b,c; cin>>a>>b>>c; ll d = 100*a+10*b+c; if(d%4==){ cout << "YES" << endl; } else{ cout << "NO" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:43:11: error: expected primary-expression before ')' token 43 | if(d%4==){ | ^
s904772154
p03693
C
#include<cstdio> #include<deque> using namespace std; #define EPS 1e-8 typedef long long ll; deque<int>q; int n; ll m,sum[500010],f[500010]; //借鉴了:http://www.cnblogs.com/ka200812/archive/2012/08/03/2621345.html ll getDP(int i,int j){ return f[j]+m+(sum[i]-sum[j])*(sum[i]-sum[j]); } ll getUP(int j,int k){//yj-yk,即斜率的分子部分 return (f[j]+sum[j]*sum[j])-(f[k]+sum[k]*sum[k]); } ll getDOWN(int j,int k){//xj-xk,即斜率的分母部分 return 2ll*(sum[j]-sum[k]); } int main(){ freopen("k.in","r",stdin); while(scanf("%d%lld",&n,&m)!=EOF){ for(int i=1;i<=n;++i){ scanf("%lld",&sum[i]); } for(int i=2;i<=n;++i){ sum[i]+=sum[i-1]; } q.clear(); q.push_back(0); for(int i=1;i<=n;++i){ while(q.size()>1 && getUP(q[1],q[0])<=sum[i]*getDOWN(q[1],q[0])){ q.pop_front(); } f[i]=getDP(i,q.front()); while(q.size()>1 && getUP(i,q.back())*getDOWN(q.back(),q[q.size()-2])<=getUP(q.back(),q[q.size()-2])*getDOWN(i,q.back())){ q.pop_back(); } q.push_back(i); } printf("%lld\n",f[n]); } return 0; }
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s335301394
p03693
C++
#include <cstdio> #include <stdio.h> #include <string> #include <string.h> #include <algorithm> #include <vector> #include <iostream.h> using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) int main(){ int a,b,c; cin >>a>>b>>c; if((10*b+c)%4 == 0){ cout << "YES" << endl; } else{ cout << "NO" <<endl; } }
a.cc:7:10: fatal error: iostream.h: No such file or directory 7 | #include <iostream.h> | ^~~~~~~~~~~~ compilation terminated.
s465988491
p03693
C++
#include <bits/stdc++/h> using namespace std; typedef long long ll; int main() { int r, g, b; cin >> r>>g >>b; int x=10*g+b; if(x%4==0) { cout << "YES\n"; } else cout << "NO\n"; return 0; }
a.cc:1:10: fatal error: bits/stdc++/h: No such file or directory 1 | #include <bits/stdc++/h> | ^~~~~~~~~~~~~~~ compilation terminated.
s086995399
p03693
C++
#include<string> #include<deque> #include<queue> #include<vector> #include<algorithm> #include<iostream> #include<set> #include<cmath> #include<tuple> #include<map> using namespace std; typedef long long int llint; #define mp make_pair #define mt make_tuple #define pub push_back #define puf push_front #define pob pop_back #define pof pop_front #define fir first #define sec second #define res resize #define ins insert #define era erase const llint mod=100000007; const llint big=1e9; const llint red=0xE869120; const llint pro=1002001; int main(void){ int a,b,i,j,ans=0,gen,bmax=max,bmin,q,w,n,m; string str; vector<int> vec; cin>>n>>m>>w; if((n*100+m*10+w)%4==0){cout<<"YES"<<endl;} else{cout<<"NO"<<endl;} return 0; }
a.cc: In function 'int main()': a.cc:29:36: error: cannot resolve overloaded function 'max' based on conversion to type 'int' 29 | int a,b,i,j,ans=0,gen,bmax=max,bmin,q,w,n,m; | ^~~
s885299752
p03693
C++
#include<bits/stdc++.h> using namespace std; int main() { int R, G, B; cin >> R >> G >> B; if((R * 100 + G * 10 + B) % 4 == 0) { cout << < "YES" << endl; } else { cout << "NO" << endl; } }
a.cc: In function 'int main()': a.cc:10:13: error: expected primary-expression before '<' token 10 | cout << < "YES" << endl; | ^ a.cc:10:21: error: invalid operands of types 'const char [4]' and '<unresolved overloaded function type>' to binary 'operator<<' 10 | cout << < "YES" << endl; | ~~~~~~^~~~~~~
s580802609
p03694
C++
#include<iostream> using namespace std; int main(){ int n; cin >> n; int mn = INT_MAx , mx = INT_MIN; while(n--){ int x; cin >> x; mn = min(x,mn) , mx = max(mx , x); } cout << mx - mn; }
a.cc: In function 'int main()': a.cc:6:12: error: 'INT_MAx' was not declared in this scope 6 | int mn = INT_MAx , mx = INT_MIN; | ^~~~~~~ a.cc:9:21: error: 'mx' was not declared in this scope; did you mean 'x'? 9 | mn = min(x,mn) , mx = max(mx , x); | ^~ | x a.cc:11:11: error: 'mx' was not declared in this scope; did you mean 'mn'? 11 | cout << mx - mn; | ^~ | mn
s877969413
p03694
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0; i<(n); ++i) using namespace std; int main(){ int n; cin >> n; vector<int> a(n); rep(i,n) cin >> a[i]; a.sort(a.begin(), a.end()); cout << a[n-1]-a[0] << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:5: error: 'class std::vector<int>' has no member named 'sort' 10 | a.sort(a.begin(), a.end()); | ^~~~
s547284220
p03694
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> a(n); rep(i,n) cin >> a[i]; a.sort(a.begin(), a.end()); cout << a[n-1]-a[0] << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: 'i' was not declared in this scope 8 | rep(i,n) cin >> a[i]; | ^ a.cc:8:3: error: 'rep' was not declared in this scope 8 | rep(i,n) cin >> a[i]; | ^~~ a.cc:9:5: error: 'class std::vector<int>' has no member named 'sort' 9 | a.sort(a.begin(), a.end()); | ^~~~
s744683886
p03694
Java
import java.util.*; import java.io.*; import java.math.*; public class Main{ //Don't have to see. start------------------------------------------ static class InputIterator{ ArrayList<String> inputLine = new ArrayList<String>(1024); int index = 0; int max; String read; InputIterator(){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try{ while((read = br.readLine()) != null){ inputLine.add(read); } }catch(IOException e){} max = inputLine.size(); } boolean hasNext(){return (index < max);} String next(){ if(hasNext()){ return inputLine.get(index++); }else{ throw new IndexOutOfBoundsException("There is no more input"); } } } static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>(); static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem. static PrintWriter out = new PrintWriter(System.out); static void flush(){out.flush();} static void myout(Object t){out.println(t);} static void myerr(Object t){System.err.print("debug:");System.err.println(t);} static String next(){return ii.next();} static boolean hasNext(){return ii.hasNext();} static int nextInt(){return Integer.parseInt(next());} static long nextLong(){return Long.parseLong(next());} static double nextDouble(){return Double.parseDouble(next());} static ArrayList<String> nextStrArray(){return myconv(next(), 8);} static ArrayList<String> nextCharArray(){return myconv(next(), 0);} static ArrayList<Integer> nextIntArray(){ ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size()); for(int i = 0; i < input.size(); i++){ ret.add(Integer.parseInt(input.get(i))); } return ret; } static ArrayList<Long> nextLongArray(){ ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size()); for(int i = 0; i < input.size(); i++){ ret.add(Long.parseLong(input.get(i))); } return ret; } static String myconv(Object list, int no){//only join String joinString = CONVSTR.get(no); if(list instanceof String[]){ return String.join(joinString, (String[])list); }else if(list instanceof ArrayList){ return String.join(joinString, (ArrayList)list); }else{ throw new ClassCastException("Don't join"); } } static ArrayList<String> myconv(String str, int no){//only split String splitString = CONVSTR.get(no); return new ArrayList<String>(Arrays.asList(str.split(splitString))); } public static void main(String[] args){ CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, ""); solve();flush(); } //Don't have to see. end------------------------------------------ static void solve(){//Here is the main function int N = nextInt(); ArrayList<Integer> list = nextIntArray(); Collections.sort(list); myout(list.get(N - 1) - list.get(0)) } //Method addition frame start //Method addition frame end }
Main.java:75: error: ';' expected myout(list.get(N - 1) - list.get(0)) ^ 1 error
s952642382
p03694
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define rep(i, a, b) for (int i = a; i < (b); ++i) #define repd(i, a, b) for (int i = a; i >= (b); --i) #define all(x) (x).begin(), (x).end() #define sz(x) (int)(x).size() typedef long long ll; const int INF = 0x3f3f3f3f; const ll LINF = 0x3f3f3f3f3f3f3f3fll; int main() { int n; cin >> n; vector<int> a(n); rep(i, 0, n) cin >> a[i]; sort(all(a)); cout >> a[n - 1] - a[0] << endl; }
a.cc: In function 'int main()': a.cc:23:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}) 23 | cout >> a[n - 1] - a[0] << endl; | ~~~~ ^~ | | | std::ostream {aka std::basic_ostream<char>} a.cc:23:10: note: candidate: 'operator>>(int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int})' (built-in) 23 | cout >> a[n - 1] - a[0] << endl; a.cc:23:10: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int' In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41, from a.cc:1: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:23:5: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 23 | cout >> a[n - 1] - a[0] << endl; | ^~~~ In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:23:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 23 | cout >> a[n - 1] - a[0] << endl; | ^ /usr/include/c++/14/bitset:1597:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, bitset<_Nb>&)' 1597 | operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) | ^~~~~~~~ /usr/include/c++/14/bitset:1597:5: note: template argument deduction/substitution failed: a.cc:23:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 23 | cout >> a[n - 1] - a[0] << endl; | ^ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/sstream:40, from /usr/include/c++/14/complex:45, from /usr/include/c++/14/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:23:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 23 | cout >> a[n - 1] - a[0] << endl; | ^ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:23:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 23 | cout >> a[n - 1] - a[0] << endl; | ^ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:23:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 23 | cout >> a[n - 1] - a[0] << endl; | ^ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:23:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 23 | cout >> a[n - 1] - a[0] << endl; | ^ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:23:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 23 | cout >> a[n - 1] - a[0] << endl; | ^ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:23:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 23 | cout >> a[n - 1] - a[0] << endl; | ^ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]': a.cc:23:27: required from here 23 | cout >> a[n - 1] - a[0] << endl; | ^ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: candidate: 'template<class _Tp, class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, complex<_Tp>&)' 509 | operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) | ^~~~~~~~ /usr/include/c++/14/complex:509:5: note: template argument deduction/substitution failed: a.cc:23:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 23 | cout >> a[n - 1] - a[0] << endl; | ^ In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:143: /usr/include/c++/14/iomanip:76:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Resetiosflags)' 76 | operator>>(basic_istream<_CharT, _Traits>& __is, _Resetiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:76:5: note: template argument deduction/substitution failed: a.cc:23:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 23 | cout >> a[n - 1] - a[0] << endl; | ^ /usr/include/c++/14/iomanip:106:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setiosflags)' 106 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setiosflags __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:106:5: note: template argument deduction/substitution failed: a.cc:23:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 23 | cout >> a[n - 1] - a[0] << endl; | ^ /usr/include/c++/14/iomanip:137:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setbase)' 137 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setbase __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:137:5: note: template argument deduction/substitution failed: a.cc:23:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 23 | cout >> a[n - 1] - a[0] << endl; | ^ /usr/include/c++/14/iomanip:177:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _Setfill<_CharT>)' 177 | operator>>(basic_istream<_CharT, _Traits>& __is, _Setfill<_CharT> __f) | ^~~~~~~~ /usr/include/c++/14/iomanip:177:5: note: template argument deduction/substitution failed: a.cc:23:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Tr