submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s698563328 | p00362 | C++ | #include<bits/stdc++.h>
#define U [100005]={}
typedef long long L;using namespace std;map<L,L> path U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c,p,r;char s U;D(L a){Z[a]=1;for(map<L,L>::iterator I=path[a].begin();I!=path[a].end();I++){L d=I->first;if(d-P[a]){P[d]=a;E[d]=E[a]+1;C[d]=I->second;D(d);Z[a]+=Z[d];!H[a]|... | a.cc:3:118: error: ISO C++ forbids declaration of 'D' with no type [-fpermissive]
3 | typedef long long L;using namespace std;map<L,L> path U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c,p,r;char s U;D(L a){Z[a]=1;for(map<L,L>::iterator I=path[a].begin();I!=path[a].end();I++){L d=I->first;if(d-P[a]){P[d]=a;E[d]=... |
s860834931 | p00362 | C++ | #include<bits/stdc++.h>
#define U [100005]={}
typedef long long L;using namespace std;map<L,L> path U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c,p,r;char s U;
L D(L a){Z[a]=1;
for(map<L,L>::iterator I=path[a].begin();I!=path[a].end();L d=I->first,I++){
;if(d-P[a]){P[d]=a;E[d]=E[a]+1;C[d]=I->second;D(d);Z[a]+=Z[d];... | a.cc: In function 'L D(L)':
a.cc:5:61: error: expected primary-expression before 'd'
5 | for(map<L,L>::iterator I=path[a].begin();I!=path[a].end();L d=I->first,I++){
| ^
a.cc:5:60: error: expected ')' before 'd'
5 | for(map<L,L>::iterator I=path[... |
s442806243 | p00362 | C++ | #include<bits/stdc++.h>
#define U [100005]={}
typedef long long L;using namespace std;map<L,L> path U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c,p,r;char s U;
L D(L a){Z[a]=1;
for(map<L,L>::iterator I=path[a].begin(),L d;I!=path[a].end();I++){
d=I->first;if(d-P[a]){P[d]=a;E[d]=E[a]+1;C[d]=I->second;D(d);Z[a]+=Z[d]... | a.cc: In function 'L D(L)':
a.cc:5:43: error: expected ';' before 'd'
5 | for(map<L,L>::iterator I=path[a].begin(),L d;I!=path[a].end();I++){
| ^~
| ;
a.cc:5:44: error: 'd' was not declared in this scope
5 | for(map<... |
s577130035 | p00362 | C++ | #include<bits/stdc++.h>
#define U [1<<17]={}
#define G(a)((c=A[a]+A[P[a]]+C[a])%k?c:0)
typedef long long L;using namespace std;
map<L,L>T U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;
L D(L a){L d;Z[a]=1;for(map<L,L>::iterator I=T[a].begin();I!=T[a].end();I++)
d=I->first,d-P[a]?P[d]=a,E[d]=E[a]+1,C[d]=I-... | a.cc: In function 'L D(L)':
a.cc:7:95: error: lvalue required as left operand of assignment
7 | d=I->first,d-P[a]?P[d]=a,E[d]=E[a]+1,C[d]=I->second,D(d),Z[a]+=Z[d],!H[a]|Z[H[a]]<Z[d]&&H[a]=d:0;}
| ~~~~~~~~~~~~~~~~~~^~~~~~
a.cc... |
s592863098 | p00362 | C++ | #include<bits/stdc++.h>
#define U [1<<17]={}
#define G(a)((c=A[a]+A[P[a]]+C[a])%k?c:0)
typedef long long L;using namespace std;ap<L,L>T U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U; D(L a){L d;Z[a]=1;for(map<L,L>::iterator I=T[a].begin();I!=T[a].end();I++)d=I->first,d-P[a]?P[d]=a,E[d]=E[a]+1,C[d]=I->secon... | a.cc:4:41: error: 'ap' does not name a type
4 | typedef long long L;using namespace std;ap<L,L>T U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U; D(L a){L d;Z[a]=1;for(map<L,L>::iterator I=T[a].begin();I!=T[a].end();I++)d=I->first,d-P[a]?P[d]=a,E[d]=E[a]+1,C[d]=I->second,D(d),Z[a]+=Z[d],!H[a]|Z[H[a]]<Z[d... |
s851682370 | p00362 | C++ | #include<bits/stdc++.h>
#define U [1<<17]={}
#define G(a)((c=A[a]+A[P[a]]+C[a])%k?c:0)
#define F(x,z)L x(L f){return z;}L y(L
typedef long long L;using namespace std;
map<L,L>T U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;
F(M,f?B[f]+M(f^f&-f):0,D)
a){L d;Z[a]=1;for(map<L,L>::iterator I=T[a].begin();I!=T[... | a.cc:7:25: error: macro "F" passed 3 arguments, but takes just 2
7 | F(M,f?B[f]+M(f^f&-f):0,D)
| ^
a.cc:4:9: note: macro "F" defined here
4 | #define F(x,z)L x(L f){return z;}L y(L
| ^
a.cc:10:100: error: macro "F" passed 3 arguments, but takes just 2
10 | F(K,(a=X... |
s499930950 | p00362 | C++ | #include<bits/stdc++.h>
#define U [1<<17]={}
#define G(a)((c=A[a]+A[P[a]]+C[a])%k?c:0)
typedef long long L;using namespace std;
map<L,L>T U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;
L D(L a){L d;Z[a]=1;for(map<L,L>::iterator I=T[a].begin();I!=T[a].end();I++)
d=I->first,d-P[a]?P[d]=a,E[d]=E[a]+1,C[d]=I-... | a.cc: In function 'L D(L)':
a.cc:7:107: warning: no return statement in function returning non-void [-Wreturn-type]
7 | d=I->first,d-P[a]?P[d]=a,E[d]=E[a]+1,C[d]=I->second,D(d),Z[a]+=Z[d],!H[a]|Z[H[a]]<Z[d]?H[a]=d:0:0;}
| ... |
s018331654 | p00362 | C++ | #include<bits/stdc++.h>
#define U [1<<17]={}
#define G((c=A[a]+A[P[a]]+C[a])%k?c:0)
typedef long long L;using namespace std;
map<L,L>T U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;
L D(L a){L d;Z[a]=1;for(map<L,L>::iterator I=T[a].begin();I!=T[a].end();I++)
d=I->first,d-P[a]?P[d]=a,E[d]=E[a]+1,C[d]=I->se... | a.cc:3:11: error: expected parameter name, found "("
3 | #define G((c=A[a]+A[P[a]]+C[a])%k?c:0)
| ^
a.cc: In function 'L D(L)':
a.cc:7:107: warning: no return statement in function returning non-void [-Wreturn-type]
7 | d=I->first,d-P[a]?P[d]=a,E[d]=E[a]+1,C[d]=I->second,D(d),Z[a]+=Z[d],... |
s949363641 | p00362 | C++ | #include<bits/stdc++.h>
#define U [7<<15]={}
#define G )+((c=A[a]+A[P[a]]+C[a])%k?c:0)-M(
typedef long long L;using namespace std;map<L,L>T U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;L M(L f){return f?B[f]+M(f^f&-f):0;}L S(L f,L i){for(f=M(i++G i);i<2e5;i+=i&-i)B[i]+=f;}L D(L f){L d;Z[f]=1;for(map<L,L>:... | a.cc: In function 'L S(L, L)':
a.cc:4:197: warning: no return statement in function returning non-void [-Wreturn-type]
4 | typedef long long L;using namespace std;map<L,L>T U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;L M(L f){return f?B[f]+M(f^f&-f):0;}L S(L f,L i){for(f=M(i++G i);i<2e5;i+=i&-i)B[i]+... |
s949901386 | p00362 | C++ | #include<bits/stdc++.h>
#define U [7<<15]={}
#define G )+((c=A[a]+A[P[a]]+C[a])%k?c:0)-M(
typedef long long L;using namespace std;map<L,L>T U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;L M(L f){return f?B[f]+M(f^f&-f):0;}L S(L a,L i){for(a=M(i++G i);i<2e5;i+=i&-i)B[i]+=a;}L D(L f){L d;for(map<L,L>::iterat... | a.cc: In function 'L S(L, L)':
a.cc:4:197: warning: no return statement in function returning non-void [-Wreturn-type]
4 | typedef long long L;using namespace std;map<L,L>T U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;L M(L f){return f?B[f]+M(f^f&-f):0;}L S(L a,L i){for(a=M(i++G i);i<2e5;i+=i&-i)B[i]+... |
s639250939 | p00362 | C++ | #include<bits/stdc++.h>
#define U [7<<15]={}
#define G )+((c=A[a]+A[P[a]]+C[a])%k?c:0)-M(
typedef long long L;using namespace std;map<L,L>T U;L P U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;
L M(L f){return f?B[f]+M(f^f&-f):0;}
L S(L a,L i){for(a=M(i++G i);i<2e5;i+=i&-i)B[i]+=a;}
L D(L f){for(map<L,L>::iterator I=... | a.cc: In function 'L S(L, L)':
a.cc:6:52: warning: no return statement in function returning non-void [-Wreturn-type]
6 | L S(L a,L i){for(a=M(i++G i);i<2e5;i+=i&-i)B[i]+=a;}
| ^
a.cc: In function 'L D(L)':
a.cc:8:19: error: expected initializer before '-' to... |
s811414866 | p00362 | C++ | #include<bits/stdc++.h>
using namespace std;
using Int = long long;
struct HLDecomposition {
Int n,pos;
struct edge{
Int to,cost;
edge(){}
edge(Int to,Int cost):to(to),cost(cost){}
};
vector<vector<edge> > G;
vector<Int> vid, head, sub, hvy, par, dep, inv, type;
HLDecomposition(){}
HLDecom... | a.cc: In member function 'void HLDecomposition::dfs(Int)':
a.cc:42:23: error: cannot bind non-const lvalue reference of type 'Int&' {aka 'long long int&'} to a value of type 'int'
42 | Int &i=st.top().second;
| ~~~~~~~~~^~~~~~
|
s226238624 | p00362 | C++ | #include<bits/stdc++.h>#define U [7<<15]={}#define G )+((c=A[a]+A[P[a]]+C[a])%k?c:0)-M(typedef long long L;using namespace std;map<L,L>T U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;L M(L f){return f?B[f]+M(f^f&-f):0;}L S(L a,L i){for(a=M(i++G i);i<2e5;i+=i&-i)B[i]+=a;}L D(L f){L d;for(map<L,L>::iterator ... | a.cc:1:24: warning: extra tokens at end of #include directive
1 | #include<bits/stdc++.h>#define U [7<<15]={}#define G )+((c=A[a]+A[P[a]]+C[a])%k?c:0)-M(typedef long long L;using namespace std;map<L,L>T U;L P U,E U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;L M(L f){return f?B[f]+M(f^f&-f):0;}L S(L a,L i){for(a... |
s946004589 | p00362 | C++ | #include<bits/stdc++.h>
#define U [7<<15]={}
#define G ((c=A[a]+A[P[a]]+C[a])%k?c:0)+M(
typedef long long L;using namespace std;map<L,L>T U;L P U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;L M(L f{return f?B[f]+M(f^f&-f):0;}L S(L i){for(c=G i++)-M(i);i<2e5;i+=i&-i)B[i]+=c;}L D(L f){L d;for(map<L,L>::iterator I=T[f]... | a.cc:4:113: error: expected ')' before '{' token
4 | typedef long long L;using namespace std;map<L,L>T U;L P U,Z U,H U,C U,A U,O U,X U,B U,k,n,a,b,c;char s U;L M(L f{return f?B[f]+M(f^f&-f):0;}L S(L i){for(c=G i++)-M(i);i<2e5;i+=i&-i)B[i]+=c;}L D(L f){L d;for(map<L,L>::iterator I=T[f].begin();I!=T[f].end();I++)d=I-... |
s864171813 | p00362 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define dbg(...) do{cerr<<__LINE__<<": ";dbgprint(#__VA_ARGS__, __VA_ARGS__);}while(0);
using namespace std;
namespace std{template<class S,class T>struct hash<pair<S,T>>{size_t operator()(cons... | a.cc: In function 'll calc(int, int)':
a.cc:74:48: error: 'p1rev' was not declared in this scope; did you mean 'prev'?
74 | rep(j, MX_L) if(diff >> j & 1) p1rev = parent[j][prev];
| ^~~~~
| prev
|
s940111934 | p00362 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define dbg(...) do{cerr<<__LINE__<<": ";dbgprint(#__VA_ARGS__, __VA_ARGS__);}while(0);
using namespace std;
namespace std{template<class S,class T>struct hash<pair<S,T>>{size_t operator()(cons... | a.cc: In function 'll calc(int, int)':
a.cc:74:48: error: 'p1rev' was not declared in this scope; did you mean 'prev'?
74 | rep(j, MX_L) if(diff >> j & 1) p1rev = parent[j][prev];
| ^~~~~
| prev
|
s177940765 | p00362 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define dbg(...) do{cerr<<__LINE__<<": ";dbgprint(#__VA_ARGS__, __VA_ARGS__);}while(0);
using namespace std;
namespace std{template<class S,class T>struct hash<pair<S,T>>{size_t operator()(cons... | a.cc: In function 'll calc(int, int)':
a.cc:74:48: error: 'p1rev' was not declared in this scope; did you mean 'prev'?
74 | rep(j, MX_L) if(diff >> j & 1) p1rev = parent[j][prev];
| ^~~~~
| prev
|
s015566018 | p00362 | C++ | #include<bits/stdc++.h>
using namespace std;
using int64 = long long;
const int INF = 1 << 30;
struct edge
{
int to;
int64 cost;
pair< int, int > to_adjust, curr_adjust;
};
int N, K, Q;
char S[500][10];
int A[500], B[500];
vector< vector< edge > > g;
int64 weight[100000];
struct TreeContraction
{
vector< ... | a.cc: In member function 'void TreeContraction::contract(std::vector<std::vector<edge> >&)':
a.cc:71:5: error: 'inline' specifier invalid for variable 'contraction' declared at block scope
71 | inline function< edge(int, int) > contraction = [&](int idx, int par)
| ^~~~~~
|
s788616259 | p00363 | Java | import java.util.Scanner;
/**
* Flag
*/
public class P0368 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int W, H;
char c;
W = sc.nextInt();
H = sc.nextInt();
c = sc.next().charAt(0);
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if ((i == 0 ... | Main.java:6: error: class P0368 is public, should be declared in a file named P0368.java
public class P0368 {
^
1 error
|
s747563658 | p00363 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n, q,b,c,d,e;
int a[1001] = { };
while(1){
cin >> n >> q;
if(n==0 && q==0)break;
for(int i=0;i<1001;i++){
a[i] = 0;
}
for(int j=0;j<n;j++){
cin >> c;
for(int i=0;i<c;i++){
cin >> d;
a[d]++;
... | a.cc:46:1: error: expected declaration before '}' token
46 | }
| ^
|
s869898601 | p00366 | C++ | #include <stdio.h>
#include <set>
#include <algorithm>
using namespace std;
const int N=1e5+10;
int main(){
int n,a[N];
long long int ans=0;
set<int> s;
scanf("%d",&n);
for(int i=0;i<n;i++)scanf("%d",&a[i]);
sort(a,a+n);
for(int i=1;i<=a[n-1];i++)if(a[n-1]%i==0)s.insert(i);
for(int i=0;i... | a.cc: In function 'int main()':
a.cc:14:49: error: no match for 'operator-' (operand types are 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} and 'int')
14 | for(int i=0;i<n;i++)ans+=s.lower_bound(a[i])-a[i];
| ... |
s263196071 | p00367 | C++ | 5
1 0 2 0 3 30 4 30 6 0 7 0
2 30 3 0 4 0 5 0 5 30 6 30
1 30 2 30 4 30 5 0 6 30 7 0
2 30 3 0 5 0 6 0 6 30 7 0
1 0 2 0 3 0 3 30 4 0 5 0
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 5
| ^
|
s818154866 | p00370 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define FOR(i, a, b) for(int i=a;i<b;i++)
#define REP(i, n) FOR(i, 0, n)
#define LAR(a, b) ((a)=max((a),(b)))
#define SML(a, b) ((a)=min((a),(b)))
typedef vector<int> vi;
#define PB push_back
#define MP make_pair
ld dst(ld x1, l... | a.cc: In function 'int main()':
a.cc:5:35: error: no match for 'operator<' (operand types are 'int' and 'std::vector<edge>')
5 | #define FOR(i, a, b) for(int i=a;i<b;i++)
| ^
a.cc:6:19: note: in expansion of macro 'FOR'
6 | #define REP(i, n) FOR(i, 0, n)
| ... |
s627840304 | p00372 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define FOR(i, a, b) for(int i=a;i<b;i++)
#define REP(i, n) FOR(i, 0, n)
#define LAR(a, b) ((a)=max((a),(b)))
#define SML(a, b) ((a)=min((a),(b)))
typedef vector<int> vi;
#define PB push_back
#define MP make_pair
#define YES() pr... | a.cc: In function 'int main()':
a.cc:85:16: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
85 | printf(6);
| ^
| |
| int
In file included from /usr/include/c++/14/cstdio:42,
from /usr/include/c++/14/ext/stri... |
s942634799 | p00372 | C++ | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (ll)1e18
#define INF (int)1e9
#define REP(i, n) for(int i = 0;i < (n);i++)
#define FOR(i, a, b) for(int i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second
using ll = long long;
using PII = pair<int, int>;
using PLL = pai... | a.cc: In function 'int main()':
a.cc:198:26: error: no match for 'operator==' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'} and 'int')
198 | if(dp[i] == 0)
In file included from /usr/include/c++/14/regex:68,
... |
s313028929 | p00374 | C++ | d
| a.cc:1:1: error: 'd' does not name a type
1 | d
| ^
|
s945769916 | p00374 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define dbg(...) do{cerr<<__LINE__<<": ";dbgprint(#__VA_ARGS__, __VA_ARGS__);}while(0);
using namespace std;
namespace std{template<class S,class T>struct hash<pair<S,T>>{size_t operator()(cons... | a.cc: In function 'int main()':
a.cc:75:36: error: 'a' was not declared in this scope
75 | if(a > 8 || c > 4) continue;
| ^
a.cc:75:45: error: 'c' was not declared in this scope
75 | if(a > 8 || c > 4) continu... |
s415005338 | p00374 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define dbg(...) do{cerr<<__LINE__<<": ";dbgprint(#__VA_ARGS__, __VA_ARGS__);}while(0);
using namespace std;
namespace std{template<class S,class T>struct hash<pair<S,T>>{size_t operator()(cons... | a.cc: In function 'int main()':
a.cc:59:26: error: 'l' was not declared in this scope
59 | sort(all(l));
| ^
a.cc:3:17: note: in definition of macro 'all'
3 | #define all(c) (c).begin(),(c).end()
| ^
a.cc:61:54: error: continue statement not wi... |
s418938304 | p00375 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) {
SC sc=new SC(System.in);
int a=sc.nextInt();
pl((a-30)/2)
... | Main.java:12: error: ';' expected
pl((a-30)/2)
^
1 error
|
s726092356 | p00375 | C++ | // Celcius and Fahrenheit 2018/12/28
#include <iostream>
using namespace std;
int main() {
int F, C;
cin >> F;
cout << (F - 30) / 2 << '\n';
return 0;
}
~
| a.cc:13:2: error: expected class-name at end of input
13 | ~
| ^
|
s326849729 | p00375 | C++ | #include <stdio.h>
#include <iostream>
#include <string>
using namespace std;
int main(){
int F;
cin >> F;
cout << (F - 30) / 2
}
| a.cc: In function 'int main()':
a.cc:10:29: error: expected ';' before '}' token
10 | cout << (F - 30) / 2
| ^
| ;
11 | }
| ~
|
s517935824 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int a , b , c ;
cin >> a >> b ;
c = a – b ;
if (c < 0 ) cout << c * -1 <<endl ;
cout << c << endl ;
return 0;
}
| a.cc:7:15: error: extended character – is not valid in an identifier
7 | c = a – b ;
| ^
a.cc: In function 'int main()':
a.cc:7:14: error: expected ';' before '\U00002013'
7 | c = a – b ;
| ^~
| ;
|
s427284857 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int a , b , c ;
cin >> a >> b ;
c = a – b ;
if (c < 0 ) cout << c * -1 <<endl ;
cout << c << endl ;
return 0;
}
| a.cc:7:7: error: extended character – is not valid in an identifier
7 | c = a – b ;
| ^
a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before '\U00002013'
7 | c = a – b ;
| ^~
| ;
|
s222791156 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int a , b , c ;
cin >> a >> b ;
c = a – b ;
if (c < 0 ) cout << c * -1 <<endl ;
cout << c << endl ;
return 0;
}
| a.cc:7:7: error: extended character – is not valid in an identifier
7 | c = a – b ;
| ^
a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before '\U00002013'
7 | c = a – b ;
| ^~
| ;
|
s716595053 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int a , b , c ;
cin >> a >> b ;
c = a – b ;
if (c < 0 ) cout << c * -1 <<endl ;
cout << c << endl ;
return 0;
}
| a.cc:7:7: error: extended character – is not valid in an identifier
7 | c = a – b ;
| ^
a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before '\U00002013'
7 | c = a – b ;
| ^~
| ;
|
s649886919 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int x1 , x2 ;
cin >> x1 >> x2 ;
if (a < b ) cout << b - a <<endl ;
cout << a - b << endl ;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:13: error: 'a' was not declared in this scope
7 | if (a < b ) cout << b - a <<endl ;
| ^
a.cc:7:17: error: 'b' was not declared in this scope
7 | if (a < b ) cout << b - a <<endl ;
| ^
a.cc:8:17: error: 'a' was not de... |
s333699780 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int x1 , x2 ;
cin >> x1 >> x2 ;
if (x1 < x2 ) cout << x2 – x1 <<endl ;
cout << x1 – x2 << endl ;
return 0;
}
| a.cc:7:34: error: extended character – is not valid in an identifier
7 | if (x1 < x2 ) cout << x2 – x1 <<endl ;
| ^
a.cc:8:20: error: extended character – is not valid in an identifier
8 | cout << x1 – x2 << endl ;
| ^
a.cc: In func... |
s080813775 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int x1 , x2 ;
cin >> x1 >> x2 ;
if (x1 < x2 ) cout << x2 – x1 <<endl ;
cout << x1 – x2 << endl ;
return 0;
}
| a.cc:8:34: error: extended character – is not valid in an identifier
8 | if (x1 < x2 ) cout << x2 – x1 <<endl ;
| ^
a.cc:9:20: error: extended character – is not valid in an identifier
9 | cout << x1 – x2 << endl ;
| ^
a.cc: In func... |
s294434228 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int x1 , x2 ;
cin >> x1 >> x2 ;
if (x1 < x2 ) cout << x2 – x1 <<endl ;
cout << x1 – x2 << endl ;
return 0;
}
| a.cc:8:34: error: extended character – is not valid in an identifier
8 | if (x1 < x2 ) cout << x2 – x1 <<endl ;
| ^
a.cc:9:20: error: extended character – is not valid in an identifier
9 | cout << x1 – x2 << endl ;
| ^
a.cc: In func... |
s395733311 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int x1 , x2 ;
cin >> x1 >> x2 ;
if ( x1 < x2 ) cout << x2 – x1 <<endl ;
else
cout << x1 – x2 << endl ;
return 0;
}
| a.cc:8:27: error: extended character – is not valid in an identifier
8 | if ( x1 < x2 ) cout << x2 – x1 <<endl ;
| ^
a.cc:10:12: error: extended character – is not valid in an identifier
10 | cout << x1 – x2 << endl ;
| ^
a.cc: In function 'int main()':
a.cc:8:26:... |
s112165886 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int x1 , x2 ;
cin >> x1 >> x2 ;
if ( x1 < x2 ) cout << x2 – x1 <<endl ;
else
cout << x1 – x2 << endl ;
return 0;
}
| a.cc:8:27: error: extended character – is not valid in an identifier
8 | if ( x1 < x2 ) cout << x2 – x1 <<endl ;
| ^
a.cc:10:12: error: extended character – is not valid in an identifier
10 | cout << x1 – x2 << endl ;
| ^
a.cc: In function 'int main()':
a.cc:8:26:... |
s616931755 | p00376 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s508694772 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int x1,x2;
cin>>x1>>x2;
if (x1>x2) cost<<x2-x1<<endl;
elsecost<<x1-x2<<endl;
}
| a.cc: In function 'int main()':
a.cc:6:12: error: 'cost' was not declared in this scope; did you mean 'const'?
6 | if (x1>x2) cost<<x2-x1<<endl;
| ^~~~
| const
a.cc:7:1: error: 'elsecost' was not declared in this scope
7 | elsecost<<x1-x2<<endl;
| ^~~~~~~~
|
s360653965 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int x,y;
cin>>a>>b;
if a > b;
cout<<(a-b)<<;
else cout<<(b-a)<< endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:6: error: 'a' was not declared in this scope
6 | cin>>a>>b;
| ^
a.cc:6:9: error: 'b' was not declared in this scope
6 | cin>>a>>b;
| ^
a.cc:7:4: error: expected '(' before 'a'
7 | if a > b;
| ^
| (
a.cc:8:14: error: expected p... |
s359764042 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int x,y;
cin>>a>>b;
if(a > b) cout<<(a-b)<<endl;
else
cout<<(b-a)<< endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:6: error: 'a' was not declared in this scope
6 | cin>>a>>b;
| ^
a.cc:6:9: error: 'b' was not declared in this scope
6 | cin>>a>>b;
| ^
|
s189324786 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int x,y;
cin>>a>>b;
if(a>b) cout<<(a-b)<<endl;
else
cout<<(b-a)<< endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:6: error: 'a' was not declared in this scope
6 | cin>>a>>b;
| ^
a.cc:6:9: error: 'b' was not declared in this scope
6 | cin>>a>>b;
| ^
|
s633778121 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int x,y;
cin>>a>>b;
if(a>b) cout<<(a-b)<<endl;
else
cout<<(b-a)<< endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:6: error: 'a' was not declared in this scope
6 | cin>>a>>b;
| ^
a.cc:6:9: error: 'b' was not declared in this scope
6 | cin>>a>>b;
| ^
|
s050208873 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int x,y;
cin> x>>y;
if(x>y) cout<<(x-y)<<endl;
else
cout<<(x-b)<< endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:4: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
6 | cin> x>>y;
| ~~~^ ~~~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:6:4: note: candidate: 'operator>(int, in... |
s145911340 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int x,y;
cin> x>>y;
if(x>y) cout<<(x-y)<<endl;
else
cout<<(x-y)<< endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:4: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
6 | cin> x>>y;
| ~~~^ ~~~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:6:4: note: candidate: 'operator>(int, in... |
s073311888 | p00376 | C++ | #include <iostream>
using namespace std;
int main(){
int x,y;
cin> x>>y;
if(x>y) cout<<(x-y)<<endl;
else
cout<<(y-x)<< endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:4: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
6 | cin> x>>y;
| ~~~^ ~~~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:6:4: note: candidate: 'operator>(int, in... |
s787694977 | p00377 | C++ | #include<iostream>
using namespace std;
int main(){
int N,C,p[200];
cin>>N>>C;
inbt sum=0;
for(int i=0;i<C;i++){
cin>>p[i];
sum+=p[i];
}
cout<<sum/(N+1)+(sum%(N;1)!=0)<<endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:5: error: 'inbt' was not declared in this scope; did you mean 'int'?
7 | inbt sum=0;
| ^~~~
| int
a.cc:10:9: error: 'sum' was not declared in this scope
10 | sum+=p[i];
| ^~~
a.cc:13:11: error: 'sum' was not declared in this sco... |
s500834432 | p00378 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int main (){
int a,b,x,az,bz,abh;
cin>>a>>b>>x;
//////////////////az//////////////////
if (x<a){
az=a;
}
else {
az=x/1000*a;
if (x%1000!=0){
az+=a;
}
}
//////////////////bz//////////////////
if (x<b){
bz=b;
}
else {
bz=x/500*b;
if... | a.cc: In function 'int main()':
a.cc:34:10: error: expected '}' at end of input
34 | }
| ^
a.cc:5:12: note: to match this '{'
5 | int main (){
| ^
|
s213063943 | p00378 | C++ | include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int main (){
int a,b,x,az,bz,abh=0;
cin>>a>>b>>x;
//////////////////az//////////////////
if (x<a){
az=a;
}
else {
az=x/1000*a;
if (x%1000!=0){
az+=a;
}
}
//////////////////bz//////////////////
... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from a.cc:3:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __... |
s037052215 | p00379 | C++ | #include<iostream>
#include<cmath>
using namespace std;
int main(){
int a, n, m;
int ans = 0;
cin >> a >> n >> m;
int kai = powl(a,n)+1;
for( kai; kai <= m; kai++) {
int sum = 0;
while(kai>0){
sum = kai % 10;
kai /10;
if(kai - powl(a,n) == sum * (sum + 2*a)) ans++;
}
cout << ans << endl;
... | a.cc: In function 'int main()':
a.cc:28:2: error: expected '}' at end of input
28 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s353658121 | p00380 | C++ | #include<bits/c++std.h>
using namespace std;
int main(void)
{
int a[300001],A[300001];
int n,q;
int x,y;
int cnt=0;
cin>>n;
for(int i=0;i<n;i++){
cin>>a[i];
A[i]=a[i];
}
sort(a,a+n);
for(int i=0;i<n;i++){
if(a[i]==A[i]){
cnt++;
}
}
if(cnt==n){
cout<<0<<endl;
return 0;
}
cin>>q;
for(int i=... | a.cc:1:9: fatal error: bits/c++std.h: No such file or directory
1 | #include<bits/c++std.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s065969408 | p00382 | C++ | #include<iostream>
#include<set>
#include<algorithm>
//#include<numeric>
using namespace std;
int main(){
int N;
cin >> N;
multiset<int>max;
for(int i=1; i<=N; i++) {
int M;
cin >> M;
for(int j=1; j<=M; j++) {
int c;
cin >> c;
max.insert(c);
if(max.size() > i) max.erase(max.... | a.cc: In function 'int main()':
a.cc:23:30: error: no match for 'operator<' (operand types are 'std::_Rb_tree_const_iterator<int>' and 'std::multiset<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'})
23 | for(auto it=max.begin(); it<max.end(... |
s035690213 | p00385 | C | #include <stdio.h>
typedef struct {
long long rotate;
int flip;
} Query;
long long k, n, q;
tree[(1 << 20) * 2 + 5];
void init(void)
{
long long _n = n;
long long i;
while (_n < n) {
_n *= 2;
}
n = 2;
for (long long i = 0; i <= n * 2; i++) {
tree[i] = (Query)... | main.c:10:1: warning: data definition has no type or storage class
10 | tree[(1 << 20) * 2 + 5];
| ^~~~
main.c:10:1: error: type defaults to 'int' in declaration of 'tree' [-Wimplicit-int]
main.c: In function 'init':
main.c:22:19: error: incompatible types when assigning to type 'int' from type 'Query'
22 |... |
s422890993 | p00385 | C | #include <stdio.h>
typedef struct {
long long rotate;
int flip;
} Query;
long long k, n, q;
Query tree[(1 << 20) * 2 + 5];
void init(void)
{
long long _n = n;
long long i;
while (_n < n) {
_n *= 2;
}
n = 2;
for (long long i = 0; i <= n * 2; i++) {
tree[i] = (... | main.c: In function 'merge':
main.c:36:12: error: expected expression before 'Query'
36 | return Query;
| ^~~~~
main.c: In function 'main':
main.c:79:9: error: unknown type name 'Qeury'; did you mean 'Query'?
79 | Qeury right = tree[r + (n - 1)];
| ^~~~~
| ... |
s066993044 | p00385 | C | #include <stdio.h>
typedef struct {
long long rotate;
int flip;
} Query;
long long k, n, q;
Query tree[(1 << 20) * 2 + 5];
void init(void)
{
long long _n = n;
long long i;
while (_n < n) {
_n *= 2;
}
n = 2;
for (long long i = 0; i <= n * 2; i++) {
tree[i] = (... | main.c: In function 'main':
main.c:79:9: error: unknown type name 'Qeury'; did you mean 'Query'?
79 | Qeury right = tree[r + (n - 1)];
| ^~~~~
| Query
main.c:79:23: error: incompatible types when initializing type 'int' using type 'Query'
79 | Qeury right = tree[r + (n ... |
s384444299 | p00387 | Java | public class Main{
public static void main(String[] args){
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder createString = new StringBuilder();
String line = br.readLine();
String[] numbers = line.split(" ");
int A = Integer.valueOf... | Main.java:5: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:5: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
... |
s906605306 | p00387 | Java | import java.io.*;
public class Main{
public static void main(String[] args){
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringBuilder createString = new StringBuilder();
String line = br.readLine();
String[] numbers = line.split(" ");
int A... | Main.java:8: error: unreported exception IOException; must be caught or declared to be thrown
String line = br.readLine();
^
1 error
|
s167271719 | p00388 | C++ | #include<cassert>
using namespace std;
int main() {
int H, A, B; cin >> H >> A >> B;
int cnt = 0;
for ( int i = A; i <= B; i++ ){
cnt += (H % i == 0 );
}
cout << cnt << endl;
}
| a.cc: In function 'int main()':
a.cc:5:16: error: 'cin' was not declared in this scope
5 | int H, A, B; cin >> H >> A >> B;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<cassert>
+++ |+#include <... |
s608731236 | p00390 | C++ | #include <bits/stdc++.h>
using namespace std;
bool fin;
int main(){
int n,ans;
cin>>n;
vector<pair<int,int> >v(n);
for(int i=0;i<n;++i){cin>>v[i].first;}
for(int i=0;i<n;++i){cin>>v[i].second;}
sort(v.begin(),v.end());
if(v[0].first==1){
cout<<0<<endl;
return 0;
}
ans=v[0].second;
for(int... | a.cc: In function 'int main()':
a.cc:24:6: error: 'fi' was not declared in this scope; did you mean 'fin'?
24 | if(fi){cout<<ans<<endl;}
| ^~
| fin
|
s280957622 | p00423 | Java | public class CardSum {
public static void main(String[] args) {
// 自分の得意な言語で
// Let's チャレンジ!!
Scanner sc = new Scanner(System.in);
while(true) {
// 配られるカードの枚数取得
int loopCnt = Integer.parseInt(sc.nextLine());
if(loopCnt==0)break;
// プレイ... | Main.java:1: error: class CardSum is public, should be declared in a file named CardSum.java
public class CardSum {
^
Main.java:6: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class CardSum
Main.java:6: error: cannot find symbol
Sc... |
s111669497 | p00423 | Java | package sample;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class CardSum {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true) {
// 配られるカードの枚数取得
int loopCnt = Integer.par... | Main.java:8: error: class CardSum is public, should be declared in a file named CardSum.java
public class CardSum {
^
1 error
|
s115615396 | p00423 | Java | package sample;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class CardSum {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true) {
// 配られるカードの枚数取得
int loopCnt = Integer.par... | Main.java:8: error: class CardSum is public, should be declared in a file named CardSum.java
public class CardSum {
^
1 error
|
s574474495 | p00423 | Java | public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true) {
// 配られるカードの枚数取得
int loopCnt = Integer.parseInt(sc.nextLine());
if(loopCnt==0)break;
// プレイヤーAの得点
int sumA=0;
// プレイヤーBの得点
in... | 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
|
s462197815 | p00423 | Java | import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class CardSum {
public static void main(String[] args) {
// 自分の得意な言語で
// Let's チャレンジ!!
Scanner sc = new Scanner(System.in);
while(true) {
// 配られるカードの枚数取得
... | Main.java:6: error: class CardSum is public, should be declared in a file named CardSum.java
public class CardSum {
^
1 error
|
s843406858 | p00423 | Java | import java.util.ArrayList;
import java.util.Scanner;
public class q0500 {
public static void main (String[] args){
Scanner s = new Scanner(System.in);
ArrayList<Integer> a = new ArrayList<>();
ArrayList<Integer> b = new ArrayList<>();
int n = s.nextInt();
while(n != 0){
int x[] = new int[n];
in... | Main.java:4: error: class q0500 is public, should be declared in a file named q0500.java
public class q0500 {
^
1 error
|
s306491492 | p00423 | Java | import java.util.ArrayList;
import java.util.Scanner;
public class q0500 {
public static void main (String[] args){
Scanner s = new Scanner(System.in);
ArrayList<Integer> a = new ArrayList<Integer>();
ArrayList<Integer> b = new ArrayList<Integer>();
int n = s.nextInt();
while(n != 0){
int x[] = new... | Main.java:4: error: class q0500 is public, should be declared in a file named q0500.java
public class q0500 {
^
1 error
|
s018369758 | p00423 | Java | /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main (String[] args) throws java.lang.Exception
{
int n = System.in.read();
int as = 0;
int bs... | Main.java:17: error: incompatible types: int cannot be converted to String
String tmp = System.in.read();
^
1 error
|
s225037988 | p00423 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.InputMismatchException;
... | Main.java:13: error: ';' expected
import java.util.PriorityQueue???
^
1 error
|
s626875907 | p00423 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.InputMismatchException;
... | Main.java:26: error: cannot find symbol
while(sc.hasNextInt()){
^
symbol: variable sc
location: class Main
1 error
|
s481866636 | p00423 | Java | package aizuonlinejava;
public class Practice {
void practice(int n){
int a = 0,b = 0,aa,bb,i;
if(n != 0){
return;
}
for(i = 0; i < n; i++){
if( a > b){
aa = a + b;
}
else if (a < b){
bb = a + b;
}
else{
aa = a;
bb = b;
}
}
}
} | Main.java:3: error: class Practice is public, should be declared in a file named Practice.java
public class Practice {
^
1 error
|
s906552322 | p00423 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:36: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) throws Exception{
^
(use --enable-preview to enable unnamed classes)
1 error
|
s093627086 | p00423 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:36: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) throws Exception{
^
(use --enable-preview to enable unnamed classes)
Main.java:90: error: class, interface, enum, or record expected
}
^
2 errors
|
s852779165 | p00423 | Java | public class Main{
public static void main(String[] args) throws Exception{
BufferedReader bf =new BufferedReader( new InputStreamReader(System.in));
int n = Integer.parseInt(bf.readLine());
System.out.println(n);
while(n != 0) {
Score s = new Score();
for (i... | Main.java:4: error: cannot find symbol
BufferedReader bf =new BufferedReader( new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:4: error: cannot find symbol
BufferedReader bf =new BufferedReader( new InputStreamReader(System.in));
... |
s749721548 | p00423 | Java | class Main{
static Scanner s = new Scanner(System.in);
public static void main(String[] args){
int sca=0,scb=0,a,b,x;
while((x=Integer.parseInt(s.next()))!=0) {
sca=0;scb=0;a=0;b=0;
for(int i=x;i>0;--i) {
a=Integer.parseInt(s.next());
b=Integer.parseInt(s.next());
if(a>b) {
sca+=a+b;
}e... | Main.java:2: error: cannot find symbol
static Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:2: error: cannot find symbol
static Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s087669166 | p00423 | Java | import java.io.*;
public class Main0500{
static int Ap = 0;
static int Bp = 0;
public static void main(String[] args){
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try{
while(true){
int a = Integer.parseInt(br.r... | Main.java:3: error: class Main0500 is public, should be declared in a file named Main0500.java
public class Main0500{
^
1 error
|
s665448333 | p00423 | Java | import java.io.*;
public class main{
public static void main(String[] args){
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
try{
while(true){
int n = Integer.parseInt(bf.readLine());
if(n == 0){
break;
... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main{
^
1 error
|
s888158862 | p00423 | Java | package jp.co.practice.volume5;
import java.util.Scanner;
public class Question0500 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int times = Integer.parseInt(sc.nextLine());
while (0 < times) {
compare(sc, times);
times = Integer.parseInt(sc.nextLine());
}
}
priva... | Main.java:5: error: class Question0500 is public, should be declared in a file named Question0500.java
public class Question0500 {
^
1 error
|
s004534858 | p00423 | Java | import java.util.Scanner;
public class Question0500 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int times = Integer.parseInt(sc.nextLine());
while (0 < times) {
compare(sc, times);
times = Integer.parseInt(sc.nextLine());
}
}
private static void compare(Scanner sc... | Main.java:3: error: class Question0500 is public, should be declared in a file named Question0500.java
public class Question0500 {
^
1 error
|
s453769538 | p00423 | Java | import java.util.Scanner;
class Main{
public static void main(String[] a){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int ua = 0;
int ub = 0;
for(i=0; i<n; i++) {
int va = sc.nextInt();
int vb = sc.nextInt();
if (va > vb) {
ua += va+vb;
} else if (vb > va) {
ub += va ... | Main.java:10: error: cannot find symbol
for(i=0; i<n; i++) {
^
symbol: variable i
location: class Main
Main.java:10: error: cannot find symbol
for(i=0; i<n; i++) {
^
symbol: variable i
location: class Main
Main.java:10: error: cannot find symbol
for(i=0; i<n; i++) {
^
... |
s826566359 | p00423 | Java | import java.util.Scanner;
class Main{
public static void main(String[] a){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
if (n != 0) {
int ua = 0;
int ub = 0;
for(int i=0; i<n; i++) {
int va = sc.nextInt();
int vb = sc.nextInt();
if (va > vb) {
ua += va+vb;
} else ... | Main.java:24: error: cannot find symbol
System.out.println(ua + " " + ub);
^
symbol: variable ua
location: class Main
Main.java:24: error: cannot find symbol
System.out.println(ua + " " + ub);
^
symbol: variable ub
location: class Main
2 errors
|
s167311533 | p00423 | Java | import java.util.Scanner;
class Main{
public static void main(String[] a){
Scanner sc = new Scanner(System.in);
while(0) {
int n = sc.nextInt();
if(n == 0) {
break;
} else if (n != 0) {
int ua = 0;
int ub = 0;
for(int i=0; i<n; i++) {
int va = sc.nextInt();
int vb = sc.nextI... | Main.java:7: error: incompatible types: int cannot be converted to boolean
while(0) {
^
1 error
|
s549414710 | p00423 | Java | import java.util.Scanner;
class Main{
public static void main(String[] a){
Scanner sc = new Scanner(System.in);
while(0) {
int n = sc.nextInt();
if(n == 0) {
break;
} else if (n != 0) {
int ua = 0;
int ub = 0;
for(int i=0; i<n; i++) {
int va = sc.nextInt();
int vb = sc.nextI... | Main.java:7: error: incompatible types: int cannot be converted to boolean
while(0) {
^
1 error
|
s028004590 | p00423 | Java | public class problem1 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
while(true){
int in = scan.nextInt();
if(in == 0) return;
int aSum = 0;
int bSum = 0;
for(int i = 0; i < in; i++){
int a = s... | Main.java:1: error: class problem1 is public, should be declared in a file named problem1.java
public class problem1 {
^
Main.java:4: error: cannot find symbol
Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location: class problem1
Main.java:4: error: cannot find symbol
Scanner scan =... |
s567158576 | p00423 | Java | public class pro500 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner(System.in);
while (true) {
int cnt = in.nextInt();
if(cnt==0)break;
int i = 0;
int[] str = new int[cnt * 2];
while (i < cnt * 2) {
str[i] = in... | Main.java:1: error: class pro500 is public, should be declared in a file named pro500.java
public class pro500 {
^
Main.java:9: error: cannot find symbol
Scanner in = new Scanner(System.in);
^
symbol: class Scanner
location: class pro500
Main.java:9: error: cannot find symbol
Scanner in = new Scanner... |
s934933925 | p00423 | Java | import java.util.Scanner;
public class pro500 {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner(System.in);
while (true) {
int cnt = in.nextInt();
if(cnt==0)break;
int i = 0;
int[] str = new int[cnt * 2];
while (i <... | Main.java:3: error: class pro500 is public, should be declared in a file named pro500.java
public class pro500 {
^
1 error
|
s430269764 | p00423 | Java | import java.util.Scanner;
public class main {
main(){
Scanner in= new Scanner(System.in);
int a=0,b=0,temp1,temp2;
for(int i=0;i<in.nextInt();i++){
temp1=in.nextInt();
temp2=in.nextInt();
if(temp1>temp2){
a+=temp1+temp2;
}
else if(temp1==temp2){
a+=temp1;b=a+=temp2;
}
else{
b+=t... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s966252956 | p00423 | Java | import java.util.Scanner;
public class main {
public static void main(){
Scanner in= new Scanner(System.in);
int a=0,b=0,temp1,temp2;
for(int i=0;i<in.nextInt();i++){
temp1=in.nextInt();
temp2=in.nextInt();
if(temp1>temp2){
a+=temp1+temp2;
}
else if(temp1==temp2){
a+=temp1;b=a+=temp2;
... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s035647257 | p00423 | Java | public class Main {
public static void main(String[] args){
Scanner in= new Scanner(System.in);
int a=0,b=0,temp1,temp2,j;
j=in.nextInt();
while(j!=0){
for(int i=0;i<in.nextInt();i++){
temp1=in.nextInt();
temp2=in.nextInt();
if(temp1>temp2){
a+=temp1+temp2;
}
else if(temp1==temp2){
a+=... | Main.java:3: error: cannot find symbol
Scanner in= new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner in= new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s269050688 | p00423 | Java | import java.util.ArrayList;
import java.util.Scanner;
import java.util.Stack;
public class Test {
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
int n;
while((n=scanner.nextInt())>0){
int a=0,b=0;
for(int i=0;i<n;i++){
int aa=scanner.nextInt(),bb=scanner.nextInt();
... | Main.java:5: error: class Test is public, should be declared in a file named Test.java
public class Test {
^
1 error
|
s279693728 | p00423 | Java | import java.util.Scanner;
public class Exp {
public static void main(String[] args) {
int size;
int A = 0;
int B = 0;
int i = 0;
Scanner scan = new Scanner(System.in);
while(true){
while(true){
if(scan.hasNext() == true){
size = scan.nextInt();
break;
}
}
int[] arr = new int[siz... | Main.java:3: error: class Exp is public, should be declared in a file named Exp.java
public class Exp {
^
1 error
|
s762832928 | p00423 | Java | import java.util.Scanner;
public class Exp {
public static void main(String[] args) {
int size = 1;
int A = 0;
int B = 0;
int i = 0;
int[] arr;
Scanner scan = new Scanner(System.in);
while(size != 0){
while(true){
if(scan.hasNext() == true){
A = 0;
B = 0;
size = scan.nextInt();
... | Main.java:3: error: class Exp is public, should be declared in a file named Exp.java
public class Exp {
^
1 error
|
s524202486 | p00423 | Java | import java.util.Scanner;
public class Game {
private int a = 0;
private int b = 0;
void play(int _a, int _b) {
if (_a < _b) {
b += _a + _b;
} else if (_a > _b) {
a += _a + _b;
} else {
a += _a;
b += _b;
}
}
void printPoint() {
System.out.println(a + " " + b);
}
}
public class Main {
p... | Main.java:3: error: class Game is public, should be declared in a file named Game.java
public class Game {
^
1 error
|
s036015752 | p00423 | Java | import java.util.ArrayList;
import java.util.Iterator;
import java.util.Scanner;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO ティツ?ェテ・ツ仰陛ァツ板淌ヲツ按静」ツ?陛」ツつ古」ツ?淌」ツδ。テ」ツつステ」ツδε」ツδ嘉」ツδサテ」ツつケテ」ツつソテ」ツδ?
Scanner sc = new Scanner(System.in);
while (sc.hasNextLine() &&... | Main.java:53: error: cannot find symbol
public Winner winner() {
^
symbol: class Winner
location: class Game
Main.java:30: error: cannot find symbol
if (now.winner() == Winner.A)
^
symbol: variable Winner
location: class Main
Main.java:32: error: cannot find symbol
... |
s204241812 | p00423 | Java |
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while( (num = sc.nextInt()) != 0 ){
int aCnt = 0;
int bCnt = 0;
for(int cnt = 0;cnt < num;cnt++){
int a = sc.nextInt();
int b = sc.nextInt();
if( a < b ){
bCnt += a + b;
}else... | Main.java:7: error: cannot find symbol
while( (num = sc.nextInt()) != 0 ){
^
symbol: variable num
location: class Main
Main.java:10: error: cannot find symbol
for(int cnt = 0;cnt < num;cnt++){
^
symbol: variable num
location: class Main
2 errors
|
s931013063 | p00423 | Java | import java.util.Scanner;
public class CardGame {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int cardNum = Integer.parseInt(in.nextLine());
int[] aCard = new int[cardNum];
int[] bCard = new int[cardNum];
for(int i=0; i<cardNum; i++){
String[] pCard = in.ne... | Main.java:3: error: class CardGame is public, should be declared in a file named CardGame.java
public class CardGame {
^
1 error
|
s029367360 | p00423 | Java | import java.util.ArrayList;
import java.util.Scanner;
public class CardGame {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
ArrayList<String> result = new ArrayList<String>();
while(true){
int cardNum = Integer.parseInt(in.nextLine());
int[] aCard = n... | Main.java:4: error: class CardGame is public, should be declared in a file named CardGame.java
public class CardGame {
^
1 error
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.