submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s389719985
p00338
C
#include<iostream> #include<string> using namespace std; int main(void); int n,c; cin>>n>>c; int p[n],q[n]; for(int i=0,i<n,i++){ p=0; } for(i=0;i<c;i++){ int a,b,d; cin>>a; if(a=0){ cin>>b>>d; n[b]+=d; } else{ cin>>b; strcpy(q,p); for(int...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s587809104
p00338
C
#include<bits/stdc++.h> using namespace std; int main(void); int n,c; cin>>n>>c; int p[n],q[n]; for(int i=0,i<n,i++){ p=0; } for(i=0;i<c;i++){ int a,b,d; cin>>a; if(a=0){ cin>>b>>d; n[b]+=d; } else{ cin>>b; strcpy(q,p); for(int j=0;j<n-1;j...
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory 1 | #include<bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s803226339
p00338
C++
#include<bits/stdc++.h> #define rep(i,n)for(int i=0;i<(n);i++) using namespace std; typedef long long ll; typedef pair<ll,ll>P; int a[100000],b[100000],c[100000],n,m; ll s[100000]; int bit[200000]; void add(int k,int x){ while(k<=n){ bit[k]+=x; k+=k&-k; } } int sum(int k){ int res=0; while(k){ res+=bit[k]; ...
In file included from /usr/include/c++/14/bits/stl_algobase.h:71, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Ite...
s432638188
p00339
C++
#include<bits/stdc++.h> #define int long long #define fi first #define se second #define PB push_back using namespace std; typedef pair<int, int> P1; typedef pair<int, pair<int, int> > P2; static const int INF = 1ll<<60; static const int dx[] = { 1, -1, 0, 0, }; static const int dy[] = { 0, 0, 1, -1 }; static const int...
a.cc: In function 'void solve()': a.cc:53:30: error: no matching function for call to 'min(int, long long int)' 53 | for(int k=0;k<min(100,N-j);++k){ | ~~~^~~~~~~~~ In file included from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/...
s141913200
p00339
C++
#include <bits/stdc++.h> using namespace std; #define INF 0x7fffffffffff typedef long long int LLI; int N; int M; LLI ts[1145]; LLI ss[1145]; LLI vs[3145]; LLI hs[3145]; LLI ds[1145]; LLI himos[3145]; LLI dimos[1145]; LLI vimos[1145]; LLI dp[1145][3145]; // [l, r) LLI CalcD(int l, int r) { LLI ret = 0; r -= 2; ...
a.cc: In function 'int main()': a.cc:74:7: error: 'argmax' was not declared in this scope 74 | argmax[i][j] = (i == 1) ? 0 : -1; | ^~~~~~
s744035359
p00340
Java
import java.util.Scanner; public class Main1 { public static void main(String[] args) { Scanner stdin = new Scanner(System.in); int[] a = new int[4]; for(int i = 0; i < 4; i++) { a[i] = stdin.nextInt(); } if(a[0] == a[1] && a[2] == a[3]) { System.out.println("yes"); } else if(a[0] == a[2] && a[...
Main.java:3: error: class Main1 is public, should be declared in a file named Main1.java public class Main1 { ^ 1 error
s675524896
p00340
Java
package PCK_Final_16; import java.util.Scanner; public class Q1 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int i, j, c = 0; int[] array = new int[4]; for(i = 0;i < 4;++i){ array[i] = sc.nextInt(); for(j = 0;j < i;++j){ if(array[j] == array[i]){ c++; arr...
Main.java:5: error: class Q1 is public, should be declared in a file named Q1.java public class Q1 { ^ 1 error
s483345418
p00340
C
#include<stdio.h> int main(){ int a,b,c,d; scanf("%d %d %d %d",&a,&b,&c,&d); if(a==b&&!a==d){ if(b==c){ printf("yes"); } } if(a==c&&a!=d){ if(b==d){ printf("yes"); } } if(a==d&&a!=c){ if(b==c){ printf("yes"); } } if(a==b&&b==c&&c==d){ printf("yes"); } ...
main.c: In function 'main': main.c:29:3: error: expected declaration or statement at end of input 29 | } | ^
s499815960
p00340
C++
using System; public class Test { public static void Main() { int a[] = Console.ReadLine().Split().Select(int.Parse).ToArray(); Array.Sort(a); if(a[0] == a[1] && a[2] == a[3]) Console.WriteLine("yes"); else Console.WriteLine("no"); } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Test | ^~~~~~
s681995071
p00340
C++
using System; using System.Linq; public class Test { public static void Main() { int[] a = Console.ReadLine().Split().Select(int.Parse).ToArray(); Array.Sort(a); if(a[0] == a[1] && a[2] == a[3]) Console.WriteLine("yes"); else Console.WriteLine("no"); } }
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Linq; | ^~~~~~ a.cc:4:1: error: expected unqualified-id before 'public' 4 | public class Test | ^~~~~~
s161901678
p00340
C++
???#include<bits/stdc++.h> using namespace std; #define int long long typedef vector<int>vint; typedef pair<int,int>pint; typedef vector<pint>vpint; #define rep(i,n) for(int i=0;i<(n);i++) #define reps(i,f,n) for(int i=(f);i<(n);i++) #define all(v) (v).begin(),(v).end() #define each(it,v) for(__typeof((v).begin()) it=...
a.cc:1:4: error: stray '#' in program 1 | ???#include<bits/stdc++.h> | ^ a.cc:1:1: error: expected unqualified-id before '?' token 1 | ???#include<bits/stdc++.h> | ^ a.cc:5:9: error: 'vector' does not name a type 5 | typedef vector<int>vint; | ^~~~~~ a.cc:6:9: error: 'pair' does...
s449368296
p00340
C++
?????? ????????¢ #include< iostream > using namespace std ; main(){ int a, b, c, d; cin >> a >> b >> c >> d; if ( a == b && c == d || a == c && b == d || a == d && b == c ) cout << "yes" << endl ; else cout << "no" << endl ; return 0; }
a.cc:2:9: error: extended character ¢ is not valid in an identifier 2 | ????????¢ | ^ a.cc:3:10: error: missing terminating > character 3 | #include< | ^ a.cc:3:9: error: empty filename in #include 3 | #include< | ^ a.cc:1:1: error: expected unqualified-id before '...
s133750012
p00340
C++
#include<iostream> using namespace std; int main() { int e1,e2,e3,e4; cin >> e1 >> e2 >> e3 >> e4; int a=e1+e2; int b=e1+e3; int c=e1+e4; int d=e2= if(e1+e2==e3+e4) cout << "yes\n"; else if(e1+e3==e2+e4) cout << "yes\n"; else if(e1+e4==e2+e3) cout << "yes\n"; else cout << "no\n"; return 0; }
a.cc: In function 'int main()': a.cc:11:3: error: expected primary-expression before 'if' 11 | if(e1+e2==e3+e4) cout << "yes\n"; | ^~ a.cc:12:3: error: 'else' without a previous 'if' 12 | else if(e1+e3==e2+e4) cout << "yes\n"; | ^~~~
s741662615
p00340
C++
#include <stdio.h> int main(){ int e1,e2,e3,e4; scanf("%d%d%d%d",&e1,&e2,&e3,&e4) if(e1==e2&&e2==e3) printf("Yes\n"); if(e1==e3&&e2==e4) printf("Yes\n"); if(e1==e4&&e2==e3) printf("Yes\n"); else printf("No\n"); returan 0; }
a.cc: In function 'int main()': a.cc:4:38: error: expected ';' before 'if' 4 | scanf("%d%d%d%d",&e1,&e2,&e3,&e4) | ^ | ; 5 | if(e1==e2&&e2==e3) printf("Yes\n"); | ~~ a.cc:11:3:...
s623330904
p00340
C++
#include <stdio.h> int main(){ int e1,e2,e3,e4; scanf("%d%d%d%d",&e1,&e2,&e3,&e4); if(e1==e2&&e2==e3) printf("Yes\n"); if(e1==e3&&e2==e4) printf("Yes\n"); if(e1==e4&&e2==e3) printf("Yes\n"); else printf("No\n"); returan 0; }
a.cc: In function 'int main()': a.cc:11:3: error: 'returan' was not declared in this scope 11 | returan 0; | ^~~~~~~
s409589007
p00340
C++
6 7 8 9 10 11 12 13 14 15 16 #include <iostream> #include <bits/stdc++.h> using namespace std; テつ?つ?つ?つ?nt main(void){ テつ?つ?つ?つ?つ?つ?つ?つ?nt number[4]; テつ?つ?つ?つ?つ?つ?つ?つ?or(int i = 0; i < 4; i++){ テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?in >> number[i]; テつ?つ?つ?つ?つ?つ?つ?つ? テつ?つ?つ?つ?つ?つ?つ?つ?ort(number, number + 4); テつ?つ?つ?つ?つ?つ?つ?つ?f((numb...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 6 | ^ 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...
s340122737
p00340
C++
#include <iostream> #include <bits/stdc++.h> using namespace std; テつ?つ?つ?つ?nt main(void){ テつ?つ?つ?つ?つ?つ?つ?つ?nt number[4]; テつ?つ?つ?つ?つ?つ?つ?つ?or(int i = 0; i < 4; i++){ テつ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?つ?in >> number[i]; テつ?つ?つ?つ?つ?つ?つ?つ? テつ?つ?つ?つ?つ?つ?つ?つ?ort(number, number + 4); テつ?つ?つ?つ?つ?つ?つ?つ?f((number[0] == number[1]) && (numbe...
a.cc:4:1: error: '\U000030c6\U00003064' does not name a type 4 | テつ?つ?つ?つ?nt main(void){ | ^~~~
s629852761
p00340
C++
#include<iostream> #include<cstdio> using namespace std; int main(){ int a[4]; scanf("%d,%d,%d,%d",&a[0],&a[1],&a[2],&a[3]); sort(a,a+4); if(a[0] == a[1] && a[2] == a[3]) cout << "yes" <<endl; else cout << "no" << endl; fflush(stdin); getchar(); return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'sort' was not declared in this scope; did you mean 'short'? 8 | sort(a,a+4); | ^~~~ | short
s716887211
p00340
C++
#include <bits/stdc++.h> using namespace std; int e[4]; int main() { cin >> e[0] >> e[1] >> e[2] >> e[3]; sort(e,e+4) if(e[0] == e[1] && e[2] == e[3]) { cout << "yes" << endl; }else { cout << "no" << endl; } }
a.cc: In function 'int main()': a.cc:8:14: error: expected ';' before 'if' 8 | sort(e,e+4) | ^ | ; 9 | if(e[0] == e[1] && e[2] == e[3]) { | ~~ a.cc:11:4: error: 'else' without a previous 'if' 11 | }else { | ^~~~
s219498018
p00340
C++
#include<sdio.h> #include<iostream> using namespace std; int main(){ int m,n,i,j,t,y; int e[5]; for(i=0;i<4;i++){ scanf("%d",&e[i]); } sort(e,e+4); if(e[0]==e[1] && e[2]==e[3]){ printf("yes\n"); } else{ printf("no\n"); } }
a.cc:1:9: fatal error: sdio.h: No such file or directory 1 | #include<sdio.h> | ^~~~~~~~ compilation terminated.
s117533931
p00340
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int e[4]; for(int i=0; i<4; i++) cin >> e[0]; sort(&e[0], &e[0]+4); if(e[0]==e[1] && e[2]==e[3]) cout << "yes??? << endl; else cout << "no" << endl; return 0; }
a.cc:10:42: warning: missing terminating " character 10 | if(e[0]==e[1] && e[2]==e[3]) cout << "yes??? << endl; | ^ a.cc:10:42: error: missing terminating " character 10 | if(e[0]==e[1] && e[2]==e[3]) cout << "yes??? << endl; | ...
s765586088
p00340
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main(){ vector<int> e[4]; for(int i=0; i<4; i++) cin >> e[0]; sort(e, e+4); for(int i=0; i<4; i++) cout << e[i] << endl; if(e[0]==e[1] && e[2]==e[3]) cout << "yes" << endl; else cout << "no" << end...
a.cc: In function 'int main()': a.cc:8:32: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<int>') 8 | for(int i=0; i<4; i++) cin >> e[0]; | ~~~ ^~ ~~~~ | | | | ...
s752884697
p00340
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main(){ vector<int> e[4]; for(int i=0; i<4; i++) cin >> e[0]; sort(e.begin(), e.end()); for(int i=0; i<4; i++) cout << e[i] << endl; if(e[0]==e[1] && e[2]==e[3]) cout << "yes" << endl; else cout <<...
a.cc: In function 'int main()': a.cc:8:32: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<int>') 8 | for(int i=0; i<4; i++) cin >> e[0]; | ~~~ ^~ ~~~~ | | | | ...
s509545831
p00340
C++
#include <stdio.h> #include <algorithm> using namespace std; int main(void) { int a[4], i; for(i = 0; i < n; ++i)scanf("%d", &a[i]); sort(a, a + 4); if(a[0] == a[1] && a[2] == a[3]) printf("yes\n"); else printf("no\n"); return 0; }
a.cc: In function 'int main()': a.cc:7:18: error: 'n' was not declared in this scope 7 | for(i = 0; i < n; ++i)scanf("%d", &a[i]); | ^
s961223679
p00340
C++
#include <iostream> #include <math.h> using namespace std; int main () { int a[4]; for (int i = 0; i < 4; i++) { cin >> a[i]; } sort (a,a + 4); if (a[0] == a[1] && a[2] == a[3]) { cout << "yes" << endl; } else { cout << "no" << endl; } }
a.cc: In function 'int main()': a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 14 | sort (a,a + 4); | ^~~~ | sqrt
s463007997
p00340
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d; cin>>a>>b>>c>>d; if((a==b && c==d) || (a==c &&b==d) || (a==d &&c==b) || (a==b==c==d) ) cout<<"yes"<<endl; else cout<<"no"<<endl; return 0; } ~
a.cc:15:2: error: expected class-name at end of input 15 | ~ | ^
s381259873
p00340
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d; cin>>a>>b>>c>>d; if((a==b && c==d) || (a==c &&b==d) || (a==d &&c==b) || (a==b==c==d) ) cout<<"yes"<<endl; else cout<<"no"<<endl; return 0; } ~
a.cc:15:2: error: expected class-name at end of input 15 | ~ | ^
s023677021
p00340
C++
#include<bits/stdc++.h> using namespace std; int main(){ int e1,e2,e3,e4; cin>>e1>>e2>>e3>>e4; if(e1==e2||e1==e3||e1==e4){ cout<<yes<<endl; } else { cout<<no<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:14: error: 'yes' was not declared in this scope 9 | cout<<yes<<endl; | ^~~ a.cc:11:14: error: 'no' was not declared in this scope 11 | cout<<no<<endl; | ^~ a.cc:13:2: error: expected '}' at end of input 13 | } | ...
s011776994
p00340
C++
#include<bits/stdc++.h> using namespace std; int main(){ int e1,e2,e3,e4; cin>>e1>>e2>>e3>>e4; if(e1==e2||e1==e3||e1==e4){ cout<<yes<<endl; } else if (e2==e3||e2==e4){ cout<<yes<<endl; } else if (e3==e4){ cout<<yes<<endl; } else { cout<<no<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:14: error: 'yes' was not declared in this scope 9 | cout<<yes<<endl; | ^~~ a.cc:11:14: error: 'yes' was not declared in this scope 11 | cout<<yes<<endl; | ^~~ a.cc:13:14: error: 'yes' was not declared in this scope 13 |...
s962014220
p00340
C++
#include<bits/stdc++.h> using namespace std; int main(){ int e1,e2,e3,e4; cin>>e1>>e2>>e3>>e4; if(e1==e2||e1==e3||e1==e4){ cout<<yes<<endl; } else if (e2==e3||e2==e4){ cout<<yes<<endl; } else if (e3==e4){ cout<<yes<<endl; } else { cout<<no<<endl; } return 0;...
a.cc: In function 'int main()': a.cc:9:14: error: 'yes' was not declared in this scope 9 | cout<<yes<<endl; | ^~~ a.cc:11:14: error: 'yes' was not declared in this scope 11 | cout<<yes<<endl; | ^~~ a.cc:13:14: error: 'yes' was not declared in this scope 13 |...
s794194622
p00340
C++
#include<bits/stdc++.h> using namespace std; int main(){ int e1,e2,e3,e4; cin>>e1>>e2>>e3>>e4; if(e1==e2&&e3==e4){ cout<<yes<<endl; } else if (e2==e3&&e1==e4){ cout<<yes<<endl; } else if (e1==e3&&e2==e4){ cout<<yes<<endl; } else { cout<<no<<endl; } return 0;...
a.cc: In function 'int main()': a.cc:9:14: error: 'yes' was not declared in this scope 9 | cout<<yes<<endl; | ^~~ a.cc:11:14: error: 'yes' was not declared in this scope 11 | cout<<yes<<endl; | ^~~ a.cc:13:14: error: 'yes' was not declared in this scope 13 |...
s283394606
p00340
C++
#include<bits/stdc++.h> using namespace std; int main(){ int e1,e2,e3,e4; cin>>e1>>e2>>e3>>e4; if(e1==e2&&e3==e4){ cout<<"yes"<<endl; } else if (e2==e3&&e1==e4){ cout<<"yes"<<endl; } else if (e1==e3&&e2==e4){ cout<<"yes"<<endl; } else { cout<<"no<"<endl; } r...
a.cc: In function 'int main()': a.cc:15:19: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 15 | cout<<"no<"<endl; | ~~~~~~~~~~~^~~~~ In file included from /usr/include/c++/14/regex:68, from /usr/include/x...
s095512095
p00341
C++
using System; using System.Linq; public class Test { public static void Main() { int[] a = Console.ReadLine().Split().Select(int.Parse).ToArray(); Array.Sort(a); if(a[0] == a[1] && a[1] == a[2] && a[2] == a[3] && a[4] == a[5] && a[5] == a[6] && a[6] == a[7] && a[8] == a[9] && a[9] == a[10] && a[10] == a[11]) C...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Linq; | ^~~~~~ a.cc:4:1: error: expected unqualified-id before 'public' 4 | public class Test | ^~~~~~
s162261038
p00341
C++
//============================================================================ // Name : AOJ.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostr...
a.cc: In function 'int main()': a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 22 | sort(a,a+12); | ^~~~ | sqrt
s643968421
p00341
C++
//============================================================================ // Name : AOJ.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostr...
a.cc: In function 'int main()': a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 22 | sort(a,a+12); | ^~~~ | sqrt
s057133245
p00341
C++
//============================================================================ // Name : AOJ.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostr...
a.cc: In function 'int main()': a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 21 | sort(a,a+12); | ^~~~ | sqrt
s641214804
p00341
C++
//============================================================================ // Name : AOJ.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <iostr...
a.cc: In function 'int main()': a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 21 | sort(a,a+12,greater<int>()); | ^~~~ | sqrt
s929633097
p00341
C++
#include <bits/stdc++.h> using namespace std; int e[12]; int main() { cin >> e[0] >> e[1] >> e[2] >> e[3] >> e[4] >> e[5] >> e[6 >> e[7] >> e[8] >> e[9] >> e[10] >> e[11] >> e[12]; sort(e,e+12); if(e[0] == e[1] == e[2] == e[3] && e[4] == e[5] == e[6] == e[7] && e[8] == e[9] == e[10] == e[11]) { ...
a.cc: In function 'int main()': a.cc:9:20: error: expected ']' before ';' token 9 | >> e[11] >> e[12]; | ^ | ]
s518801196
p00341
C++
#include <bits/stdc++.h> using namespace std; int e[12]; int main() { cin >> e[0] >> e[1] >> e[2] >> e[3] >> e[4] >> e[5] >> e[6 >> e[7] >> e[8] >> e[9] >> e[10] >> e[11]; sort(e,e+12); if(e[0] == e[1] == e[2] == e[3] && e[4] == e[5] == e[6] == e[7] && e[8] == e[9] == e[10] == e[11]) { cout << "...
a.cc: In function 'int main()': a.cc:8:59: error: expected ']' before ';' token 8 | >> e[5] >> e[6 >> e[7] >> e[8] >> e[9] >> e[10] >> e[11]; | ^ | ]
s657097935
p00341
C++
#include <bits/stdc++.h> using namespace std; int e[12]; int main() { cin >> e[0] >> e[1] >> e[2] >> e[3] >> e[4] >> e[5] >> e[6 >> e[7] >> e[8] >> e[9] >> e[10] >> e[11]; sort(e,e+12); if(e[0] == e[1] == e[2] == e[3] && e[4] == e[5] == e[6] == e[7] && e[8] == e[9] == e[10] == e[11]) { cout << "ye...
a.cc: In function 'int main()': a.cc:7:103: error: expected ']' before ';' token 7 | cin >> e[0] >> e[1] >> e[2] >> e[3] >> e[4] >> e[5] >> e[6 >> e[7] >> e[8] >> e[9] >> e[10] >> e[11]; | ^ | ...
s011175314
p00341
C++
#include <bits/stdc++.h> using namespace std; int a = 12; int e[12]; int main() { for(int b = 0; b < a; ++ b) { cin >> e[b]; } sort(a,a+12); if (e[0] == e[1] == e[2] == e[3] && e[4] == e[5] == e[6] == e[7] && e[8] == e[9] == e[10] == e[11] == e[12]) { cout << "yes" << endl; } else { cout << "no...
In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAcc...
s048938731
p00341
C++
#include <bits/stdc++.h> using namespace std; int a = 12; int b = 0; int e[12]; int main() { for(; b < a; ++ b) { cin >> e[b]; } sort(a,a+12); if (e[0] == e[1] == e[2] == e[3] && e[4] == e[5] == e[6] == e[7] && e[8] == e[9] == e[10] == e[11] == e[12]) { cout << "yes" << endl; } else { cout << "...
In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAcc...
s774000079
p00341
C++
#include <bits/stdc++.h> using namespace std; int a = 0; int e[12]; int main() { for(; a < 12; ++ a) { cin >> e[b]; } sort(a,a+12); if (e[0] == e[1] == e[2] == e[3] && e[4] == e[5] == e[6] == e[7] && e[8] == e[9] == e[10] == e[11]) { cout << "yes" << endl; } else { cout << "no" << endl; } }
a.cc: In function 'int main()': a.cc:9:14: error: 'b' was not declared in this scope 9 | cin >> e[b]; | ^ In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits...
s358941081
p00341
C++
#include <bits/stdc++.h> using namespace std; int a = 0; int e[12]; int main() { for(; a < 12; ++ a) { cin >> e[a]; } sort(a,a+12); if (e[0] == e[1] == e[2] == e[3] && e[4] == e[5] == e[6] == e[7] && e[8] == e[9] == e[10] == e[11]) { cout << "yes" << endl; } else { cout << "no" << endl; } }
In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAcc...
s661321001
p00341
C++
#include<sdio.h> #include<iostream> using namespace std; int main(){ int m,n,i,j,t,y; int e[15]; for(i=0;i<4;i++){ scanf("%d",&e[i]); } sort(e,e+12); if(e[0]==e[1] && e[2]==e[3] && e[5]==e[6] && e[7]==e[8] && e[9]==e[10] && e[11] && e[12]){ printf("yes\n"); } else{ printf("no\n"); } }
a.cc:1:9: fatal error: sdio.h: No such file or directory 1 | #include<sdio.h> | ^~~~~~~~ compilation terminated.
s106931593
p00341
C++
#include<sdio.h> #include<iostream> #include<algorithm> using namespace std; int main(){ int m,n,i,j,t,y; int e[15]; for(i=0;i<4;i++){ scanf("%d",&e[i]); } sort(e,e+12); if(e[0]==e[1] && e[2]==e[3] && e[5]==e[6] && e[7]==e[8] && e[9]==e[10] && e[11] && e[12]){ printf("yes\n"); } else{ printf("no\n"); } ...
a.cc:1:9: fatal error: sdio.h: No such file or directory 1 | #include<sdio.h> | ^~~~~~~~ compilation terminated.
s401122186
p00341
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int a[12]; int i,j; int cut=0; int b[3]={1,5,9}; for(i=0;i<12;i++){ cin>>a[i]; } for(i=0;i<12;i++){ for(j=11;j>i;j--){ if(a[i]>a[j]){ swap(a[i],a[j]); } } } for(i=0;i=3;i++){ for(j=b[i];j<b[i]+2){ if(b[i]==a[j]){ c...
a.cc: In function 'int main()': a.cc:20:36: error: expected ';' before ')' token 20 | for(j=b[i];j<b[i]+2){ | ^ | ;
s765910877
p00341
C++
#include <bits/stdc++.h> using namespace std; int main() { int e[12]; for(int a = 0; a < 12; +;a) { cin >> e[a]; } sort(e,e+12); if(e[0] == e[1] == e[2] == e[3] && e[4] == e[5] == e[6] == e[7] && e[8] == e[9] == e[10] == e[11]) { cout << "yes" << endl; }else { cout << ...
a.cc: In function 'int main()': a.cc:6:29: error: expected primary-expression before ';' token 6 | for(int a = 0; a < 12; +;a) { | ^ a.cc:6:29: error: expected ')' before ';' token 6 | for(int a = 0; a < 12; +;a) { | ~ ^ | ...
s976935044
p00341
C++
#include <iostream> #include <math.h> #include <cmath> #include <stdio.h> #include <string> #include <string.h> using namespace std; int main (void) { int a[12]; for (int i = 0; i < 12; i++) { cin >> a[i]; } sort (a,a + 12); int ng = 0,p = 0; for (int j = 0; j < 3; j++) { for (int i = j + (3 * j); i < j...
a.cc: In function 'int main()': a.cc:18:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 18 | sort (a,a + 12); | ^~~~ | sqrt
s056850220
p00342
C
/* AOJ #0347 title: @kankichi573 */ #include <stdio.h> #include <stdlib.h> #include <float.h> double max(double x,double y) { if(x>y) return(x); else return(y); } int n,ar[1000]; int comp( const void * a , const void * b ) { if( *( int * )a < *( int * )b ) { return -1; } else if( *( in...
main.c: In function 'main': main.c:42: error: unterminated #ifdef 42 | #ifdef DEBUG main.c:41:3: error: expected declaration or statement at end of input 41 | m2=ar[n-2]+ar[n-1]; | ^~
s801147252
p00342
C++
var input = require('fs').readFileSync('/dev/stdin', 'utf8'); var arr=input.trim().split("\n"); arr.shift(); var a = arr.shift().split(" ").map(Number); a.sort(function(a,b){ return b-a; }); var s = []; a.reduce(function(a,b){ s.push([a-b,a,b]); return b; }); var max = 0; a.reduce(function(a,b){ s.forEach(...
a.cc:1:21: warning: multi-character character constant [-Wmultichar] 1 | var input = require('fs').readFileSync('/dev/stdin', 'utf8'); | ^~~~ a.cc:1:40: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes 1 | var input = require('fs').readFileSync('/dev/st...
s899079415
p00342
C++
using System; using System.Linq; public class Test { public static void Main() { int n = int.Parse(Console.ReadLine()); int[] a = Console.ReadLine().Split().Select(int.Parse).ToArray(); Array.Sort(a); double ret = 0.0; for(int i = 0; i < n - 1; i++) { for(int j = i + 2; j < n - 1; j++) { double c1 =...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Linq; | ^~~~~~ a.cc:4:1: error: expected unqualified-id before 'public' 4 | public class Test | ^~~~~~
s533272839
p00342
C++
#include<iostream> #include<algorithm> using namespace std; int main() { int n; cin >> n; long long a[1000]; for (int i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); long long b = 1000000000; for (int i = 1; i < n-2; i++) { if (a[i] - a[i - 1] < b) b = a[i] - a[i - 1]; } long float d = max(max((a[n - 1] + a[...
a.cc: In function 'int main()': a.cc:14:9: error: 'long' specified with 'float' 14 | long float d = max(max((a[n - 1] + a[n - 2]) / (b), ((a[n - 1] + a[n - 4]) / (a[n - 2] - a[n - 3]))), (a[n - 3] + a[n - 4]) / (a[n - 1] - a[n - 2])); | ^~~~
s843162294
p00342
C++
#include<iostream> #include<algorithm> using namespace std; int main() { int n; cin >> n; long long a[1000]; for (int i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); long long b = 1000000000; for (int i = 1; i < n-2; i++) { if (a[i] - a[i - 1] < b) b = a[i] - a[i - 1]; } long float d = max(max((a[n - 1] + a[...
a.cc: In function 'int main()': a.cc:14:9: error: 'long' specified with 'float' 14 | long float d = max(max((a[n - 1] + a[n - 2]) / (b), ((a[n - 1] + a[n - 4]) / (a[n - 2] - a[n - 3]))), (a[n - 3] + a[n - 4]) / (a[n - 1] - a[n - 2])); | ^~~~
s616363908
p00342
C++
#include<iostream> #include<algorithm> #include<cstdio> #include <iomanip> using namespace std; int main() { while (true) { int n; cin >> n; long float a[1000]; for (int i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); long long b = 1000000000; for (int i = 1; i < n - 2; i++) { if (a[i] - a[i - 1] < b...
a.cc: In function 'int main()': a.cc:10:17: error: 'long' specified with 'float' 10 | long float a[1000]; | ^~~~ a.cc:17:17: error: 'long' specified with 'float' 17 | long float d = max(max((a[n - 1] + a[n - 2]) / (b), ((a[n - 1] + a[n - 4]) / (a[n - 2] - a[n...
s565851460
p00342
C++
#include<bits/ stdc ++.h> using namespace std ; int main(){ int n,i,j,k ; cin >>n; double a[n ], ans =0,x,y; for( i =0;i< n;i ++) cin >>a[ i ]; sort( a,a+n ); for( i =0;i< n;i ++){ for(j=i+1;j< n;j ++){ k=n - 1; while(k== i ||k==j) k -- ; x=a[k];k -- ; while(k== i ||k==j) k -- ; y=a[k]; ans =max( ans ,( x+y )/(a[j] ...
a.cc:1:15: error: missing terminating > character 1 | #include<bits/ | ^ a.cc:1:9: fatal error: bits/: No such file or directory 1 | #include<bits/ | ^ compilation terminated.
s676069709
p00342
C++
#include <bits/stdc++.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--) #define PB push_back #define MP make_pair #define ALL(a) (a).begin(),(a).end() #define PII p...
a.cc: In function 'int main()': a.cc:31:10: error: redeclaration of 'double d' 31 | double d=(double)(V[n-1]+V[n-4])/(double)(V[n-2]-V[n-3]); | ^ a.cc:29:10: note: 'double d' previously declared here 29 | double d=(double)(V[n-3]+V[n-4])/(double)(V[n-1]-V[n-2]); | ^
s460315426
p00342
C++
#include<sdio.h> #include<iostream> #include<algorithm> using namespace std; int main(){ int m,n,a[1000],i,j; float ans=0; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a[i]); } sort(a,a+n); ans=(a[n]+a[n-1])/(a[1]-a[0]); printf("%1.6f",ans); }
a.cc:1:9: fatal error: sdio.h: No such file or directory 1 | #include<sdio.h> | ^~~~~~~~ compilation terminated.
s740702255
p00342
C++
#include<sdio.h> #include<iostream> #include<algorithm> using namespace std; int main(){ int m,n,a[1000],i,j; float ans=0; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a[i]); } sort(a,a+n); ans=(a[n]+a[n-1])/(a[1]-a[0]); printf("%1.6f",ans); }
a.cc:1:9: fatal error: sdio.h: No such file or directory 1 | #include<sdio.h> | ^~~~~~~~ compilation terminated.
s321392516
p00342
C++
#include<sdio.h> #include<iostream> #include<algorithm> using namespace std; int main(){ int m,n,a[1000],i,j; float ans=0; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a[i]); } sort(a,a+n); ans=(float)(a[n]+a[n-1])/(a[1]-a[0]); printf("%.6f",ans); }
a.cc:1:9: fatal error: sdio.h: No such file or directory 1 | #include<sdio.h> | ^~~~~~~~ compilation terminated.
s689474844
p00342
C++
#include <iostream> #include <vector> #include <algorithm> #include <set> using namespace std; int n; vector<int> a; multiset<int> s; double ans, ans2; int main(){ cin >> n; a.resize(n); sort(a.begin(), a.end()); for(int i=0; i<n-1; i++) s.insert(a[i+1]-a[i]); int flag; int b; for...
a.cc: In function 'int main()': a.cc:20:29: error: request for member 'size' in 'b', which is of non-class type 'int' 20 | for(int i=0; i<100 && b.size(); i++){ | ^~~~ a.cc:30:26: error: invalid types 'int[int]' for array subscript 30 | ans2 /= b[i]; | ...
s896370173
p00342
C++
#include <iostream> #include <vector> #include <algorithm> #include <set> using namespace std; int n; vector<int> a; multiset<int> s; double ans, ans2; int main(){ cin >> n; a.resize(n); sort(a.begin(), a.end()); for(int i=0; i<n-1; i++) s.insert(a[i+1]-a[i]); int flag; int b; for...
a.cc: In function 'int main()': a.cc:30:26: error: invalid types 'int[int]' for array subscript 30 | ans2 /= b[i]; | ^
s168573296
p00342
C++
#include <iostream> #include <vector> #include <algorithm> #include <set> using namespace std; int n; vector<int> a; multiset<int> s; double ans, ans2; int main(){ cin >> n; a.resize(n); sort(a.begin(), a.end()); for(int i=0; i<n-1; i++) s.insert(a[i+1]-a[i]); int flag; double b; ...
a.cc: In function 'int main()': a.cc:24:19: error: expected ';' before 'for' 24 | b = (*itr) | ^ | ; 25 | for(int j=0; j<n; j++){ | ~~~ a.cc:25:22: error: 'j' was not declared in this scope 25 | for(int j=0; j<n; j++)...
s303338419
p00343
Java
import java.util.Scanner; public class A { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); while (n-- > 0) { boolean[] used = new boolean[14]; boolean ans = false; for (int i = 0; i < 6; i++) { ...
Main.java:3: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s019060611
p00343
Java
import java.util.Scanner; public class A { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); while (n-- > 0) { boolean[] used = new boolean[14]; boolean ans = false; for (int i = 0; i < 6; i++) { ...
Main.java:3: error: class A is public, should be declared in a file named A.java public class A { ^ 1 error
s084390629
p00343
C++
#include<iostream> #include <algorithm> using namespace std; int main(){ int Tc; cin>>Tc; while(Tc--){ set<int> a,b; for(int i=0;i<6;i++){ int x; cin>>x; a.insert(x); } for(int i=1;i<=13;i++) if(a.count(i)==0&&i!=7)b.insert(i);...
a.cc: In function 'int main()': a.cc:9:9: error: 'set' was not declared in this scope 9 | set<int> a,b; | ^~~ a.cc:3:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>' 2 | #include <algorithm> +++ |+#include <set> 3 | using namespace...
s182310187
p00344
C
#include<stdio.h> using namespace std; int n,i,p,c,ans=0; int a[100000]; int x[100000]; int y[100000]; int main(){ scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a[i]); x[i]=-1; y[i]=-1; } for(i=0;i<n;i++){ p=i; c=0; while(x[p]==-1){ x[p]=c++; y[p]=i; p=(p+a[p])%n; ...
main.c:2:1: error: unknown type name 'using' 2 | using namespace std; | ^~~~~ main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std' 2 | using namespace std; | ^~~
s983202917
p00344
C++
#include <iostream> #include <vector> using namespace std; constexpr int MAX = 100000; int res; int num[MAX], visited[MAX]; void dfs(int v, int c, const vector<int>& a) { visited[v] = 0; num[v] = c; int to = (v + a[v]) % a.size(); if (visited[to] == -1) { dfs(to, c + 1, a); } else if(visited...
a.cc: In function 'int main()': a.cc:33:5: error: 'memset' was not declared in this scope 33 | memset(num, -1, sizeof(num)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <vector> +++ |+#include <cstring> ...
s554359744
p00344
C++
#include <vector> #include <iostream> using namespace std; int n, a[100009]; bool cycle[100009], vis1[100009], vis2[100009]; int main() { cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 0; i < n; i++) { vector<int> w; int p = i; while (!vis1[p]) { p = (p + a[p]) % n; if (vis2[p]) { in...
a.cc: In function 'int main()': a.cc:14:47: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)' 14 | int pos = find(w.begin(), w.end(), p) - w.begin(); | ~~~~^~~~~~~~~~~~~~~~~~~~~~...
s807968211
p00344
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<string> #include<vector> #include<queue> #include<set> #include<stack> #include<functional> #include<list> #include<map> #include<unordered_map> using namespace std; bool a[10000],s[10000]; int b[10000], c[10000]; signed main() { int d, sum = 0; cin >>...
a.cc: In function 'int main()': a.cc:25:25: error: 'memset' was not declared in this scope 25 | memset(c, 0, sizeof(c)); | ^~~~~~ a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 11 | #include<...
s276417740
p00344
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<string> #include<vector> #include<queue> #include<set> #include<stack> #include<functional> #include<list> #include<map> #include<unordered_map> using namespace std; bool a[100000],s[100000]; int b[100000], c[100000]; signed main() { int d, sum = 0; ci...
a.cc: In function 'int main()': a.cc:25:25: error: 'memset' was not declared in this scope 25 | memset(c, 0, sizeof(c)); | ^~~~~~ a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 11 | #include<...
s937607961
p00344
C++
#include <vector> #include <iostream> #include <utility> #include <algorithm> #include <string> #include <deque> #include <queue> #include <tuple> #include <queue> #include <functional> #include <cmath> #include <iomanip> #include <map> #include <set> #include <numeric> #include <unordered_map> #include <unordered_set>...
a.cc:26:21: error: template argument 1 is invalid 26 | #define vl vector<ll> | ^ a.cc:46:1: note: in expansion of macro 'vl' 46 | vl used(MAX,0); | ^~ a.cc:26:21: error: template argument 2 is invalid 26 | #define vl vector<ll> | ^ a.cc:46:1: note: in e...
s928984426
p00344
C++
#include <iostream> #include <queue> using namespace std; int n, a[100000], v[100000]; int main() { cin >> n; for (int i = 0; i < n; ++i) cin >> a[i]; for (int i = 0; i < n; ++i) { if (v[i] == 0) { int t = i; queue<int> q; while (1) { ...
a.cc: In function 'int main()': a.cc:37:13: error: 'count' was not declared in this scope 37 | cout << count(v, v + n, 1) << endl; | ^~~~~
s300247839
p00344
C++
#include <iostream> #include <queue> using namespace std; int n, a[100000], v[100000]; int main() { cin >> n; for (int i = 0; i < n; ++i) cin >> a[i]; for (int i = 0; i < n; ++i) { if (v[i] == 0) { int t = i; queue<int> q; while (1) { ...
a.cc: In function 'int main()': a.cc:37:13: error: 'count' was not declared in this scope 37 | cout << count(v, v + n, 1) << endl; | ^~~~~
s904732772
p00344
C++
#include<iostream> using namespace std; int n; #define MAX 100005 int a[MAX], x[MAX], y[MAX]; int main() { cin >> n; for (int i = 0; i < n; i++)cin >> a[i]; memset(x, -1, sizeof(x)); memset(y, -1, sizeof(y)); int ans = 0; for (int i = 0; i < n; i++) { int p = i, c = 0; while (x[p] == -1) { x[p] = c++; ...
a.cc: In function 'int main()': a.cc:10:9: error: 'memset' was not declared in this scope 10 | memset(x, -1, sizeof(x)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstri...
s170519371
p00344
C++
#include<iostream> using namespace std; int n; #define MAX 100005 int a[MAX], x[MAX], y[MAX]; int main() { cin >> n; for (int i = 0; i < n; i++)cin >> a[i]; memset(x, -1, sizeof(x)); memset(y, -1, sizeof(y)); int ans = 0; for (int i = 0; i < n; i++) { int p = i, c = 0; while (x[p] == -1) { x[p] = c++; ...
a.cc: In function 'int main()': a.cc:10:9: error: 'memset' was not declared in this scope 10 | memset(x, -1, sizeof(x)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstri...
s918061394
p00344
C++
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(), m[] = new int[n],l[]=new int[n], c = 0; boolean[] t=new boolean[n]; for (int i = 0; i < n; i++) { m[i] = sc.nextInt(); ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s692992570
p00345
C++
#include <string> #include <iostream> using namespace std; int gcd(int x, int y) { if (y == 0) return x; return gcd(y, x % y); } string s; int main() { cin >> s; string t1 = s.substr(0, s.find('.')), t2 = s.substr(s.find('.') + 1); int d1 = stoi(t1), d2 = 1; if (s.find('(') == string::npos) { d2 = t2.size(); d1...
a.cc: In function 'int main()': a.cc:23:46: error: 'pow' was not declared in this scope 23 | int e1 = stoi(t4), e2 = (int)pow(10, t4.size()) - 1; | ^~~
s548843922
p00345
C++
#define _USE_MATH_DEFINES #include <cstdio> #include <iostream> #include <sstream> #include <fstream> #include <iomanip> #include <algorithm> #include <cmath> #include <complex> #include <string> #include <vector> #include <list> #include <queue> #include <stack> #include <set> #include <map> #include <bitset> #include...
a.cc: In function 'int main()': a.cc:152:27: error: cannot bind non-const lvalue reference of type 'std::pair<long long int, long long int>&' to an rvalue of type 'std::pair<long long int, long long int>' 152 | auto& p = ans.getValue(); | ~~~~~~~~~~~~^~
s886769293
p00345
C++
#include<iostream> #include<string> using namespace std; string s; int a,b,c,d,e; int main(){ cin>>s; for(int i=0;i<s.size();i++){ if(isdigit(s[i]))a=a*10+(s[i]-'0'),d*=10; else if(s[i]=='.')d++; else while(isdigit(s[++i]))b=b*10+(s[i]-'0'),c=c*10+9; } if(c)a=b+a*c,d=d*c; cout<<a/__gcd(a,d)<<'/'<<...
a.cc: In function 'int main()': a.cc:14:11: error: '__gcd' was not declared in this scope 14 | cout<<a/__gcd(a,d)<<'/'<<d/__gcd(a,d)<<endl; | ^~~~~
s866978436
p00346
C++
#include<bits/stdc++.h> using namespace std; int dist[2000];set<int>p[2000]; vector<pair<int,int>> vec[2000]; int n,m; bool used2[2000]; set<int>R[2000][2000]; int dst[2000][2000]; vector<int>shor[2000]; void dijkstra(int s){ for(int i=0;i<2000;i++){dist[i]=999999999;p[i].clear();} priority_queue<pair<int,int>,vector...
a.cc: In function 'void solve(int)': a.cc:41:32: error: no match for 'operator[]' (operand types are 'bool [2000]' and 'std::set<int>') 41 | if(used[a2]==false){used[a2]=true;Q.push(a2);} | ^ a.cc:41:49: error: no match for 'operator[]' (operand types are ...
s397844702
p00346
C++
#include <bits/stdc++.h> using namespace std; #define all(v) (v).begin(), (v).end() #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define reps(i, f, n) for(int i = (int)(f); i < (int)(n); i++) typedef pair<int, int> P; const int inf = 1LL << 55; struct edge { int to, cost; edge(){} edge(int to, int cos...
a.cc:61:26: error: macro "rep" passed 3 arguments, but takes just 2 61 | rep(i, N) rep(j, i+1, N) maxdist = max(maxdist, mincost[i][j]); | ^ a.cc:6:9: note: macro "rep" defined here 6 | #define rep(i, n) for(int i = 0; i < (int)(n); i++) | ^~~ a.cc:11:21: warning: o...
s254585810
p00346
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define pb push_back #define rep(i, a, n) for(int i = (a); i < (n); i++) #define dep(i, a, n) for(int i = (a); i >= (n); i--) #define mod 1e9+7 __attribute__((constructor)) void initial() { cin.tie(0); ios::sync_with_st...
a.cc: In function 'int solve(int, int)': a.cc:57:1: warning: no return statement in function returning non-void [-Wreturn-type] 57 | } | ^ a.cc: In function 'int main()': a.cc:79:26: error: array must be initialized with a brace-enclosed initializer 79 | int done[1501][1501] = 0; | ...
s768403796
p00346
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define pb push_back #define rep(i, a, n) for(int i = (a); i < (n); i++) #define dep(i, a, n) for(int i = (a); i >= (n); i--) #define mod 1e9+7 __attribute__((constructor)) void initial() { cin.tie(0); ios::sync_with_st...
a.cc: In function 'void dijkstra(int)': a.cc:27:10: error: 'i' was not declared in this scope 27 | fill(d[i], d[i] + n + 1, 1145141919); | ^ a.cc: In function 'int solve(int, int)': a.cc:57:1: warning: no return statement in function returning non-void [-Wreturn-type] 57 | } | ^
s627943075
p00346
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define pb push_back #define rep(i, a, n) for(int i = (a); i < (n); i++) #define dep(i, a, n) for(int i = (a); i >= (n); i--) #define mod 1e9+7 __attribute__((constructor)) void initial() { cin.tie(0); ios::sync_with_st...
a.cc: In function 'void dijkstra(int)': a.cc:36:15: error: 'e' was not declared in this scope 36 | if(d[s][e.to] > d[s][v] + g[v][i].cost) { | ^
s500495110
p00346
C++
#include <bits/stdc++.h> #define FOR(i, a, b) for (int i = a; i <= (int) b; ++i) #define ii pair <int, int> using namespace std; const int N = 1503; int n, m; vector <ii> adj[N]; void init() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); freopen("main.inp","r",stdin); freopen("main.out","w",stdout); } priority_que...
a.cc:1:26: warning: extra tokens at end of #include directive 1 | #include <bits/stdc++.h> #define FOR(i, a, b) for (int i = a; i <= (int) b; ++i) #define ii pair <int, int> using namespace std; const int N = 1503; int n, m; vector <ii> adj[N]; void init() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); freopen...
s117126486
p00347
C++
#include <iostream> #include <stdio.h> #include <math.h>   using namespace std; const int Maxh=1000+100;   int h,w; int a[Maxh][Maxh]; int l[Maxh][Maxh],r[Maxh][Maxh]; int fl[Maxh][Maxh],fr[Maxh][Maxh],sl[Maxh][Maxh],sr[Maxh][Maxh]; int Res;   void BuildLR() {     for (int i=1; i<=h; i++)     {         for (int j=w; j>...
a.cc:4:1: error: extended character   is not valid in an identifier 4 |   | ^ a.cc:7:1: error: extended character   is not valid in an identifier 7 |   | ^ a.cc:13:1: error: extended character   is not valid in an identifier 13 |   | ^ a.cc:16:1: error: extended character   is not valid in ...
s864774372
p00347
C++
#include <iostream> #include <stdio.h>   using namespace std; const int Maxh=1000+100;   int h,w; int a[Maxh][Maxh]; int l[Maxh][Maxh],r[Maxh][Maxh]; int fl[Maxh][Maxh],fr[Maxh][Maxh],sl[Maxh][Maxh],sr[Maxh][Maxh]; int Res;   void BuildLR() {     for (int i=1; i<=h; i++)     {         for (int j=w; j>=1; j--) r[i][j]=r...
a.cc:3:1: error: extended character   is not valid in an identifier 3 |   | ^ a.cc:6:1: error: extended character   is not valid in an identifier 6 |   | ^ a.cc:12:1: error: extended character   is not valid in an identifier 12 |   | ^ a.cc:15:1: error: extended character   is not valid in ...
s151892643
p00347
C++
#include <iostream> #include <stdio.h>   using namespace std; const int Maxh=1000+100;   int h,w; int a[Maxh][Maxh]; int l[Maxh][Maxh],r[Maxh][Maxh]; int fl[Maxh][Maxh],fr[Maxh][Maxh],sl[Maxh][Maxh],sr[Maxh][Maxh]; int Res;   void BuildLR() {     for (int i=1; i<=h; i++)     {         for (int j=w; j>=1; j--) r[i][j]=r...
a.cc:3:1: error: extended character   is not valid in an identifier 3 |   | ^ a.cc:6:1: error: extended character   is not valid in an identifier 6 |   | ^ a.cc:12:1: error: extended character   is not valid in an identifier 12 |   | ^ a.cc:15:1: error: extended character   is not valid in ...
s567901859
p00348
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.List; import java.util.Scanner; public class Sort { public static void main(String[] args) throws NumberFormatException, IOException { @SuppressWarnings("resource") Scanner ...
Main.java:8: error: class Sort is public, should be declared in a file named Sort.java public class Sort { ^ 1 error
s780438683
p00348
Java
import java.io.*; import java.util.ArrayList; import java.util.List; class Main { public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in));// ??\???????????????????????? String line; // ??\???????????????????????\??? ...
Main.java:20: error: cannot find symbol int a = Integer.parseInt(list[n]); ^ symbol: variable list location: class Main 1 error
s965865209
p00348
Java
class Main { public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new InputStreamReader(System.in));// ??\???????????????????????? String line; // ??\???????????????????????\??? int cnt = 0; List<Integer> numList = new ArrayLis...
Main.java:41: error: reached end of file while parsing } ^ 1 error
s431957804
p00348
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> P; #define MAX 3000000 int n,size; vector<int> A; unordered_map<int,int> mp; vector<ll> bit; vector<P> tree; void update(int a,int b,P x,int k=0,int l=0,int r=size){ if(b<=l || r<=a)return; if(a<=l && r<=b){ tree[k]=max(tree...
a.cc:12:51: error: reference to 'size' is ambiguous 12 | void update(int a,int b,P x,int k=0,int l=0,int r=size){ | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include...
s669027779
p00348
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> P; #define MAX 3000000 int n,size; vector<int> A; unordered_map<int,int> mp; vector<ll> bit; vector<P> tree; void update(int a,int b,P x,int k,int l,int r){ if(b<=l || r<=a)return; if(a<=l && r<=b){ tree[k]=max(tree[k],x); ...
a.cc: In function 'void Upd(int, int, P)': a.cc:27:24: error: reference to 'size' is ambiguous 27 | update(a,b+1,x,0,0,size); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-lin...
s265086443
p00348
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> P; #define MAX 3000000 int n,size; vector<int> A; unordered_map<int,int> mp; vector<ll> bit; vector<P> tree; void update(int a,int b,P x,int k,int l,int r){ if(b<=l || r<=a)return; if(a<=l && r<=b){ tree[k]=max(tree[k],x); ...
a.cc: In function 'void Upd(int, int, P)': a.cc:27:24: error: reference to 'size' is ambiguous 27 | update(a,b+1,x,0,0,size); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-lin...
s788909080
p00348
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> P; #define MAX 300000 int n,size; vector<int> A; int mp[MAX]; vector<ll> bit; vector<P> tree; void update(int a,int b,P x,int k,int l,int r){ if(b<=l || r<=a)return; if(a<=l && r<=b){ tree[k]=max(tree[k],x); }else{ int...
a.cc: In function 'void Upd(int, int, P)': a.cc:27:24: error: reference to 'size' is ambiguous 27 | update(a,b+1,x,0,0,size); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bitset:52, from /usr/include/x86_64-lin...
s417408149
p00350
C++
#include <bits/stdc++.h> using namespace std; const unsigned mod = 1e9 + 7; unsigned power[234567], lad[26][234567]; struct SegmentTree { vector< unsigned > hashed; vector< int > lazy; int sz; SegmentTree(int n) { sz = 1; while(sz < n) sz <<= 1; hashed.assign(2 * sz - 1, 0); lazy.assign(2 ...
a.cc: In function 'int main()': a.cc:130:84: error: 'struct SegmentTree' has no member named 'idx' 130 | } else if(b - a == ok || (d - c != ok && tree.get(a + ok, a + ok + 1) < tree.idx(c + ok, c + ok + 1))) { | ^~~
s392267102
p00350
C++
using namespace std; using ULL = unsigned long long; const ULL B = 100'000'007; class SegmentTree { public: SegmentTree(int n) : size_(1), pow_(1, 1) { while(size_ < n) size_ <<= 1; node_.assign(size_ << 1, 0); lazy_.assign(size_ << 1, 0); awaiting_.assign(size_ << 1, false); while(pow_.size() ...
a.cc:59:3: error: 'vector' does not name a type 59 | vector<ULL> node_; | ^~~~~~ a.cc:60:3: error: 'vector' does not name a type 60 | vector<ULL> lazy_; | ^~~~~~ a.cc:61:3: error: 'vector' does not name a type 61 | vector<bool> awaiting_; | ^~~~~~ a.cc:62:3: error: 'vector' does n...
s905115574
p00352
Java
import java.util.Scanner; public class Main{ public static void main (String [ ] args){ Scanner sc = new Scanner (System.in); int a = sc.next Int( ); int b = sc.nextInt( ); System.out.printLn((a+b)/2); } }
Main.java:7: error: ';' expected int a = sc.next Int( ); ^ 1 error
s615784510
p00352
Java
import java.util.Scanner; public class Main{ public static void main (String [] args){ Scanner sc = new Scanner (System.in); int a = sc.next Int(); int b = sc.nextInt(); System.out.printLn((a+b)/2); } }
Main.java:7: error: ';' expected int a = sc.next Int(); ^ 1 error