submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s684796671 | p00499 | C | #include <stdio.h>
main(){
int hi,koku,suu,kokud,suud;
int n=0,m=0;
scanf("%d",&hi);
scanf("%d",&koku);
scanf("%d",&suu);
scanf("%d",&kokud);
scanf("%d",&suud);
printf("\n");
while(1){
koku-=kokud;
n++;
if(koku<=0) break;
return 0;
}
while(1){
suu-=suud;
m++;
if(suu<=0) break
return 0;
}
if(n>=m){
hi-=n;
printf("%d",hi);
return 0;
}
else if(m>n){
hi-=m;
printf("%d",hi);
return 0;
}
return 0;
} | main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(){
| ^~~~
main.c: In function 'main':
main.c:25:17: error: expected ';' before 'return'
25 | if(suu<=0) break
| ^
| ;
26 | return 0;
| ~~~~~~
|
s538647557 | p00499 | C | #include <stdio.h>
int main()
{
int L, a, b, c, d;
int M, N;
scanf("%d\n%d\n%d\n%d\n%d\n",&L, &a, &b, &c, &d);
M = a/c;
N = b/d;
if(a % c != 0)
M++;
if(b % d != 0)
N++;
if(M > N)
printf("%d\n", L - M)
else
printf("%d\n", L - N)
return 0;
} | main.c: In function 'main':
main.c:15:30: error: expected ';' before 'else'
15 | printf("%d\n", L - M)
| ^
| ;
16 | else
| ~~~~
|
s824419524 | p00499 | C | max(x,y){return (x>y?x:y);}l,a,b,c;main(d){scanf("%d%d%d%d%d",&l,&a,&b,&c,&d);k=!printf("%d\n",l-max(a/c+!!(a%c),b/d+!!(b%d)));} | main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | max(x,y){return (x>y?x:y);}l,a,b,c;main(d){scanf("%d%d%d%d%d",&l,&a,&b,&c,&d);k=!printf("%d\n",l-max(a/c+!!(a%c),b/d+!!(b%d)));}
| ^~~
main.c: In function 'max':
main.c:1:1: error: type of 'x' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'y' defaults to 'int' [-Wimplicit-int]
main.c: At top level:
main.c:1:28: warning: data definition has no type or storage class
1 | max(x,y){return (x>y?x:y);}l,a,b,c;main(d){scanf("%d%d%d%d%d",&l,&a,&b,&c,&d);k=!printf("%d\n",l-max(a/c+!!(a%c),b/d+!!(b%d)));}
| ^
main.c:1:28: error: type defaults to 'int' in declaration of 'l' [-Wimplicit-int]
main.c:1:30: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
1 | max(x,y){return (x>y?x:y);}l,a,b,c;main(d){scanf("%d%d%d%d%d",&l,&a,&b,&c,&d);k=!printf("%d\n",l-max(a/c+!!(a%c),b/d+!!(b%d)));}
| ^
main.c:1:32: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
1 | max(x,y){return (x>y?x:y);}l,a,b,c;main(d){scanf("%d%d%d%d%d",&l,&a,&b,&c,&d);k=!printf("%d\n",l-max(a/c+!!(a%c),b/d+!!(b%d)));}
| ^
main.c:1:34: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
1 | max(x,y){return (x>y?x:y);}l,a,b,c;main(d){scanf("%d%d%d%d%d",&l,&a,&b,&c,&d);k=!printf("%d\n",l-max(a/c+!!(a%c),b/d+!!(b%d)));}
| ^
main.c:1:36: error: return type defaults to 'int' [-Wimplicit-int]
1 | max(x,y){return (x>y?x:y);}l,a,b,c;main(d){scanf("%d%d%d%d%d",&l,&a,&b,&c,&d);k=!printf("%d\n",l-max(a/c+!!(a%c),b/d+!!(b%d)));}
| ^~~~
main.c: In function 'main':
main.c:1:36: error: type of 'd' defaults to 'int' [-Wimplicit-int]
main.c:1:44: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
1 | max(x,y){return (x>y?x:y);}l,a,b,c;main(d){scanf("%d%d%d%d%d",&l,&a,&b,&c,&d);k=!printf("%d\n",l-max(a/c+!!(a%c),b/d+!!(b%d)));}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | max(x,y){return (x>y?x:y);}l,a,b,c;main(d){scanf("%d%d%d%d%d",&l,&a,&b,&c,&d);k=!printf("%d\n",l-max(a/c+!!(a%c),b/d+!!(b%d)));}
main.c:1:44: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
1 | max(x,y){return (x>y?x:y);}l,a,b,c;main(d){scanf("%d%d%d%d%d",&l,&a,&b,&c,&d);k=!printf("%d\n",l-max(a/c+!!(a%c),b/d+!!(b%d)));}
| ^~~~~
main.c:1:44: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:79: error: 'k' undeclared (first use in this function)
1 | max(x,y){return (x>y?x:y);}l,a,b,c;main(d){scanf("%d%d%d%d%d",&l,&a,&b,&c,&d);k=!printf("%d\n",l-max(a/c+!!(a%c),b/d+!!(b%d)));}
| ^
main.c:1:79: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:82: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
1 | max(x,y){return (x>y?x:y);}l,a,b,c;main(d){scanf("%d%d%d%d%d",&l,&a,&b,&c,&d);k=!printf("%d\n",l-max(a/c+!!(a%c),b/d+!!(b%d)));}
| ^~~~~~
main.c:1:82: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:82: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:82: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s438567499 | p00499 | C++ | #include <iostream>
using namespace std;
int main() {
int h, j, m, j1,m1, x, y;
cin >> h >> j >> m >> j1 >> m1;
if(j%j1 >= 1){
x = j/j1 + 1
}
else{
x = j/j1
}
if(m%m1 >= 1){
x = m/m1 + 1
}
else{
x = m/m1
}
cout << h - max(x,y) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:21: error: expected ';' before '}' token
9 | x = j/j1 + 1
| ^
| ;
10 | }
| ~
a.cc:12:17: error: expected ';' before '}' token
12 | x = j/j1
| ^
| ;
13 | }
| ~
a.cc:16:21: error: expected ';' before '}' token
16 | x = m/m1 + 1
| ^
| ;
17 | }
| ~
a.cc:19:17: error: expected ';' before '}' token
19 | x = m/m1
| ^
| ;
20 | }
| ~
|
s486596097 | p00499 | C++ | #include <iostream>
using namespace std;
int main() {
int h, j, m, j1,m1, x, y;
cin >> h >> j >> m >> j1 >> m1;
if(j%j1 >= 1){
x = j/j1 + 1;
}
else{
x = j/j1;
}
if(m%m1 >= 1){
x = m/m1 + 1;
}
else{
x = m/m1;
}
int z =max(x,y)
cout << h - z << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:24:3: error: expected ',' or ';' before 'cout'
24 | cout << h - z << endl;
| ^~~~
|
s446906526 | p00499 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main(){
int L,A,B,C,D,day[2];
cin >> L >> A >> B >> C >> D;
day[0] = A/C;
if(day[0]*C != A){
day[0]++;
}
day[1] = B/D;
if(day[1]*D != B){
day[1]++;
}
sort(day,day+1);
cout << L-day[0] << endl;
} | a.cc: In function 'int main()':
a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'?
18 | sort(day,day+1);
| ^~~~
| short
|
s431132099 | p00499 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(){
int l, a, b, c, d; cin >> l >> a >> b >> c >> d;
cout << (l - max(a / c + !!(a % c), b / d + !!(b % d)) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:60: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
6 | cout << (l - max(a / c + !!(a % c), b / d + !!(b % d)) << endl;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
a.cc:6:67: error: expected ')' before ';' token
6 | cout << (l - max(a / c + !!(a % c), b / d + !!(b % d)) << endl;
| ~ ^
| )
|
s721900150 | p00499 | C++ | #include<iostream>
using namespace std;
int main(){
int a;
int i;
int u;
int e;
int o;
int ka;
int ki;
cin>>a>>i>>u>>e>>o;
ka=i/e;
if(i%e>0){
ka=ka+1;
}
ki=u/o;
if(u%o>0){
ki=ki+1;
}
cout<<a-ka-ki<,endl;
} | a.cc: In function 'int main()':
a.cc:23:17: error: expected primary-expression before ',' token
23 | cout<<a-ka-ki<,endl;
| ^
|
s593277234 | p00499 | C++ | #include<iostream>
using namespace std;
int main(){
int a;
int i;
int u;
int e;
int o;
int ka;
int ki;
cin>>a>>i>>u>>e>>o;
ka=i/e;
if(i%e>0){
ka=ka+1;
}
ki=u/o;
if(u%o>0){
ki=ki+1;
}
cout<<a-ka-ki<endl;
} | a.cc: In function 'int main()':
a.cc:23:16: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
23 | cout<<a-ka-ki<endl;
| ~~~~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:23:17: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
23 | cout<<a-ka-ki<endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:23:17: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
23 | cout<<a-ka-ki<endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:23:17: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
23 | cout<<a-ka-ki<endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:23:17: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
23 | cout<<a-ka-ki<endl;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:23:17: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
23 | cout<<a-ka-ki<endl;
| ^~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:23:17: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
23 | cout<<a-ka-ki<endl;
| ^~~~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:23:17: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
23 | cout<<a-ka-ki<endl;
| ^~~~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:23:17: note: couldn't deduce template parameter '_CharT'
23 | cout<<a-ka-ki<endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:23:17: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
23 | cout<<a-ka-ki<endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed:
a.cc:23:17: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
23 | cout<<a-ka-ki<endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3901 | operator<(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed:
a.cc:23:17: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
23 | cout<<a-ka-ki<endl;
| ^~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2600 | operator<(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed:
a.cc:23:17: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
23 | cout<<a-ka-ki<endl;
| ^~~~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)'
507 | operator<(const error_condition& __lhs,
| ^~~~~~~~
/usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&'
507 | operator<(const error_condition& __lhs,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
s122570410 | p00499 | C++ | #include<iostream>
using namespace std;
int main(){
int a;
int i;
int u;
int e;
int o;
int ka;
int ki;
cin>>a>>i>>u>>e>>o;
ka=i/e;
if(i%e>0){
ka=ka+1;
}
ki=u/o;
if(u%o>0){
ki=ki+1;
}
if(ka>ki){
cout<<a-ka<<endl;
}else{
cout<<a-ki<<endl;
} | a.cc: In function 'int main()':
a.cc:26:2: error: expected '}' at end of input
26 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s510744037 | p00499 | C++ | #include <stdio.h>
int main(void)
{
float l,a,b,c,d,e,f,z;
l,a,b,c,d,e,f,z=0;
scanf("%f",&l);
scanf("%f",&a);
scanf("%f",&b);
scanf("%f",&c);
scanf("%f",&d);
e=(a/c)-(a%c);
f=(b/d)-(b%d);
if(a%c=0)(e<f){z=l-f};
if(b%d=0)(f<e){z=l-e};
if(a%c!=0)(e<f){z=l-f-1};
if(b%d!=0)(f<e){z=l-e-1};
printf("%f\n",&z);
return 0;
} | a.cc: In function 'int main()':
a.cc:14:19: error: invalid operands of types 'float' and 'float' to binary 'operator%'
14 | e=(a/c)-(a%c);
| ~^~
| | |
| | float
| float
a.cc:15:19: error: invalid operands of types 'float' and 'float' to binary 'operator%'
15 | f=(b/d)-(b%d);
| ~^~
| | |
| | float
| float
a.cc:16:13: error: invalid operands of types 'float' and 'float' to binary 'operator%'
16 | if(a%c=0)(e<f){z=l-f};
| ~^~
| | |
| | float
| float
a.cc:16:23: error: expected ';' before '{' token
16 | if(a%c=0)(e<f){z=l-f};
| ^
| ;
a.cc:17:13: error: invalid operands of types 'float' and 'float' to binary 'operator%'
17 | if(b%d=0)(f<e){z=l-e};
| ~^~
| | |
| | float
| float
a.cc:17:23: error: expected ';' before '{' token
17 | if(b%d=0)(f<e){z=l-e};
| ^
| ;
a.cc:18:13: error: invalid operands of types 'float' and 'float' to binary 'operator%'
18 | if(a%c!=0)(e<f){z=l-f-1};
| ~^~
| | |
| | float
| float
a.cc:18:24: error: expected ';' before '{' token
18 | if(a%c!=0)(e<f){z=l-f-1};
| ^
| ;
a.cc:19:13: error: invalid operands of types 'float' and 'float' to binary 'operator%'
19 | if(b%d!=0)(f<e){z=l-e-1};
| ~^~
| | |
| | float
| float
a.cc:19:24: error: expected ';' before '{' token
19 | if(b%d!=0)(f<e){z=l-e-1};
| ^
| ;
|
s300234416 | p00499 | C++ | #include <stdio.h>
float main(void)
{
float l,a,b,c,d,e,f,v,w,x,y,z;
l,a,b,c,d,e,f,v,w,x,y,z=0;
scanf("%f",&l);
scanf("%f",&a);
scanf("%f",&b);
scanf("%f",&c);
scanf("%f",&d);
if(a%c=0){v=l-a/c};
if(b%d=0){w=l-b/d};
if(a%c!=0){x=l-1-a/c};
if(b%d!=0){y=l-1-b/d};
if(v<w){w=z};
if(w<v){v=z};
if(x<y){y=z};
if(y<x){x=z};
printf("%f\n",&z);
return 0;
} | a.cc:3:1: error: '::main' must return 'int'
3 | float main(void)
| ^~~~~
a.cc: In function 'int main()':
a.cc:14:13: error: invalid operands of types 'float' and 'float' to binary 'operator%'
14 | if(a%c=0){v=l-a/c};
| ~^~
| | |
| | float
| float
a.cc:14:26: error: expected ';' before '}' token
14 | if(a%c=0){v=l-a/c};
| ^
| ;
a.cc:15:13: error: invalid operands of types 'float' and 'float' to binary 'operator%'
15 | if(b%d=0){w=l-b/d};
| ~^~
| | |
| | float
| float
a.cc:15:26: error: expected ';' before '}' token
15 | if(b%d=0){w=l-b/d};
| ^
| ;
a.cc:16:13: error: invalid operands of types 'float' and 'float' to binary 'operator%'
16 | if(a%c!=0){x=l-1-a/c};
| ~^~
| | |
| | float
| float
a.cc:16:29: error: expected ';' before '}' token
16 | if(a%c!=0){x=l-1-a/c};
| ^
| ;
a.cc:17:13: error: invalid operands of types 'float' and 'float' to binary 'operator%'
17 | if(b%d!=0){y=l-1-b/d};
| ~^~
| | |
| | float
| float
a.cc:17:29: error: expected ';' before '}' token
17 | if(b%d!=0){y=l-1-b/d};
| ^
| ;
a.cc:19:16: error: expected ';' before '}' token
19 | if(v<w){w=z};
| ^
| ;
a.cc:20:16: error: expected ';' before '}' token
20 | if(w<v){v=z};
| ^
| ;
a.cc:21:16: error: expected ';' before '}' token
21 | if(x<y){y=z};
| ^
| ;
a.cc:22:16: error: expected ';' before '}' token
22 | if(y<x){x=z};
| ^
| ;
|
s600380611 | p00499 | C++ | #include <stdio.h>
int main() {
int A, B, C, D, L, i, R, cnt = 0;
scanf( "%d", &L );
scanf( "%d", &A );
scanf( "%d", &B );
scanf( "%d", &C );
scanf( "%d", &D );
for( ;; ) {
A -= C;
B -= D;
cnt++;
if( A <= 0 && B <= 0 ) break;
}
R = L - cnt;
printf( "%d\n", R );
return 0; | a.cc: In function 'int main()':
a.cc:18:11: error: expected '}' at end of input
18 | return 0;
| ^
a.cc:3:12: note: to match this '{'
3 | int main() {
| ^
|
s849621351 | p00499 | C++ | #include <stdio.h>
int main() {
int A, B, C, D, L, i, R, cnt = 0;
scanf( "%d", &L );
scanf( "%d", &A );
scanf( "%d", &B );
scanf( "%d", &C );
scanf( "%d", &D );
for( ;; ) {
A -= C;
B -= D;
cnt++;
if( A <= 0 && B <= 0 ) break;
}
R = L - cnt;
printf( "%d\n", R );
return 0; | a.cc: In function 'int main()':
a.cc:18:11: error: expected '}' at end of input
18 | return 0;
| ^
a.cc:3:12: note: to match this '{'
3 | int main() {
| ^
|
s810589723 | p00499 | C++ | #include <stdio.h>
int main(){
int a, b, c, d, l, z ;
double e, f;
scanf("%d %d %d %d %d", &l, &a, &b, &c, &d,);
e = a/c;
double ceil(double e);
f = b/d;
double ceil(double f);
if(e>=f){
z = l-e;
}else{
z =l-f;
}
printf("%d\n", z);
return 0;
} | a.cc: In function 'int main()':
a.cc:5:46: error: expected primary-expression before ')' token
5 | scanf("%d %d %d %d %d", &l, &a, &b, &c, &d,);
| ^
|
s739789760 | p00499 | C++ | #include <stdio.h>
int main(){
int a, b, c, d, l, z ;
int e, f;
scanf("%d %d %d %d %d", &l, &a, &b, &c, &d);
e =double ceil( a/c);
f =double ceil(b/d);
if(e>=f){
z = l-e;
}else{
z =l-f;
}
printf("%d\n", z);
return 0;
} | a.cc: In function 'int main()':
a.cc:6:6: error: expected primary-expression before 'double'
6 | e =double ceil( a/c);
| ^~~~~~
a.cc:7:6: error: expected primary-expression before 'double'
7 | f =double ceil(b/d);
| ^~~~~~
|
s548158643 | p00499 | C++ | #include <stdio.h>
int main(){
int a, b, c, d, l, z ;
int e, f;
scanf("%d %d %d %d %d", &l, &a, &b, &c, &d);
e = ceil((double)a/(double)c);
f = ceil((double)b/(double)d);
if(e>=f){
z = l-e;
}else{
z =l-f;
}
printf("%d\n", z);
return 0;
} | a.cc: In function 'int main()':
a.cc:6:7: error: 'ceil' was not declared in this scope
6 | e = ceil((double)a/(double)c);
| ^~~~
|
s413990787 | p00499 | C++ | include <stdio.h>
int main(){
int l,a,b,c,d,p,i;
scanf("%d %d %d %d %d",&l,&a,&b,&c,&d);
for(i = 1 ; a > c || b > d ; i++){
a = a-c;
b = b-d;
}
p = l - i;
printf("%d\n",p);
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include <stdio.h>
| ^~~~~~~
|
s932733186 | p00499 | C++ | #include<iostream>
using namespace std;
int main () {
int a,b,c,d,L;
int hi,tuki;
float fhi,ftuki;
cin >> L >> a >> b >> c >> d;
hi=a/c;
fhi=(float)a/c;
tuki=b/d;
ftuki=(float)b/d;
if(hi<fhi){
thi++;
}
if(tuki<ftuki){
ftuki++;
}
if(hi>tuki){
cout << L-hi <<'\n';
}else{
cout << L-tuki <<'\n';
}
return 0;
} | a.cc: In function 'int main()':
a.cc:14:17: error: 'thi' was not declared in this scope; did you mean 'fhi'?
14 | thi++;
| ^~~
| fhi
|
s495890576 | p00499 | C++ | #include<iostream>
using namespace std;
int main()
{
int L,A,B,C,D,K,E,F;
cin>>L>>A>>B>>C>>D;
E=A/C;
F=B/D;
if(A%C>0){
E+=1;
}
if(B%D>0){
F+=1;
}
if(E<F){
K=L-E;
}
else(E>F){
K=L-F;
}
cout<<K<<'\n';
return 0;
} | a.cc: In function 'int main()':
a.cc:19:10: error: expected ';' before '{' token
19 | else(E>F){
| ^
| ;
|
s697844382 | p00499 | C++ | #include<iostream>
using namespace std;
int main()
{
int L,A,B,C,D,K,E,F;
cin>>L>>A>>B>>C>>D;
E=A/C;
F=B/D;
if(A%C>0){
E+=1;
}
if(B%D>0){
F+=1;
}
if(E<F){
K=L-E;
}
else(E>F)
K=L-F;
cout<<K<<'\n';
return 0;
} | a.cc: In function 'int main()':
a.cc:19:10: error: expected ';' before 'K'
19 | else(E>F)
| ^
| ;
20 | K=L-F;
| ~
|
s195499193 | p00499 | C++ | #include<iostream>
using namespace std;
int main()
{
int l;
cin>>l;
2<=l&&l<=40;
int a;
cin>>a;
1<=a&&a<=1000;
int b;
cin>>b;
1<=b&&b<=1000;
int c;
cin>>c;
1<=c&&c<=100;
int d;
cin>>d;
1<=d&&d<=100;
double jpn;
jpn=a%c;
double math;
math=b%d;
if(jpn>0){
if(math>0){
if(jpn+math>1.0){
if(a/c>b/d){
cout<<(l-a/c)+2<<"\n";
}
}
}
}
if(jpn>0){
if(math>0){
if(jpn+math>1.0){
if(b/d>a+c){
cout<<(l-b/d)+2<<"\n";
}
}
}
if(jpn>0){
if(math>0){
if(jpn+math<=1.0){
if(a/c>b/d){
cout<<(l-a/c)+1<<"\n";
}
}
}
}
if(jpn>0){
if(math>0){
if(jpn+math<=1.0){
if(b/d>a/c){
cout<<(l-b/d)+1<<"\n";
}
}
}
}
if(jpn=0){
if(math=0){
if(b/d>a/c){
cout<<l-b/d<<"\n";
}
}
}
if(jpn=0){
if(math=0){
if(a/c>b/d){
cout<<(l-a/c)+1<<"\n";
}
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:84:2: error: expected '}' at end of input
84 | }
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s557870643 | p00499 | C++ | #include<iostream>
using namespace std;
int main()
{
int l;
cin>>l;
2<=l&&l<=40;
int a;
cin>>a;
1<=a&&a<=1000;
int b;
cin>>b;
1<=b&&b<=1000;
int c;
cin>>c;
1<=c&&c<=100;
int d;
cin>>d;
1<=d&&d<=100;
int jpn;
jpn=a%c;
int math;
math=b%d;
if(jpn>0){
if(math>0){
if(jpn+math>1.0)
if(a/c>b/d){
cout<<(l-a/c)+<<"\n";
}
}
if(jpn<0){
if(a/c>b/d){
cout<<l-a/c<<"\n";
}
}
if(math>0){
if(b/d>a/c){
cout<<(l-b/d)+1<<"\n";
}
}
return 0;
} | a.cc: In function 'int main()':
a.cc:35:39: error: expected primary-expression before '<<' token
35 | cout<<(l-a/c)+<<"\n";
| ^~
a.cc:53:2: error: expected '}' at end of input
53 | }
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s782520060 | p00499 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int main(){
int l(2 <= 40), a(2 <= 1000), b(2 <= 1000), c(2 <= 1000), d(2 <= 1000);
cin >> l >> a >> b >> c >> d;
for (int i; i = 0; i++)
if (a <= 0 && b <= 0)break;
a -= c;
b -= d;
}
cout << l - i << endl;
return 0;
} | a.cc:14:5: error: 'cout' does not name a type
14 | cout << l - i << endl;
| ^~~~
a.cc:16:17: error: expected unqualified-id before 'return'
16 | return 0;
| ^~~~~~
a.cc:17:1: error: expected declaration before '}' token
17 | }
| ^
|
s234042807 | p00499 | C++ | include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
int l;
int a,b;
int c,d;
int ans;
int j,m;
scanf(" %d %d %d %d %d",&l,&a,&b,&c,&d);
j = m = 0;
if(a%c!=0){
j=1;
}
if(b%d!=0){
m=1;
}
ans = max(a/b+j,b/d+m);
printf("%d\n",l-ans);
return 0;
} | 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 __gnu_cxx::__is_null_pointer' redeclared as different kind of entity
164 | __is_null_pointer(std::nullptr_t)
| ^
/usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)'
159 | __is_null_pointer(_Type)
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std'
164 | __is_null_pointer(std::nullptr_t)
| ^~~~~~~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64:
/usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std'
666 | struct is_null_pointer<std::nullptr_t>
| ^~~~~~~~~
/usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid
666 | struct is_null_pointer<std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid
670 | struct is_null_pointer<const std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid
674 | struct is_null_pointer<volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid
678 | struct is_null_pointer<const volatile std::nullptr_t>
| ^
/usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^~~~~~
In file included from /usr/include/stdio.h:34,
from /usr/include/c++/14/cstdio:42,
from a.cc:2:
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid
1429 | : public integral_constant<std::size_t, alignof(_Tp)>
| ^
/usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1438 | : public integral_constant<std::size_t, 0> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid
1438 | : public integral_constant<std::size_t, 0> { };
| ^
/usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared
1440 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope
1441 | struct rank<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid
1441 | struct rank<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid
1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std'; did you mean 'size_t'?
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^~~~~~
/usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here
214 | typedef __SIZE_TYPE__ size_t;
| ^~~~~~
/usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid
1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };
| ^
/usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter
/usr/include/c++/14/type_traits:2086:26: error: 'std::size_t' has not been declared
2086 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2087:30: error: '_Size' was not declared in this scope
2087 | struct remove_extent<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2087:36: error: template argument 1 is invalid
2087 | struct remove_extent<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2099:26: error: 'std::size_t' has not been declared
2099 | template<typename _Tp, std::size_t _Size>
| ^~~
/usr/include/c++/14/type_traits:2100:35: error: '_Size' was not declared in this scope
2100 | struct remove_all_extents<_Tp[_Size]>
| ^~~~~
/usr/include/c++/14/type_traits:2100:41: error: template argument 1 is invalid
2100 | struct remove_all_extents<_Tp[_Size]>
| ^
/usr/include/c++/14/type_traits:2171:12: error: 'std::size_t' has not been declared
2171 | template<std::size_t _Len>
| ^~~
/usr/include/c++/14/type_traits:2176:30: error: '_Len' was not declared in this scope
2176 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2194:12: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2194:30: error: 'std::size_t' has not been declared
2194 | template<std::size_t _Len, std::size_t _Align =
| ^~~
/usr/include/c++/14/type_traits:2195:55: error: '_Len' was not declared in this scope
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^~~~
/usr/include/c++/14/type_traits:2195:59: error: template argument 1 is invalid
2195 | __alignof__(typename __aligned_storage_msa<_Len>::__type)>
| ^
/usr/include/c++/14/type_traits:2202:30: error: '_Len' was not declared in this scope
2202 | unsigned char __data[_Len];
| ^~~~
/usr/include/c++/14/type_traits:2203:44: error: '_Align' was not declared in this scope
2203 | struct __attribute__((__aligned__((_Align)))) { } __align;
| ^~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:65:
/usr/include/c++/14/bits/stl_iterator_base_types.h:125:67: error: 'ptrdiff_t' does not name a type
125 | template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:1:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
+++ |+#include <cstddef>
1 | // Types used in iterator implementation -*- C++ -*-
/usr/include/c++/14/bits/stl_iterator_base_types.h:214:15: error: 'ptrdiff_t' does not name a type
214 | typedef ptrdiff_t difference_type;
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:214:15: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
/usr/include/c++/14/bits/stl_iterator_base_types.h:225:15: error: 'ptrdiff_t' does not name a type
225 | typedef ptrdiff_t difference_type;
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_types.h:225:15: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
In file included from /usr/include/c++/14/bits/stl_algobase.h:66:
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:112:5: error: 'ptrdiff_t' does not name a type
112 | ptrdiff_t
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:66:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
65 | #include <debug/assertions.h>
+++ |+#include <cstddef>
66 | #include <bits/stl_iterator_base_types.h>
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:118:5: error: 'ptrdiff_t' does not name a type
118 | ptrdiff_t
| ^~~~~~~~~
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:118:5: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
In file included from /usr/include/c++/14/bits/stl_iterator.h:67,
from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/ptr_traits.h:156:47: error: 'ptrdiff_t' was not declared in this scope
15 |
s742062454 | p00499 | C++ | #include <iostream>
using namespace std;
int main(void){
int L , A , B , C , D;
cin >> L >> A >> B >> C >> D;
int days_jp , days_mt , days;
days_jp = (A / C) + 1;
days_mt = (B / D) + 1;
days = (days_jp > days_mt) ? days_jp : days_mt;
cout << L - daysl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:15: error: 'daysl' was not declared in this scope; did you mean 'days'?
14 | cout << L - daysl;
| ^~~~~
| days
|
s648913739 | p00499 | C++ | #include<iostream>
using namespace std;
int main() {
int L, A, B, C, D;
int restA = 0, restB = 0;
cin >> L >> A >> B >> C >> D;
if( A % C > 0) { restA = 1;}
if( B % D > 0) { restB = 1;}
cout << L - max((A/C) + restA, (b/D) +restB ) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:41: error: 'b' was not declared in this scope
9 | cout << L - max((A/C) + restA, (b/D) +restB ) << endl;
| ^
|
s313278092 | p00499 | C++ | #include <iostream>
using namespace std;
int main(void)
{
int a,b,c,d,e,f,g,h,i,j,k;
float A;
cin>>a>>b>>c>>d>>e;
A=b-d;
g=0;
g++;
for (;;)
{
if (A<=0)
{
g++;
break;
}
else if (A>0)
{
g++;
}
}
A=c-e;
f=0;
f++;
for (;;)
{
if (A<=0)
{
f++;
break;
}
A=A-e;
else if (A>0)
{
f++;
}
}
if (f<=g)
{
g=a-g;
cout<<g<<endl;
}
else if(f>=g)
{
f=a-f;
cout<<f<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:34:17: error: 'else' without a previous 'if'
34 | else if (A>0)
| ^~~~
|
s641529155 | p00499 | C++ |
#include <stdio.h>
#include <algorithm>
using namespace std;
int main() {
int n[5];
for (int i = 0; i < 5; i++) {
scanf("%d", &n[i]);
}
printf("%d\n", n[0] - max((int)ceil((double)n[1] / n[3]), (int)ceil((double)n[2] / n[4])));
return 0;
} | a.cc: In function 'int main()':
a.cc:15:40: error: 'ceil' was not declared in this scope
15 | printf("%d\n", n[0] - max((int)ceil((double)n[1] / n[3]), (int)ceil((double)n[2] / n[4])));
| ^~~~
|
s223966269 | p00499 | C++ | #include<iostream>
using namespace std;
int L, A, B, C, D;
int rA = 0, rB = 0;
int main(){
cin >> L >> A >> B >> C >> D;
if( a - (A/C) * C > 0) { rA = 1;}
if( B - (B/D) * D > 0) { rB = 1;}
cout << L - max((A/C) + rA,(B/D) +rB ) << endl;
return0;
} | a.cc: In function 'int main()':
a.cc:7:5: error: 'a' was not declared in this scope
7 | if( a - (A/C) * C > 0) { rA = 1;}
| ^
a.cc:10:1: error: 'return0' was not declared in this scope
10 | return0;
| ^~~~~~~
|
s463525721 | p00499 | C++ | #include<iostream>
using namespace std;
int L, A, B, C, D;
int rA = 0, rB = 0;
int main(){
cin >> L >> A >> B >> C >> D;
if( A - (A/C) * C > 0) { rA = 1;}
if( B - (B/D) * D > 0) { rB = 1;}
cout << L - max((A/C) + rA,(B/D) +rB ) << endl;
return0;
} | a.cc: In function 'int main()':
a.cc:10:1: error: 'return0' was not declared in this scope
10 | return0;
| ^~~~~~~
|
s227652299 | p00499 | C++ | #include <iostream>
#include <algorithm>
int main() {
int l; // ??¬???????????\??°
int a, b, c, d;
int koku, san;
std::cin >> l >> a >> b >> c >> d;
koku = b / d;
san = a / c;
l = l - std::max(koku, san);
std::cout << l << std::endl;
return 0
} | a.cc: In function 'int main()':
a.cc:15:17: error: expected ';' before '}' token
15 | return 0
| ^
| ;
16 | }
| ~
|
s434632850 | p00499 | C++ | #include <iostream>
#include <algorithm>
int main() {
int l; // ??¬???????????\??°
int a, b, c, d;
int koku, san;
std::cin >> l >> a >> b >> c >> d;
koku = b / d;
san = a / c;
l = l - std::max(koku, san);
std::cout << l << std::endl;
return 0
} | a.cc: In function 'int main()':
a.cc:15:17: error: expected ';' before '}' token
15 | return 0
| ^
| ;
16 | }
| ~
|
s206368296 | p00499 | C++ | #include <iostream>
using namespace std;
int main() {
int A, B, C, D, L;
int X, Y;
cin >> L >> A >> B >> C >> D;
X = A/C;
if(A%C != 0)
X++;
Y = B/D;
if(B%D != 0)
Y++;
cout << (X>Y) ? L-X : L-Y << endl;
}
| a.cc: In function 'int main()':
a.cc:17:29: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
17 | cout << (X>Y) ? L-X : L-Y << endl;
| ~~~~^~~~~~~
|
s160587630 | p00499 | C++ | #include <iostream>
using namespace std;
int main() {
int A, B, C, D, L;
int X, Y;
cin >> L >> A >> B >> C >> D;
X = A/C;
if(A%C != 0)
X++;
Y = B/D;
if(B%D != 0)
Y++;
cout << (X>Y) ? (L-X) : (L-Y) << endl;
}
| a.cc: In function 'int main()':
a.cc:17:33: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
17 | cout << (X>Y) ? (L-X) : (L-Y) << endl;
| ~~~~~~^~~~~~~
|
s640618628 | p00499 | C++ | #! /usr/bin/env ruby
# coding: utf-8
L = gets.to_i
A = gets.to_i
B = gets.to_i
C = gets.to_i
D = gets.to_i
puts L - [(A + C - 1)/C.to_i, (B + D - 1)/D.to_i].max | a.cc:1:2: error: invalid preprocessing directive #!
1 | #! /usr/bin/env ruby
| ^
a.cc:2:3: error: invalid preprocessing directive #coding
2 | # coding: utf-8
| ^~~~~~
a.cc:3:1: error: 'L' does not name a type
3 | L = gets.to_i
| ^
|
s604816652 | p00499 | C++ | #include<stdio.h>
#include<algorithm>
using namespace std;
int main(){
int a,b,c,d,e;
scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
printf("%d\n",a-max((b+d-1)/d-(c+e-1)/e));
} | a.cc: In function 'int main()':
a.cc:7:28: error: no matching function for call to 'max(int)'
7 | printf("%d\n",a-max((b+d-1)/d-(c+e-1)/e));
| ~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5706 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: template argument deduction/substitution failed:
a.cc:7:28: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
7 | printf("%d\n",a-max((b+d-1)/d-(c+e-1)/e));
| ~~~^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5716 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate expects 2 arguments, 1 provided
|
s338314527 | p00499 | C++ | #include <iostream>
#include <algroithm>
#include <cmath>
using namespace std;
int main()
{
int L, A, B, C, D;
cin >> L >> A >> B >> C >> D;
cout << L - max(ceil((double)A / C), ceil((double)B / D)) << endl;
return 0;
} | a.cc:2:10: fatal error: algroithm: No such file or directory
2 | #include <algroithm>
| ^~~~~~~~~~~
compilation terminated.
|
s481378074 | p00499 | C++ | a,b,c,d,e,*p=&a;main(){while(~scanf("%d",p++));printf("%.f\n",a-fmax(--b/d,--c/e)-1);} | a.cc:1:1: error: 'a' does not name a type
1 | a,b,c,d,e,*p=&a;main(){while(~scanf("%d",p++));printf("%.f\n",a-fmax(--b/d,--c/e)-1);}
| ^
a.cc:1:17: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | a,b,c,d,e,*p=&a;main(){while(~scanf("%d",p++));printf("%.f\n",a-fmax(--b/d,--c/e)-1);}
| ^~~~
a.cc: In function 'int main()':
a.cc:1:42: error: 'p' was not declared in this scope
1 | a,b,c,d,e,*p=&a;main(){while(~scanf("%d",p++));printf("%.f\n",a-fmax(--b/d,--c/e)-1);}
| ^
a.cc:1:31: error: 'scanf' was not declared in this scope
1 | a,b,c,d,e,*p=&a;main(){while(~scanf("%d",p++));printf("%.f\n",a-fmax(--b/d,--c/e)-1);}
| ^~~~~
a.cc:1:63: error: 'a' was not declared in this scope
1 | a,b,c,d,e,*p=&a;main(){while(~scanf("%d",p++));printf("%.f\n",a-fmax(--b/d,--c/e)-1);}
| ^
a.cc:1:72: error: 'b' was not declared in this scope
1 | a,b,c,d,e,*p=&a;main(){while(~scanf("%d",p++));printf("%.f\n",a-fmax(--b/d,--c/e)-1);}
| ^
a.cc:1:74: error: 'd' was not declared in this scope
1 | a,b,c,d,e,*p=&a;main(){while(~scanf("%d",p++));printf("%.f\n",a-fmax(--b/d,--c/e)-1);}
| ^
a.cc:1:78: error: 'c' was not declared in this scope
1 | a,b,c,d,e,*p=&a;main(){while(~scanf("%d",p++));printf("%.f\n",a-fmax(--b/d,--c/e)-1);}
| ^
a.cc:1:80: error: 'e' was not declared in this scope
1 | a,b,c,d,e,*p=&a;main(){while(~scanf("%d",p++));printf("%.f\n",a-fmax(--b/d,--c/e)-1);}
| ^
a.cc:1:65: error: 'fmax' was not declared in this scope
1 | a,b,c,d,e,*p=&a;main(){while(~scanf("%d",p++));printf("%.f\n",a-fmax(--b/d,--c/e)-1);}
| ^~~~
a.cc:1:48: error: 'printf' was not declared in this scope
1 | a,b,c,d,e,*p=&a;main(){while(~scanf("%d",p++));printf("%.f\n",a-fmax(--b/d,--c/e)-1);}
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | a,b,c,d,e,*p=&a;main(){while(~scanf("%d",p++));printf("%.f\n",a-fmax(--b/d,--c/e)-1);}
|
s345979264 | p00499 | C++ | #include<iostream>
using namespace std;
int main(){
int L,A,B,C,D,x,y;
cin >>L >>A >>B >>C >>D;
if(A%C==0)
x=A/C;
else
x=A/C+1;
if(B%D==0)
y=B/D;
else
y=B/D+1;
if(x<y)
x=y;
cout << L-x <<endl";
return 0;
} | a.cc:18:27: warning: missing terminating " character
18 | cout << L-x <<endl";
| ^
a.cc:18:27: error: missing terminating " character
18 | cout << L-x <<endl";
| ^~
a.cc: In function 'int main()':
a.cc:18:27: error: expected ';' before 'return'
18 | cout << L-x <<endl";
| ^
| ;
19 |
20 | return 0;
| ~~~~~~
|
s414627022 | p00500 | Java | import java.util.*;
public class UniqueNumber {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int i,j,k,c = 0;
int[][] a;
a = new int[n][n];
for(i=0; i<n; i++){
a[0][i] = sc.nextInt();
a[1][i] = sc.nextInt();
a[2][i] = sc.nextInt();
}
for(i=0; i<3; i++){
for(j=0; j<n; j++){
for(k=j+1; k<n; k++){
if(a[i][j] == a[i][k]){
a[i][k] = 0;
c = c + 1;
}
}
if(c > 0){
a[i][j] = 0;
}
c = 0;
}
}
for(i=0; i<n; i++){
System.out.println(a[0][i] + a[1][i] + a[2][i]);
}
}
} | Main.java:2: error: class UniqueNumber is public, should be declared in a file named UniqueNumber.java
public class UniqueNumber {
^
1 error
|
s465602972 | p00500 | 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;
import java.util.Map;
import java.util.PriorityQueue;
import java.math.BigInteger;
public class Main{
static final InputStream in=System.in;
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE/2;
static final long LINF=Long.MAX_VALUE/2;
static int[] num=new int[201][3];
static int[] point=new int[201];
public static void main(String[] args) throws IOException{
InputReader ir=new InputReader(in);
int n=ir.nextInt();
for(int i=0;i<n;i++) num[i]=ir.toIntArray(3);
HashMap<Integer,Integer> map=new HashMap<Integer,Integer>();
for(int i=0;i<3;i++){
for(int j=0;j<n;j++){
if(!map.containsKey(num[j][i])) map.put(num[j][i],1);
else map.put(num[j][i],map.get(num[j][i])+1);
}
for(int j=0;j<n;j++) if(map.get(num[j][i])==1) point[j]+=num[j][i];
}
for(int i=0;i<n;i++) out.println(point[i]);
out.flush();
}
static class InputReader {
private InputStream in;
private byte[] buffer=new byte[1024];
private int curbuf;
private int lenbuf;
public InputReader(InputStream in) {this.in=in;}
public int readByte() {
if(lenbuf==-1) throw new InputMismatchException();
if(curbuf>=lenbuf){
curbuf= 0;
try{
lenbuf=in.read(buffer);
}
catch (IOException e) {
throw new InputMismatchException();
}
if(lenbuf<=0)
return -1;
}
return buffer[curbuf++];
}
public boolean isSpaceChar(int c){return !(c>=33&&c<=126);}
private int skip() {int b; while((b = readByte())!=-1&&isSpaceChar(b)); return b;}
public String next() {
int b=skip();
StringBuilder sb=new StringBuilder();
while(!isSpaceChar(b)){
sb.appendCodePoint(b);
b=readByte();
}
return sb.toString();
}
public int nextInt() {
int c=readByte();
while (isSpaceChar(c)) c=readByte();
boolean minus=false;
if (c=='-') {
minus=true;
c=readByte();
}
int res=0;
do{
if(c<'0'||c>'9') throw new InputMismatchException();
res=res*10+c-'0';
c=readByte();
}while(!isSpaceChar(c));
return (minus)?-res:res;
}
public long nextLong() {
int c=readByte();
while (isSpaceChar(c)) c=readByte();
boolean minus=false;
if (c=='-') {
minus=true;
c=readByte();
}
long res = 0;
do{
if(c<'0'||c>'9') throw new InputMismatchException();
res=res*10+c-'0';
c=readByte();
}while(!isSpaceChar(c));
return (minus)?-res:res;
}
public int[] toIntArray(int n){
int[] a=new int[n];
for(int i=0;i<n;i++) a[i]=nextInt();
return a;
}
}
} | Main.java:22: error: incompatible types: int[][] cannot be converted to int[]
static int[] num=new int[201][3];
^
Main.java:28: error: incompatible types: int[] cannot be converted to int
for(int i=0;i<n;i++) num[i]=ir.toIntArray(3);
^
Main.java:32: error: array required, but int found
if(!map.containsKey(num[j][i])) map.put(num[j][i],1);
^
Main.java:32: error: array required, but int found
if(!map.containsKey(num[j][i])) map.put(num[j][i],1);
^
Main.java:33: error: array required, but int found
else map.put(num[j][i],map.get(num[j][i])+1);
^
Main.java:33: error: array required, but int found
else map.put(num[j][i],map.get(num[j][i])+1);
^
Main.java:35: error: array required, but int found
for(int j=0;j<n;j++) if(map.get(num[j][i])==1) point[j]+=num[j][i];
^
Main.java:35: error: array required, but int found
for(int j=0;j<n;j++) if(map.get(num[j][i])==1) point[j]+=num[j][i];
^
8 errors
|
s485233854 | p00500 | Java | public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int i, k, cnt=0, searched, search;
int data[][] = new int[201][3];
int point[] = new int[201];
//????????¬?????????????????????????????????????????????
for(i = 1; i <= N; i++){
for(k = 1; k <= 3; k++){
data[i][k] = sc.nextInt();
}
}
//?????¬?????????????£???§??????????????????????¢????????????????????????????????????????????????????
for(i = 1; i <= N; i++){
for(k = 1; k <= 3; k++){
search = data[i][k];
for(searched = 1; searched <= N; searched++){
if(i == searched)continue;
if(search == data[searched][k])search = 0;
}
point[i] += search;
}
}
for(i = 1; i <= N; i++){
System.out.println(point[i]);
}
}
} | Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s663786630 | p00500 | Java | public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int i, k, searched, search;
int data[][] = new int[201][3];
int point[] = new int[201];
//????????¬?????????????????????????????????????????????
for(i = 1; i <= N; i++){
for(k = 1; k <= 3; k++){
data[i][k] = sc.nextInt();
}
}
//?????¬?????????????£???§??????????????????????¢????????????????????????????????????????????????????
for(i = 1; i <= N; i++){
for(k = 1; k <= 3; k++){
search = data[i][k];
for(searched = 1; searched <= N; searched++){
if(i == searched)continue;
if(search == data[searched][k])search = 0;
}
point[i] += search;
}
}
for(i = 1; i <= N; i++){
System.out.println(point[i]);
}
sc.close();
}
} | Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s112282678 | p00500 | Java | import java.util.Scanner;
public class B1 {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int i, k, searched, search;
int data[][] = new int[201][3];
int point[] = new int[201];
//????????¬?????????????????????????????????????????????
for(i = 1; i <= N; i++){
for(k = 1; k <= 3; k++){
data[i][k] = sc.nextInt();
}
}
//?????¬?????????????£???§??????????????????????¢????????????????????????????????????????????????????
for(i = 1; i <= N; i++){
for(k = 1; k <= 3; k++){
search = data[i][k];
for(searched = 1; searched <= N; searched++){
if(i == searched)continue;
if(search == data[searched][k])search = 0;
}
point[i] += search;
}
}
for(i = 1; i <= N; i++){
System.out.println(point[i]);
}
sc.close();
}
} | Main.java:3: error: class B1 is public, should be declared in a file named B1.java
public class B1 {
^
1 error
|
s306982327 | p00500 | Java | import java.util.Scanner;
public class ex0 {
public static void main(String[] args) {
Scanner sc =new Scanner(System.in);
int[][] point=new int[200][10];
int[] point2=new int[200];
int n=sc.nextInt();
int s=0;
for(int i=1;i<=n;i++) point2[i]=0;
for(int i=1;i<=3;i++){
for(int j=1;j<=n;j++){
point[j][i]=sc.nextInt();
}
}
for(int i=1;i<=3;i++){
for(int j=1;j<=n;j++){
for(int k=1;k<=n;k++){
if(point[j][i]!=point[k][i]) s+=1;
}
if(s==n-1) point2[j]=point2[j]+point[j][i];
s=0;
}
}
for(int j=1;j<=n;j++){
System.out.println(point2[j]);
}
}
} | Main.java:2: error: class ex0 is public, should be declared in a file named ex0.java
public class ex0 {
^
1 error
|
s379943050 | p00500 | Java | import java.util.Scanner;
public class ex0 {
public static void main(String[] args) {
Scanner sc =new Scanner(System.in);
int[][] point=new int[200][10];
int[] point2=new int[200];
int n=sc.nextInt();
int s=0;
for(int i=1;i<=200;i++) point2[i]=0;
for(int i=1;i<=3;i++){
for(int j=1;j<=n;j++){
point[j][i]=sc.nextInt();
}
}
for(int i=1;i<=3;i++){
for(int j=1;j<=n;j++){
for(int k=1;k<=n;k++){
if(point[j][i]!=point[k][i]) s+=1;
}
if(s==n-1) point2[j]=point2[j]+point[j][i];
s=0;
}
}
for(int j=1;j<=n;j++){
System.out.println(point2[j]);
}
}
} | Main.java:2: error: class ex0 is public, should be declared in a file named ex0.java
public class ex0 {
^
1 error
|
s691889612 | p00500 | Java | import java.util.Scanner;
public class???Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int[][] player=new int[3][n];
int[] point=new int[n];
for(int i=0;i<n;i++){
for(int j=0;j<3;j++){
player[i][j]=sc.nextInt();
}
}
for(int i=0;i<3;i++){
for(int j=0;j<n;j++){
for(int k=0;k<n;k++){
if(player[i][j]==player[i][k]){
}else{
point[i]+=player[i][j];
}
}
}
}
for(int i=0;i<n;i++){
System.out.printf("%d\n", point[i]);
}
}
} | Main.java:2: error: <identifier> expected
public class???Main {
^
1 error
|
s090973314 | p00500 | Java | import java.util.Scanner;
public class???Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int[][] player=new int[3][n];
int[] point=new int[n];
for(int i=0;i<n;i++){
for(int j=0;j<3;j++){
player[i][j]=sc.nextInt();
}
}
for(int i=0;i<3;i++){
for(int j=0;j<n;j++){
for(int k=0;k<n;k++){
if(player[i][j]==player[i][k]){
}else{
point[i]+=player[i][j];
}
}
}
}
for(int i=0;i<n;i++){
System.out.printf("%d\n", point[i]);
}
}
} | Main.java:2: error: <identifier> expected
public class???Main {
^
1 error
|
s293842578 | p00500 | Java | import java.util.Scanner;
public class Main {
void check(int a,int b,int n,int i) {
for(int k=1;k<=n;k++){
if(point[j][i]==point[k][i] && ) s+=1;
}
}
public static void main(String[] args) {
Scanner sc =new Scanner(System.in);
int[][] point=new int[300][10];
int[] score=new int[102];
for(int i=1;i<=101;i++) score[i]=0;
int n=sc.nextInt();
int k=0;
boolean check=false;
for(int i=0;i<n;i++){
for(int j=0;j<3;j++){
point[i][j]=sc.nextInt();
}
}
for(int i=0;i<3;i++){
for(int j=0;j<n;j++){
check=false;
for( k=0;k<n;k++){
if(point[k][i]==point[j][i] && j!=k) check=true;
}
if(check==false) score[j]=score[j]+point[k][i];
}
}
for(int j=0;j<n;j++){
System.out.println(score[j]);
}
}
} | Main.java:5: error: illegal start of expression
if(point[j][i]==point[k][i] && ) s+=1;
^
1 error
|
s800837917 | p00500 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int card [][] = new int[N][3];
int score [] = new int[N];
int count [][] = new int[N][3];
for(int i = 0 ; i < N ; i++){
card[i][0] = sc.nextInt();
card[i][1] = sc.nextInt();
card[i][2] = sc.nextInt();
}
for(int i = 0 ; i < N ; i++){
for(int k = 0 ; k < 3 ; k++){
for(int j = 0 ; j < N ; j++){
if(card[i][k] != card[j][k]){
count[i][k]++;
}
}
if(count[i][k] == N - 1){
score[i] = score[i] + card[i][k];
}
}
} | Main.java:30: error: reached end of file while parsing
}
^
1 error
|
s755793172 | p00500 | Java |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner sc = new Scanner(System.in);
//int i, k;
int n = sc.nextInt();
int[][] score = new int [n][3];
int[][] score1 = new int [n][3];
int[] sum = new int [5];
for(i = 0; i < n; i++){
for(k = 0; k < 3; k++){
score[i][k] = sc.nextInt();
score1[i][k] = score[i][k];
}
}
sc.close();
for(k = 0; k < 3; k++){
for(i = 0; i < n; i++){
for(int m = 0; m < n; m++){
if(score[i][k] == score[m][k] && i != m){
score1[i][k] = 0;
}else{
}
}
}
}
for(i = 0; i < n; i++){
for(k = 0; k < 3; k++){
sum[i] += score1[i][k];
}
}
for(i = 0; i < n; i++){
System.out.printf("%d\n", sum[i]);
}
}
} | Main.java:13: error: cannot find symbol
for(i = 0; i < n; i++){
^
symbol: variable i
location: class Main
Main.java:13: error: cannot find symbol
for(i = 0; i < n; i++){
^
symbol: variable i
location: class Main
Main.java:13: error: cannot find symbol
for(i = 0; i < n; i++){
^
symbol: variable i
location: class Main
Main.java:14: error: cannot find symbol
for(k = 0; k < 3; k++){
^
symbol: variable k
location: class Main
Main.java:14: error: cannot find symbol
for(k = 0; k < 3; k++){
^
symbol: variable k
location: class Main
Main.java:14: error: cannot find symbol
for(k = 0; k < 3; k++){
^
symbol: variable k
location: class Main
Main.java:15: error: cannot find symbol
score[i][k] = sc.nextInt();
^
symbol: variable i
location: class Main
Main.java:15: error: cannot find symbol
score[i][k] = sc.nextInt();
^
symbol: variable k
location: class Main
Main.java:16: error: cannot find symbol
score1[i][k] = score[i][k];
^
symbol: variable i
location: class Main
Main.java:16: error: cannot find symbol
score1[i][k] = score[i][k];
^
symbol: variable k
location: class Main
Main.java:16: error: cannot find symbol
score1[i][k] = score[i][k];
^
symbol: variable i
location: class Main
Main.java:16: error: cannot find symbol
score1[i][k] = score[i][k];
^
symbol: variable k
location: class Main
Main.java:20: error: cannot find symbol
for(k = 0; k < 3; k++){
^
symbol: variable k
location: class Main
Main.java:20: error: cannot find symbol
for(k = 0; k < 3; k++){
^
symbol: variable k
location: class Main
Main.java:20: error: cannot find symbol
for(k = 0; k < 3; k++){
^
symbol: variable k
location: class Main
Main.java:21: error: cannot find symbol
for(i = 0; i < n; i++){
^
symbol: variable i
location: class Main
Main.java:21: error: cannot find symbol
for(i = 0; i < n; i++){
^
symbol: variable i
location: class Main
Main.java:21: error: cannot find symbol
for(i = 0; i < n; i++){
^
symbol: variable i
location: class Main
Main.java:23: error: cannot find symbol
if(score[i][k] == score[m][k] && i != m){
^
symbol: variable i
location: class Main
Main.java:23: error: cannot find symbol
if(score[i][k] == score[m][k] && i != m){
^
symbol: variable k
location: class Main
Main.java:23: error: cannot find symbol
if(score[i][k] == score[m][k] && i != m){
^
symbol: variable k
location: class Main
Main.java:23: error: cannot find symbol
if(score[i][k] == score[m][k] && i != m){
^
symbol: variable i
location: class Main
Main.java:24: error: cannot find symbol
score1[i][k] = 0;
^
symbol: variable i
location: class Main
Main.java:24: error: cannot find symbol
score1[i][k] = 0;
^
symbol: variable k
location: class Main
Main.java:30: error: cannot find symbol
for(i = 0; i < n; i++){
^
symbol: variable i
location: class Main
Main.java:30: error: cannot find symbol
for(i = 0; i < n; i++){
^
symbol: variable i
location: class Main
Main.java:30: error: cannot find symbol
for(i = 0; i < n; i++){
^
symbol: variable i
location: class Main
Main.java:31: error: cannot find symbol
for(k = 0; k < 3; k++){
^
symbol: variable k
location: class Main
Main.java:31: error: cannot find symbol
for(k = 0; k < 3; k++){
^
symbol: variable k
location: class Main
Main.java:31: error: cannot find symbol
for(k = 0; k < 3; k++){
^
symbol: variable k
location: class Main
Main.java:32: error: cannot find symbol
sum[i] += score1[i][k];
^
symbol: variable i
location: class Main
Main.java:32: error: cannot find symbol
sum[i] += score1[i][k];
^
symbol: variable i
location: class Main
Main.java:32: error: cannot find symbol
sum[i] += score1[i][k];
^
symbol: variable k
location: class Main
Main.java:35: error: cannot find symbol
for(i = 0; i < n; i++){
^
symbol: variable i
location: class Main
Main.java:35: error: cannot find symbol
for(i = 0; i < n; i++){
^
symbol: variable i
location: class Main
Main.java:35: error: cannot find symbol
for(i = 0; i < n; i++){
^
symbol: variable i
location: class Main
Main.java:36: error: cannot find symbol
System.out.printf("%d\n", sum[i]);
^
symbol: variable i
location: class Main
37 errors
|
s293476111 | p00500 | Java | import java.util.*;
public class AOJ0577{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int i,j,k,x,c;
int p=sc.nextInt();
int [][]ps =new int[p][3];
for(i=0;i<p;i++){
for(j=0;j<3;j++){
int s=sc.nextInt();
ps[i][j]=s;
}
}
int [][]sf = new int[p][3];
for(i=0;i<p;i++){
for(j=0;j<3;j++){
sf[i][j]=ps[i][j];
}
}
for(i=0;i<3;i++){
for(j=0;j<p;j++){
for(k=(j+1);k<p;k++){
if(ps[j][i]==ps[k][i]){
sf[j][i]=0;
sf[k][i]=0;
}
}
}
}
for(i=0;i<p;i++){
for(j=1;j<3;j++){
sf[i][0]=sf[i][0]+sf[i][j];
}
System.out.printf("%d\n",sf[i][0]);
}
sc.close();
System.exit(0);
}
} | Main.java:2: error: class AOJ0577 is public, should be declared in a file named AOJ0577.java
public class AOJ0577{
^
1 error
|
s337610862 | p00500 | Java | import java.util.Scanner;
public class AOJ0577 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
while(N < 2 || 200 < N){
System.out.println("2から200までの数を入力してください。");
N = sc.nextInt();
}
int[][] num = new int[N][3];
int[] point = new int[N];
int ptswt = 0;
for(int i = 0; i < N; i++){
point[i] = 0;
}
for(int i = 0; i < N; i++){
num[i][0] = sc.nextInt();
while(num[i][0] < 1 || 100 < num[i][0]){
System.out.println("1から100までの数を入力してください。");
num[i][0] = sc.nextInt();
}
num[i][1] = sc.nextInt();
while(num[i][1] < 1 || 100 < num[i][1]){
System.out.println("1から100までの数を入力してください。");
num[i][1] = sc.nextInt();
}
num[i][2] = sc.nextInt();
while(num[i][2] < 1 || 100 < num[i][2]){
System.out.println("1から100までの数を入力してください。");
num[i][2] = sc.nextInt();
}
}
for(int j = 0; j < N; j++){ //参照するプレイヤー
for(int i = 0; i < 3; i ++){ //ゲームの回数
ptswt = 1;
for(int k = 0; k < N; k++){ //その他のプレイヤー
if(j != k){
if(num[j][i] == num[k][i]){
ptswt = 0;break;
}
}
}
if(ptswt == 1){
point[j] += num[j][i];
}
}
}
for(int i = 0; i < N; i++){
System.out.println(point[i]);
}
return;
}
} | Main.java:3: error: class AOJ0577 is public, should be declared in a file named AOJ0577.java
public class AOJ0577 {
^
1 error
|
s138115916 | p00500 | Java | package software_design;
import java.util.Scanner;
public class AOJ0577 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[][] a = new int[3][n];
for(int i=0;i<n;i++) {
for(int j=0;j<3;j++) {
a[j][i] = sc.nextInt();
}
}
int[] score = new int[n];
for(int k=0;k<3;k++) {
for(int i=0;i<n;i++) {
boolean flag = true;
for(int j=0;j<n;j++) {
if (i == j) {
continue;
}
if (a[k][i] == a[k][j]) {
flag = false;
break;
}
}
if (flag) {
score[i] += a[k][i];
}
}
}
for(int i=0;i<n;i++) {
System.out.println(score[i]);
}
}
} | Main.java:3: error: class AOJ0577 is public, should be declared in a file named AOJ0577.java
public class AOJ0577 {
^
1 error
|
s841819600 | p00500 | Java | import java.util.Scanner;
public class AOJ0577 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[][] a = new int[3][n];
for(int i=0;i<n;i++) {
for(int j=0;j<3;j++) {
a[j][i] = sc.nextInt();
}
}
int[] score = new int[n];
for(int k=0;k<3;k++) {
for(int i=0;i<n;i++) {
boolean flag = true;
for(int j=0;j<n;j++) {
if (i == j) {
continue;
}
if (a[k][i] == a[k][j]) {
flag = false;
break;
}
}
if (flag) {
score[i] += a[k][i];
}
}
}
for(int i=0;i<n;i++) {
System.out.println(score[i]);
}
}
} | Main.java:2: error: class AOJ0577 is public, should be declared in a file named AOJ0577.java
public class AOJ0577 {
^
1 error
|
s633152549 | p00500 | C | #include<stdio.h>
n[3][101];
a[200][3]
int main(void){
int N,i,j;
for(i=0;i<N;i++){
for(j=0;j<3;j++){
int k=0;
scanf("%d",&k);
n[j][k]++;
a[i][j]=k;
}
}
for(i=0;i<N;i++){
int l=0;
for(j=0;j<3;j++){
if(n[j][a[i][j]]==1){l+=a[i][j];}
}
printf("%d\n",l);
}
return 0;
} | main.c:2:1: warning: data definition has no type or storage class
2 | n[3][101];
| ^
main.c:2:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:3:10: error: expected ';' before 'int'
3 | a[200][3]
| ^
| ;
4 | int main(void){
| ~~~
main.c: In function 'main':
main.c:11:9: error: 'a' undeclared (first use in this function)
11 | a[i][j]=k;
| ^
main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
|
s547879907 | p00500 | C | #include <stdio.h>
int main() {
int i, j, n, flg;
int res[100][4] = {0};
scanf("%d", &n);
for( i = 0; i < n; i++ ) {
for( j = 0; j < 3; j++) {
scanf("%d", &res[i][j]);
}
}
for( i = 0; i < n; i++ ){
flg = 1;
for( j = 0; j < 3; j++ ) {
for ( k = 0; k < 3; k++) {
if( k != j ) {
if(res[i][j] == res[i][k]) flg = 0;
}
}
if(flg) res[i][4] += res[i][j];
}
}
return 0;
} | main.c: In function 'main':
main.c:15:31: error: 'k' undeclared (first use in this function)
15 | for ( k = 0; k < 3; k++) {
| ^
main.c:15:31: note: each undeclared identifier is reported only once for each function it appears in
|
s152663976 | p00500 | C | #include <stdio.h>
int main() {
int i, j, k, n, res, flg;
int score[200][3] = { 0 };
// 入力
scanf("%d", &n);
for ( i = 0; i < n; i++){
for ( j = 0; j < 3; j++) {
scanf("%d", &score[i][j]);
}
}
// 計算
for ( i = 0; i < n; i++) {
res = 0;
flg = 0;
for ( j = 0; j < 3; j++) {
for ( k = 0; k < n; k++) {
if(i != k) {
if(socre[i][j] == score[k][j]) flg = 1;
}
}
if(flg == 0) res += score[i][j];
}
printf("%d\n", res);
}
return 0;
} | main.c: In function 'main':
main.c:20:44: error: 'socre' undeclared (first use in this function); did you mean 'score'?
20 | if(socre[i][j] == score[k][j]) flg = 1;
| ^~~~~
| score
main.c:20:44: note: each undeclared identifier is reported only once for each function it appears in
|
s154652357 | p00500 | C | #include<stdio.h>
int main(){
int player,i,j,k,sum;
scanf("%d\n",&player);
int point[player][3];
int respoint[player][3]
for(j=0;j<player;j++){
scanf("%d %d %d\n",&point[j][0],&point[j][1],&point[j][2]);
}
for(j=0;j<player;j++){
for(i=0;i<3;i++){
for(k=0;k<player;k++){
if(point[j][i]==point[k][i] && j!=k)flag=1
}
if (flag==0) respoint[j][i]=point[j][i] else respoint[j][i]=0;
flag=0;
}
}
for(i=0;i<player;i++){
sum = respoint[i][0]+respoint[i][1]+respoint[i][2];
printf("%d\n",sum);
}
return 0;
} | main.c: In function 'main':
main.c:7:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
7 | for(j=0;j<player;j++){
| ^~~
main.c:13:37: error: 'flag' undeclared (first use in this function)
13 | if(point[j][i]==point[k][i] && j!=k)flag=1
| ^~~~
main.c:13:37: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:43: error: expected ';' before '}' token
13 | if(point[j][i]==point[k][i] && j!=k)flag=1
| ^
| ;
14 | }
| ~
main.c:15:14: error: 'respoint' undeclared (first use in this function); did you mean 'point'?
15 | if (flag==0) respoint[j][i]=point[j][i] else respoint[j][i]=0;
| ^~~~~~~~
| point
main.c:15:40: error: expected ';' before 'else'
15 | if (flag==0) respoint[j][i]=point[j][i] else respoint[j][i]=0;
| ^~~~~
| ;
|
s914333938 | p00500 | C | #include<stdio.h>
int main(){
int player,i,j,k,sum;
scanf("%d\n",&player);
int point[player][3];
int respoint[player][3]
for(j=0;j<player;j++){
scanf("%d %d %d\n",&point[j][0],&point[j][1],&point[j][2]);
}
for(j=0;j<player;j++){
for(i=0;i<3;i++){
for(k=0;k<player;k++){
if(point[j][i]==point[k][i] && j!=k)flag=1
}
if (flag==0) respoint[j][i]=point[j][i]; else respoint[j][i]=0;
flag=0;
}
}
for(i=0;i<player;i++){
sum = respoint[i][0]+respoint[i][1]+respoint[i][2];
printf("%d\n",sum);
}
return 0;
} | main.c: In function 'main':
main.c:7:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
7 | for(j=0;j<player;j++){
| ^~~
main.c:13:37: error: 'flag' undeclared (first use in this function)
13 | if(point[j][i]==point[k][i] && j!=k)flag=1
| ^~~~
main.c:13:37: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:43: error: expected ';' before '}' token
13 | if(point[j][i]==point[k][i] && j!=k)flag=1
| ^
| ;
14 | }
| ~
main.c:15:14: error: 'respoint' undeclared (first use in this function); did you mean 'point'?
15 | if (flag==0) respoint[j][i]=point[j][i]; else respoint[j][i]=0;
| ^~~~~~~~
| point
|
s910774756 | p00500 | C | #include<stdio.h>
int main(){
int player,i,j,k,sum,flag;
scanf("%d\n",&player);
int point[player][3];
int respoint[player][3]
for(j=0;j<player;j++){
scanf("%d %d %d\n",&point[j][0],&point[j][1],&point[j][2]);
}
for(j=0;j<player;j++){
for(i=0;i<3;i++){
for(k=0;k<player;k++){
if(point[j][i]==point[k][i] && j!=k)flag=1
}
if (flag==0) respoint[j][i]=point[j][i]; else respoint[j][i]=0;
flag=0;
}
}
for(i=0;i<player;i++){
sum = respoint[i][0]+respoint[i][1]+respoint[i][2];
printf("%d\n",sum);
}
return 0;
} | main.c: In function 'main':
main.c:7:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
7 | for(j=0;j<player;j++){
| ^~~
main.c:13:43: error: expected ';' before '}' token
13 | if(point[j][i]==point[k][i] && j!=k)flag=1
| ^
| ;
14 | }
| ~
main.c:15:14: error: 'respoint' undeclared (first use in this function); did you mean 'point'?
15 | if (flag==0) respoint[j][i]=point[j][i]; else respoint[j][i]=0;
| ^~~~~~~~
| point
main.c:15:14: note: each undeclared identifier is reported only once for each function it appears in
|
s732109063 | p00500 | C | #include<stdio.h>
int main(){
int player,i,j,k,sum,flag;
scanf("%d\n",&player);
int point[player][3];
int respoint[player][3]
for(j=0;j<player;j++){
scanf("%d %d %d\n",&point[j][0],&point[j][1],&point[j][2]);
}
for(j=0;j<player;j++){
for(i=0;i<3;i++){
for(k=0;k<player;k++){
if(point[j][i]==point[k][i] && j!=k)flag=1;
}
if (flag==0) respoint[j][i]=point[j][i]; else respoint[j][i]=0;
flag=0;
}
}
for(i=0;i<player;i++){
sum = respoint[i][0]+respoint[i][1]+respoint[i][2];
printf("%d\n",sum);
}
return 0;
} | main.c: In function 'main':
main.c:7:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
7 | for(j=0;j<player;j++){
| ^~~
main.c:15:14: error: 'respoint' undeclared (first use in this function); did you mean 'point'?
15 | if (flag==0) respoint[j][i]=point[j][i]; else respoint[j][i]=0;
| ^~~~~~~~
| point
main.c:15:14: note: each undeclared identifier is reported only once for each function it appears in
|
s304296020 | p00500 | C | #include<stdio.h>
int main(){
int player,i,j,k,sum,flag;
scanf("%d\n",&player);
int point[player][3];
int respoint[player][3]
for(j=0;j<player;j++){
scanf("%d %d %d\n",&point[j][0],&point[j][1],&point[j][2]);
}
for(j=0;j<player;j++){
for(i=0;i<3;i++){
for(k=0;k<player;k++){
if(point[j][i]==point[k][i] && j!=k)flag=1;
}
if (flag==0) respoint[j][i]=point[j][i]; else respoint[j][i]=0;
flag=0;
}
}
for(i=0;i<player;i++){
sum = respoint[i][0]+respoint[i][1]+respoint[i][2];
printf("%d\n",sum);
}
return 0;
} | main.c: In function 'main':
main.c:7:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
7 | for(j=0;j<player;j++){
| ^~~
main.c:15:14: error: 'respoint' undeclared (first use in this function); did you mean 'point'?
15 | if (flag==0) respoint[j][i]=point[j][i]; else respoint[j][i]=0;
| ^~~~~~~~
| point
main.c:15:14: note: each undeclared identifier is reported only once for each function it appears in
|
s513759603 | p00500 | C | #include<stdio.h>
int main(){
int player,i,j,k,sum,flag=0;
scanf("%d\n",&player);
int point[player][3];
int respoint[player][3]
for(j=0;j<player;j++){
scanf("%d %d %d\n",&point[j][0],&point[j][1],&point[j][2]);
}
for(j=0;j<player;j++){
for(i=0;i<3;i++){
for(k=0;k<player;k++){
if(point[j][i]==point[k][i] && j!=k)flag=1;
}
if (flag==0) respoint[j][i]=point[j][i]; else respoint[j][i]=0;
flag=0;
}
}
for(i=0;i<player;i++){
sum = respoint[i][0]+respoint[i][1]+respoint[i][2];
printf("%d\n",sum);
}
return 0;
} | main.c: In function 'main':
main.c:7:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
7 | for(j=0;j<player;j++){
| ^~~
main.c:15:14: error: 'respoint' undeclared (first use in this function); did you mean 'point'?
15 | if (flag==0) respoint[j][i]=point[j][i]; else respoint[j][i]=0;
| ^~~~~~~~
| point
main.c:15:14: note: each undeclared identifier is reported only once for each function it appears in
|
s142149162 | p00500 | C | #include<stdio.h>
int main(){
int player,i,j,k,sum,flag=0;
scanf("%d\n",&player);
int point[player][3];
int respoint[player][3]
for(j=0;j<player;j++){
scanf("%d %d %d\n",&point[j][0],&point[j][1],&point[j][2]);
}
for(j=0;j<player;j++){
for(i=0;i<3;i++){
for(k=0;k<player;k++){
if(point[j][i]==point[k][i] && j!=k)flag=1;
}
if (flag==0) respoint[j][i]=point[j][i];else respoint[j][i]=0;
flag=0;
}
}
for(i=0;i<player;i++){
sum = respoint[i][0]+respoint[i][1]+respoint[i][2];
printf("%d\n",sum);
}
return 0;
} | main.c: In function 'main':
main.c:7:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
7 | for(j=0;j<player;j++){
| ^~~
main.c:15:14: error: 'respoint' undeclared (first use in this function); did you mean 'point'?
15 | if (flag==0) respoint[j][i]=point[j][i];else respoint[j][i]=0;
| ^~~~~~~~
| point
main.c:15:14: note: each undeclared identifier is reported only once for each function it appears in
|
s686831708 | p00500 | C | /*??°???????????????(Unique number)*/
#include <stdio.h>
int main(){
int i, k, l, x, N;
int data[200][3];
int sum[200];
scanf("%d", &N);
for (i = 0; i < N; i++) {
for (k = 0; k < 3; k++) {
scanf("%d", &data[i][k]);
}
}
for (i = 0; i < N; i++) {
for (k = 0; k < 3; k++) {
for (l = 0; l < 1000; l++) {
x = 0;
if (data[i][k] == data[i][l] && k != l) {
x++;
}
}
if (x > 0) {
data[k] += 0;
} else {
data[k] += data[i][k];
}
}
}
for (i = 0; i < 1000; i++) {
printf("%d\n", data[i]);
}
return 0;
} | main.c: In function 'main':
main.c:22:17: error: assignment to expression with array type
22 | data[k] += 0;
| ^~
main.c:24:17: error: assignment to expression with array type
24 | data[k] += data[i][k];
| ^~
|
s898426471 | p00500 | C | #include <stdio.h>
int main()
{
int n, n[101][3], sum[101];
int i, j, k;
scanf("%d"&n);
for (i = 0;i < n;i++) {
scanf("%d%d%d", &n[i][0], &n[i][1], &n[i][2]);
}
for (k = 0;k < 3;k++) {
for (i = 0;i < n;i++) {
for (j = 0;j < n;j++) {
if (n[i][k] == n[j][k]) { sum[i] += 0;break; };
else???sum[i] += n[i][k];
}
}
}
for (i = 0;i < n;i++)
printf("%d", sum[i]);
return 0;
} | main.c: In function 'main':
main.c:5:16: error: conflicting types for 'n'; have 'int[101][3]'
5 | int n, n[101][3], sum[101];
| ^
main.c:5:13: note: previous declaration of 'n' with type 'int'
5 | int n, n[101][3], sum[101];
| ^
main.c:16:33: error: 'else' without a previous 'if'
16 | else???sum[i] += n[i][k];
| ^~~~
main.c:16:37: error: expected expression before '?' token
16 | else???sum[i] += n[i][k];
| ^
|
s243904084 | p00500 | C | include <stdio.h>
int main()
{
int n, N[201][3], sum[201] = { 0 }, cnt[201][3];
int i, j, k;
scanf("%d", &n);
for (i = 0;i < n;i++) {
scanf("%d%d%d", &N[i][0], &N[i][1], &N[i][2]);
cnt[i][0] = 0;cnt[i][2] = 0;cnt[i][1]=0;
}
for(k=0;k<3;k++){
for (i = 0;i < n;i++) {
for (j = 0;j < n;j++) {
if (N[i][k] == N[j][k])cnt[i][k] += 1;
}
if (cnt[i][k]>1)sum[i] += 0;
else sum[i] += N[i][k];
}
}
for (i = 0;i < n;i++) {
printf("%d\n", sum[i]);
}
return 0;
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s448612058 | p00500 | C | #include <stdio.h>
int main() {
int N;
int i,j,k;
int a[100][3];
int d[100][3];
scanf("%d",&N);
for(i=0;i<N;++i){
scanf("%d%d%d",&a[i][0],&a[i][1],&a[i][2]);
d[i][0]=a[i][0]; d[i][1]=a[i][1]; d[i][2]=a[i][2];
}
for(i=0;i<3;++i){
for(j=0;j<N;++j){
for(k=0;k<N;++k){
if(j==k)continue;
if(a[k][i]==a[j][i]) {
d[k][i]=0; d[j][i];
}
}
}
}
for(i=0;i<N;i++)テ」ツ??rintf("%d\n",d[i][0]+d[i][1]+d[i][2]);
return 0;
} | main.c: In function 'main':
main.c:23:23: error: stray '\343' in program
23 | for(i=0;i<N;i++)<U+30C6><U+300D><U+30C4>??rintf("%d\n",d[i][0]+d[i][1]+d[i][2]);
| ^~~~~~~~
main.c:23:21: error: '\U000030c6' undeclared (first use in this function)
23 | for(i=0;i<N;i++)テ」ツ??rintf("%d\n",d[i][0]+d[i][1]+d[i][2]);
| ^~
main.c:23:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:23: error: expected ';' before '\U000030c4'
23 | for(i=0;i<N;i++)テ」ツ??rintf("%d\n",d[i][0]+d[i][1]+d[i][2]);
| ^ ~~
| ;
|
s036275181 | p00500 | C | include<stdio.h>
int main(){
int i,j,k,n,c[200][3],a;
for(i=0;i<n;i++){
for(j=0;j<=2;i++){
cin>>c[i][j];
for(j=0;j<=2;j++){
for(i=0;i<n;i++){
a=0;
for(k=0;k<=n;k++){
if(c[i][j]==c[k][j]){
c[k][j]=0;
a=1;
}
}
if(a==1){
c[i][j]=0;
}
}
for(i=0;i<n;i++){
printf("%d",c[i][0]+c[i][1]+c[i][2]);
}
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s458320233 | p00500 | C | include<stdio.h>
int main(){
int i,j,k,n,c[200][3],a;
for(i=0;i<n;i++){
for(j=0;j<=2;i++){
cin>>c[i][j];
for(j=0;j<=2;j++){
for(i=0;i<n;i++){
a=0;
for(k=0;k<=n;k++){
if(c[i][j]==c[k][j]){
c[k][j]=0;
a=1;
}
}
if(a==1){
c[i][j]=0;
}
}
for(i=0;i<n;i++){
printf("%d",c[i][0]+c[i][1]+c[i][2]);
}
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s975329372 | p00500 | C | #include<stdio.h>
int main(){
int i,j,k,n,c[200][3],a;
for(i=0;i<n;i++){
for(j=0;j<=2;i++){
cin>>c[i][j];
for(j=0;j<=2;j++){
for(i=0;i<n;i++){
a=0;
for(k=0;k<=n;k++){
if(c[i][j]==c[k][j]){
c[k][j]=0;
a=1;
}
}
if(a==1){
c[i][j]=0;
}
}
for(i=0;i<n;i++){
printf("%d",c[i][0]+c[i][1]+c[i][2]);
}
return 0;
} | main.c: In function 'main':
main.c:6:25: error: 'cin' undeclared (first use in this function)
6 | cin>>c[i][j];
| ^~~
main.c:6:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:1: error: expected declaration or statement at end of input
24 | }
| ^
main.c:24:1: error: expected declaration or statement at end of input
main.c:24:1: error: expected declaration or statement at end of input
|
s462495777 | p00500 | C | #include<stdio.h>
int main(){
int i,j,k,n,c[200][3],a;
for(i=0;i<n;i++){
for(j=0;j<=2;i++){
scanf("%d",c[i][j]);
for(j=0;j<=2;j++){
for(i=0;i<n;i++){
a=0;
for(k=0;k<=n;k++){
if(c[i][j]==c[k][j]){
c[k][j]=0;
a=1;
}
}
if(a==1){
c[i][j]=0;
}
}
for(i=0;i<n;i++){
printf("%d",c[i][0]+c[i][1]+c[i][2]);
}
return 0;
} | main.c: In function 'main':
main.c:24:1: error: expected declaration or statement at end of input
24 | }
| ^
main.c:24:1: error: expected declaration or statement at end of input
main.c:24:1: error: expected declaration or statement at end of input
|
s485576075 | p00500 | C | #include<stdio.h>
int main(){
int i,j,k,n,c[200][3],a;
for(i=0;i<n;i++){
for(j=0;j<=2;i++){
scanf("%d",c[i][j]);
for(j=0;j<=2;j++){
for(i=0;i<n;i++){
a=0;
for(k=0;k<=n;k++){
if(c[i][j]==c[k][j]){
c[k][j]=0;
a=1;
}
}
if(a==1){
c[i][j]=0;
}
}
}
for(i=0;i<n;i++){
printf("%d",c[i][0]+c[i][1]+c[i][2]);
}
return 0;
} | main.c: In function 'main':
main.c:25:1: error: expected declaration or statement at end of input
25 | }
| ^
main.c:25:1: error: expected declaration or statement at end of input
|
s127752362 | p00500 | C | #include <stdio.h>
int main(){
int N,k,i,g,j;
scanf("%d",&N);
int a[3][1000],n[1000]={0};
for(i=0;i<N;i++){
?????? scanf("%d %d %d\n",&a[0][i],&a[1][i],&a[2][i]);
}
for(i=0;i<N;i++){
?????????????? g=0;
for(j=0;j<3;j++){
?????????????? for(k=i+1;k<N+1;k++){
?????????????????????? if(a[j][i]==a[j][k])g=1;}
?????????????? if(g!=1)n[i]+=a[j][i];
????
?????????? }}
for(i=0;i<N;i++){
?????? printf("%d\n",n[i]);
}
return0;
}
| main.c: In function 'main':
main.c:8:1: error: expected expression before '?' token
8 | ?????? scanf("%d %d %d\n",&a[0][i],&a[1][i],&a[2][i]);
| ^
main.c:12:1: error: expected expression before '?' token
12 | ?????????????? g=0;
| ^
main.c:14:1: error: expected expression before '?' token
14 | ?????????????? for(k=i+1;k<N+1;k++){
| ^
main.c:18:1: error: expected expression before '?' token
18 | ????
| ^
main.c:24:1: error: expected expression before '?' token
24 | ?????? printf("%d\n",n[i]);
| ^
main.c:28:1: error: 'return0' undeclared (first use in this function)
28 | return0;
| ^~~~~~~
main.c:28:1: note: each undeclared identifier is reported only once for each function it appears in
|
s638354750 | p00500 | C | #include <stdio.h>
int main(){
int N,k,i,g,j;
scanf("%d",&N);
int a[1000][3],n[1000]={0};
for(i=0;i<N;i++){
?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
}
for(i=0;i<N;i++){
?????????????? g=0;
for(j=0;j<3;j++){
?????????????? for(k=i+1;k<N+1;k++){
?????????????????????? if(a[i][j]==a[k][j])g=1;}
?????????????? if(g!=1)n[i]+=a[i][j];
????
?????????? }}
for(i=0;i<N;i++){
?????? printf("%d\n",n[i]);
}
return0;
}
| main.c: In function 'main':
main.c:8:1: error: expected expression before '?' token
8 | ?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
| ^
main.c:12:1: error: expected expression before '?' token
12 | ?????????????? g=0;
| ^
main.c:14:1: error: expected expression before '?' token
14 | ?????????????? for(k=i+1;k<N+1;k++){
| ^
main.c:18:1: error: expected expression before '?' token
18 | ????
| ^
main.c:24:1: error: expected expression before '?' token
24 | ?????? printf("%d\n",n[i]);
| ^
main.c:28:1: error: 'return0' undeclared (first use in this function)
28 | return0;
| ^~~~~~~
main.c:28:1: note: each undeclared identifier is reported only once for each function it appears in
|
s431111310 | p00500 | C | #include <stdio.h>
int main(){
int N,k,i,g,j;
scanf("%d",&N);
int a[1000][3],n[1000]={0};
for(i=0;i<N;i++){
?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
}
for(i=0;i<N;i++){
?????????????? g=0;
for(j=0;j<3;j++){
?????????????? for(k=i+1;k<N+1;k++){
?????????????????????? if(a[i][j]==a[k][j])g=1;}
?????????????? if(g!=1)n[i]+=a[i][j];
????
?????????? }}
for(i=0;i<N;i++){
?????? printf("%d\n",n[i]);
}
return 0;
}
| main.c: In function 'main':
main.c:8:1: error: expected expression before '?' token
8 | ?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
| ^
main.c:12:1: error: expected expression before '?' token
12 | ?????????????? g=0;
| ^
main.c:14:1: error: expected expression before '?' token
14 | ?????????????? for(k=i+1;k<N+1;k++){
| ^
main.c:18:1: error: expected expression before '?' token
18 | ????
| ^
main.c:24:1: error: expected expression before '?' token
24 | ?????? printf("%d\n",n[i]);
| ^
|
s372941116 | p00500 | C | #include <stdio.h>
int main(){
int N,k,i,g,j;
scanf("%d",&N);
int a[1000][3],n[1000]={0};
for(i=0;i<N;i++){
?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
}
for(i=0;i<N;i++){
?????????????? g=0;
for(j=0;j<3;j++){
?????????????? for(k=i;k<N;k++){
?????????????????????? if(i!=k&&a[i][j]==a[k][j])g=1;}
?????????????? if(g!=1)n[i]+=a[i][j];
????
?????????? }}
for(i=0;i<N;i++){
?????? printf("%d\n",n[i]);
}
return 0;
}
| main.c: In function 'main':
main.c:8:1: error: expected expression before '?' token
8 | ?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
| ^
main.c:12:1: error: expected expression before '?' token
12 | ?????????????? g=0;
| ^
main.c:14:1: error: expected expression before '?' token
14 | ?????????????? for(k=i;k<N;k++){
| ^
main.c:18:1: error: expected expression before '?' token
18 | ????
| ^
main.c:24:1: error: expected expression before '?' token
24 | ?????? printf("%d\n",n[i]);
| ^
|
s196211899 | p00500 | C | #include <stdio.h>
int main(){
int N,k,i,g,j,a[1000][3],n[1000]={0};
scanf("%d",&N);
for(i=0;i<N;i++){
?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
}
for(i=0;i<N;i++){
?????????????? g=0;
for(j=0;j<3;j++){
?????????????? for(k=i;k<N;k++){
?????????????????????? if(i!=k&&a[i][j]==a[k][j])g=1;}
?????????????? if(g!=1)n[i]+=a[i][j];
????
?????????? }}
for(i=0;i<N;i++){
?????? printf("%d\n",n[i]);
}
return 0;
}
| main.c: In function 'main':
main.c:9:1: error: expected expression before '?' token
9 | ?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
| ^
main.c:13:1: error: expected expression before '?' token
13 | ?????????????? g=0;
| ^
main.c:15:1: error: expected expression before '?' token
15 | ?????????????? for(k=i;k<N;k++){
| ^
main.c:19:1: error: expected expression before '?' token
19 | ????
| ^
main.c:25:1: error: expected expression before '?' token
25 | ?????? printf("%d\n",n[i]);
| ^
|
s405755390 | p00500 | C | #include <stdio.h>
int main(){
int N,k,i,g,j,a[1000][3],n[1000]={0};
scanf("%d",&N);
for(i=0;i<N;i++){
?????? scanf("%d %d %d/n",&a[i][0],&a[i][1],&a[i][2]);
}
for(i=0;i<N;i++){
?????????????? g=0;
for(j=0;j<3;j++){
?????????????? for(k=i;k<N;k++){
?????????????????????? if(i!=k&&a[i][j]==a[k][j])g=1;}
?????????????? if(g!=1)n[i]+=a[i][j];
????
?????????? }}
for(i=0;i<N;i++){
?????? printf("%d\n",n[i]);
}
return 0;
}
| main.c: In function 'main':
main.c:9:1: error: expected expression before '?' token
9 | ?????? scanf("%d %d %d/n",&a[i][0],&a[i][1],&a[i][2]);
| ^
main.c:13:1: error: expected expression before '?' token
13 | ?????????????? g=0;
| ^
main.c:15:1: error: expected expression before '?' token
15 | ?????????????? for(k=i;k<N;k++){
| ^
main.c:19:1: error: expected expression before '?' token
19 | ????
| ^
main.c:25:1: error: expected expression before '?' token
25 | ?????? printf("%d\n",n[i]);
| ^
|
s182961783 | p00500 | C | #include <stdio.h>
int main(){
int N,k,i,g,j,a[1000][3],n[1000]={0};
scanf("%d",&N);
for(i=0;i<N;i++){
?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
}
for(i=0;i<N;i++){
?????????????? g=0;
for(j=0;j<3;j++){
?????????????? for(k=i;k<N;k++){
?????????????????????? if(i!=k&&a[i][j]==a[k][j])g=1;}
?????????????? if(g!=1)n[i]+=a[i][j];
????
?????????? }}
for(i=0;i<N;i++){
?????? printf("%d\n",n[i]);
}
return 0;
}
| main.c: In function 'main':
main.c:9:1: error: expected expression before '?' token
9 | ?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
| ^
main.c:13:1: error: expected expression before '?' token
13 | ?????????????? g=0;
| ^
main.c:15:1: error: expected expression before '?' token
15 | ?????????????? for(k=i;k<N;k++){
| ^
main.c:19:1: error: expected expression before '?' token
19 | ????
| ^
main.c:25:1: error: expected expression before '?' token
25 | ?????? printf("%d\n",n[i]);
| ^
|
s065810487 | p00500 | C | #include <stdio.h>
int main(){
int N,k,i,g,j,a[1000][3],n[1000]={0};
scanf("%d",&N);
for(i=0;i<N;i++){
?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
}
for(i=0;i<N;i++){
??????????????
for(j=0;j<3;j++){
g=0;
?????????????? for(k=i;k<N;k++){
?????????????????????? if(i!=k&&a[i][j]==a[k][j])g=1;}
?????????????? if(g!=1)n[i]+=a[i][j];
????
?????????? }}
for(i=0;i<N;i++){
?????? printf("%d\n",n[i]);
}
return 0;
}
| main.c: In function 'main':
main.c:9:1: error: expected expression before '?' token
9 | ?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
| ^
main.c:13:1: error: expected expression before '?' token
13 | ??????????????
| ^
main.c:26:1: error: expected expression before '?' token
26 | ?????? printf("%d\n",n[i]);
| ^
|
s862362348 | p00500 | C | #include <stdio.h>
int main(){
int n,k,i,g,j,a[1000][3],s[1000]={0};
scanf("%d",&n);
for(i=0;i<n;i++){
?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
}
for(i=0;i<n;i++){
??????????????
for(j=0;j<3;j++){
g=0;
?????????????? for(k=i;k<n;k++){
?????????????????????? if(i!=k&&a[i][j]==a[k][j])g=1;}
?????????????? if(g!=1)s[i]+=a[i][j];
????
?????????? }}
for(i=0;i<n;i++){
?????? printf("%d\n",s[i]);
}
return 0;
}
| main.c: In function 'main':
main.c:9:1: error: expected expression before '?' token
9 | ?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
| ^
main.c:13:1: error: expected expression before '?' token
13 | ??????????????
| ^
main.c:26:1: error: expected expression before '?' token
26 | ?????? printf("%d\n",s[i]);
| ^
|
s927387857 | p00500 | C | #include <stdio.h>
int main(){
int n,k,i,g,j,a[1000][3],s[1000]={0};
scanf("%d",&n);
for(i=0;i<n;i++){
?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
}
for(i=0;i<n;i++){
??????????????
for(j=0;j<3;j++){
g=0;
?????????????? for(k=i;k<n;k++){
?????????????????????? if(i!=k&&a[i][j]==a[k][j])g=1;}
?????????????? if(g!=1)s[i]+=a[i][j];
????
?????????? }}
for(i=0;i<n;i++){
?????? printf("%d\n",s[i]);
}
return 0;
}
| main.c: In function 'main':
main.c:9:1: error: expected expression before '?' token
9 | ?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);
| ^
main.c:13:1: error: expected expression before '?' token
13 | ??????????????
| ^
main.c:26:1: error: expected expression before '?' token
26 | ?????? printf("%d\n",s[i]);
| ^
|
s417250334 | p00500 | C | #include <stdio.h>
int main(){
int n,k,i,g,j,a[1000][3],s[1000]={0};
scanf("%d",&n);
for(i=0;i<n;i++){
?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);}
for(i=0;i<n;i++){
??????????????
for(j=0;j<3;j++){
g=0;
?????????????? for(k=0;k<n;k++){
?????????????????????? if(i!=k&&a[i][j]==a[k][j])g=1;}
?????????????? if(g!=1)s[i]+=a[i][j];}}
for(i=0;i<n;i++){
?????? printf("%d\n",s[i]);
}
return 0;
} | main.c: In function 'main':
main.c:9:1: error: expected expression before '?' token
9 | ?????? scanf("%d %d %d\n",&a[i][0],&a[i][1],&a[i][2]);}
| ^
main.c:12:1: error: expected expression before '?' token
12 | ??????????????
| ^
main.c:22:1: error: expected expression before '?' token
22 | ?????? printf("%d\n",s[i]);
| ^
|
s809367561 | p00500 | C | include<stdio.h>
#include<math.h>
int main(void)
{
int N;//人数
int i;//loop
int j;//loop
int k;//loop
int I[101][4];//NumberCheck
scanf ("%d",&N);
int P[N+1][4];//point
int Pv[N+1];//getPoint
for (j=1;j<=3;j++){
for (i=1;i<=100 ; i++){
I[i][j]=0;
}
}
for (i=1; i<=N;i++){
// for (j=0; j<3;j++){
scanf("%d%d%d",&P[i][1],&P[i][2],&P[i][3]); //&P[i][j]);
Pv[i]=0;
// printf("%d\n",I[3][1]);
// }
}
for (j=1;j<=3;j++){
for (i=1;i<=100 ; i++){
for (k=1;k<=N;k++){
if (P[k][j]==i){
I[i][j]++;
}
}
}
}
for (j=1;j<=3;j++){
for(i=1;i<=N ; i++){
if (I[P[i][j]][j]==1){
Pv[i] += P[i][j];
}
}
}
for(i=1;i<=N;i++){
printf("%d\n",Pv[i]);
}
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
main.c: In function 'main':
main.c:11:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
11 | scanf ("%d",&N);
| ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
2 | #include<math.h>
+++ |+#include <stdio.h>
3 |
main.c:11:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
11 | scanf ("%d",&N);
| ^~~~~
main.c:11:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:44:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
44 | printf("%d\n",Pv[i]);
| ^~~~~~
main.c:44:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:44:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:44:5: note: include '<stdio.h>' or provide a declaration of 'printf'
|
s767496239 | p00500 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
int main(void)
{
int N=0;
int out1[101]={0};int out2[101]={0};int out3[101]={0};
int a[660]={0};int a1[660]={0};int a2[660]={0};
int all[220]={0};
scanf("%d",&N);
for(int i=1;i<=N;i++){
scanf("%d %d %d",a[i],a1[i],a2[i]);
if(out1[a[i]]<0){out1=-2;}
else{out1[a[i]]=-1;}
if(out2[a1[i]]<0){out2=-2;}
else{out2[a1[i]]=-1;}
if(out3[a2[i]]<0){out3=-2;}
else{out3[a2[i]]=-1;}
}
for(int i=1;i<=N;i++)
{
if(out1[a[i]]!=-2)
{
all[i]+=a[i];
}
if(out2[a1[i]]!=-2)
{
all[i]+=a1[i];
}
if(out3[a2[i]]!=-2)
{
all[i]+=a2[i];
}
printf("%d\n",all[i]);
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:38: error: incompatible types in assignment of 'int' to 'int [101]'
13 | if(out1[a[i]]<0){out1=-2;}
| ~~~~^~~
a.cc:15:39: error: incompatible types in assignment of 'int' to 'int [101]'
15 | if(out2[a1[i]]<0){out2=-2;}
| ~~~~^~~
a.cc:17:39: error: incompatible types in assignment of 'int' to 'int [101]'
17 | if(out3[a2[i]]<0){out3=-2;}
| ~~~~^~~
|
s787905937 | p00500 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
int main(void)
{
int N=0;
int out1[101]={0};int out2[101]={0};int out3[101]={0};
int a[660]={0};int a1[660]={0};int a2[660]={0};
int all[220]={0};
scanf("%d",&N);
for(int i=1;i<=N;i++){
scanf("%d %d %d",&a[i],&a1[i],&a2[i]);
if(out1[a[i]]<0){out1=-2;}
else{out1[a[i]]=-1;}
if(out2[a1[i]]<0){out2=-2;}
else{out2[a1[i]]=-1;}
if(out3[a2[i]]<0){out3=-2;}
else{out3[a2[i]]=-1;}
}
for(int i=1;i<=N;i++)
{
if(out1[a[i]]!=-2)
{
all[i]+=a[i];
}
if(out2[a1[i]]!=-2)
{
all[i]+=a1[i];
}
if(out3[a2[i]]!=-2)
{
all[i]+=a2[i];
}
printf("%d\n",all[i]);
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:38: error: incompatible types in assignment of 'int' to 'int [101]'
13 | if(out1[a[i]]<0){out1=-2;}
| ~~~~^~~
a.cc:15:39: error: incompatible types in assignment of 'int' to 'int [101]'
15 | if(out2[a1[i]]<0){out2=-2;}
| ~~~~^~~
a.cc:17:39: error: incompatible types in assignment of 'int' to 'int [101]'
17 | if(out3[a2[i]]<0){out3=-2;}
| ~~~~^~~
|
s247014507 | p00500 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int n;
cin >> n;
vector<vector<int>> v(3, vector<int>(n));
for (int i = 0; i < n; i++)
for (int j = 0; j < 3; j++)
cin >> v[j][i];
for (int i = 0; i < n; i++) {
int ans = 0;
for (int j = 0; j < 3; j++) {
if (count(v[j].count(), v[j].end(), v[j][i]) == 1)
ans += v[j][i];
}
cout << ans << endl;
}
}
| a.cc: In function 'int main()':
a.cc:16:28: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'class std::vector<int>'} has no member named 'count'
16 | if (count(v[j].count(), v[j].end(), v[j][i]) == 1)
| ^~~~~
|
s695896918 | p00500 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int n;
cin >> n;
vector<vector<int> > v(3, vector<int>(n));
for (int i = 0; i < n; i++)
for (int j = 0; j < 3; j++)
cin >> v[j][i];
for (int i = 0; i < n; i++) {
int ans = 0;
for (int j = 0; j < 3; j++) {
if (count(v[j].count(), v[j].end(), v[j][i]) == 1)
ans += v[j][i];
}
cout << ans << endl;
}
}
| a.cc: In function 'int main()':
a.cc:16:28: error: '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'class std::vector<int>'} has no member named 'count'
16 | if (count(v[j].count(), v[j].end(), v[j][i]) == 1)
| ^~~~~
|
s794608124 | p00500 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#rep(i,n) for(int i=0;i<n;i++)
#all(co)co.begin(),co.end()
int main()
{
int n; cin >> n;
vector<vector<int>> table(3, vector<int>(n));
vector<int> score(n);
rep(i,n)rep(j,3)cin>>table[j][i];
rep(j,3)rep(i,n)
{
if(count(all(table[j]), table[j][i]) == 1)score[i]+=table[j][i];
}
rep(i,n)cout>>score[i]>>endl;
return 0;
} | a.cc:5:2: error: invalid preprocessing directive #rep
5 | #rep(i,n) for(int i=0;i<n;i++)
| ^~~
a.cc:6:2: error: invalid preprocessing directive #all
6 | #all(co)co.begin(),co.end()
| ^~~
a.cc: In function 'int main()':
a.cc:12:7: error: 'i' was not declared in this scope
12 | rep(i,n)rep(j,3)cin>>table[j][i];
| ^
a.cc:12:3: error: 'rep' was not declared in this scope
12 | rep(i,n)rep(j,3)cin>>table[j][i];
| ^~~
a.cc:13:7: error: 'j' was not declared in this scope
13 | rep(j,3)rep(i,n)
| ^
|
s802254038 | p00500 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define all(co)co.begin(),co.end()
int main()
{
int n; cin >> n;
vector<vector<int>> table(3, vector<int>(n));
vector<int> score(n);
rep(i,n)rep(j,3)cin>>table[j][i];
rep(j,3)rep(i,n)
{
if(count(all(table[j]), table[j][i]) == 1)score[i]+=table[j][i];
}
rep(i,n)cout>>score[i]>>endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:17:15: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
17 | rep(i,n)cout>>score[i]>>endl;
a.cc:17:15: note: candidate: 'operator>>(int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int})' (built-in)
a.cc:17:15: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:17:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | rep(i,n)cout>>score[i]>>endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
17 | rep(i,n)cout>>score[i]>>endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:17:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | rep(i,n)cout>>score[i]>>endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:17:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | rep(i,n)cout>>score[i]>>endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:17:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | rep(i,n)cout>>score[i]>>endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:17:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | rep(i,n)cout>>score[i]>>endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:17:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | rep(i,n)cout>>score[i]>>endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:17:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | rep(i,n)cout>>score[i]>>endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int&]':
a.cc:17:24: required from here
17 | rep(i,n)cout>>score[i]>>endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
|
s081114475 | p00500 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define all(co)co.begin(),co.end()
int main()
{
int n; cin >> n;
vector<vector<int>> table(3, vector<int>(n));
vector<int> score(n);
rep(i,n)rep(j,3)cin>>table[j][i];
rep(j,3)rep(i,n)
{
if(count(all(table[j]), table[j][i]) == 1)score[i]+=table[j][i];
}
rep(i,n)cout>>score[i]>>endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:17:15: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
17 | rep(i,n)cout>>score[i]>>endl;
a.cc:17:15: note: candidate: 'operator>>(int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int})' (built-in)
a.cc:17:15: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:17:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | rep(i,n)cout>>score[i]>>endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:17:11: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
17 | rep(i,n)cout>>score[i]>>endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:17:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | rep(i,n)cout>>score[i]>>endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:17:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | rep(i,n)cout>>score[i]>>endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:17:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | rep(i,n)cout>>score[i]>>endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:17:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
17 | rep(i,n)cout>>score[i]>>endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:17:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | rep(i,n)cout>>score[i]>>endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:17:24: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
17 | rep(i,n)cout>>score[i]>>endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int&]':
a.cc:17:24: required from here
17 | rep(i,n)cout>>score[i]>>endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
|
s751796626 | p00500 | C++ | a | a.cc:1:1: error: 'a' does not name a type
1 | a
| ^
|
s046374299 | p00500 | C++ | #include<stdio.h>
int zisaku(int data[][3], int N, int i, int k, int a){
int j, cnt = 0, result = 0;
for(j = 1; j <= N; j++){
if(i == j)continue;
if(a == data[j][k])cnt += 1;
}
if(cnt == 0)result += a;
return result;
}
int main(){
int N, i, k, j, l, a;
scanf("%d", &N);
int data[200][3];
for(i = 1; i <= N; i++){
for(k = 1; k <= 3; k++){
scanf("%d", &data[i][k]);
}
}
for(i = 1; i <= N; i++){
for(k = 1; k <= 3; k++){
a = data[i][k];
data[i][0] += zisaku(data, N, i, k);
}
}
for(i = 1; i <= N; i++){
printf("%d\n", data[i][0]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:25:55: error: too few arguments to function 'int zisaku(int (*)[3], int, int, int, int)'
25 | data[i][0] += zisaku(data, N, i, k);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:3:9: note: declared here
3 | int zisaku(int data[][3], int N, int i, int k, int a){
| ^~~~~~
|
s259662757 | p00500 | C++ | #include<stdio.h>
int zisaku(int data[][], int N, int i, int k, int a){
int j, cnt = 0, result = 0;
for(j = 1; j <= N; j++){
if(i == j)continue;
if(a == data[j][k])cnt += 1;
}
if(cnt == 0)result += a;
return result;
}
int main(){
int N, i, k, j, l, a;
scanf("%d", &N);
int data[200][3];
for(i = 1; i <= N; i++){
for(k = 1; k <= 3; k++){
scanf("%d", &data[i][k]);
}
}
for(i = 1; i <= N; i++){
for(k = 1; k <= 3; k++){
a = data[i][k];
data[i][0] += zisaku(data, N, i, k, a);
}
}
for(i = 1; i <= N; i++){
printf("%d\n", data[i][0]);
}
return 0;
} | a.cc:3:25: error: declaration of 'data' as multidimensional array must have bounds for all dimensions except the first
3 | int zisaku(int data[][], int N, int i, int k, int a){
| ^~~~
a.cc:3:33: error: expected ')' before ',' token
3 | int zisaku(int data[][], int N, int i, int k, int a){
| ~ ^
| )
a.cc:3:41: error: expected unqualified-id before 'int'
3 | int zisaku(int data[][], int N, int i, int k, int a){
| ^~~
|
s029905636 | p00500 | C++ | int main(){
int N, i, k, cnt = 0, l, a, data[200][3];
scanf("%d", &N);
for(i = 1; i <= N; i++){
for(k = 1; k <= 3; k++){
scanf("%d", &data[i][k]);
}
}
for(k = 1; k <= 3; k++){
for(i = 1; i <= N; i++){
a = data[i][k];
for(l = 1; l <= N; l++){
if(i == l)continue;
if(a == data[l][k]){
cnt += 1;
break;
}
if(cnt == 0)data[i][0] += a;
}
}
}
for(i = 1; i <= N; i++){
printf("%d\n", data[i][0]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
3 | scanf("%d", &N);
| ^~~~~
a.cc:23:17: error: 'printf' was not declared in this scope
23 | printf("%d\n", data[i][0]);
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | int main(){
|
s171786791 | p00500 | C++ | int main(){
int N, i, k, cnt = 0, l, a, data[200][3];
scanf("%d\n", &N);
for(i = 1; i <= N; i++){
for(k = 1; k <= 3; k++){
scanf("%d", &data[i][k]);
}
}
for(k = 1; k <= 3; k++){
for(i = 1; i <= N; i++){
a = data[i][k];
for(l = 1; l <= N; l++){
if(i == l)continue;
if(a == data[l][k]){
cnt += 1;
break;
}
if(cnt == 0)data[i][0] += a;
}
}
}
for(i = 1; i <= N; i++){
printf("%d\n", data[i][0]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
3 | scanf("%d\n", &N);
| ^~~~~
a.cc:23:17: error: 'printf' was not declared in this scope
23 | printf("%d\n", data[i][0]);
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | int main(){
|
s867096198 | p00500 | C++ | int main(){
int N, i, k, cnt = 0, l, a, data[200][3];
scanf("%d\n", &N);
for(i = 1; i <= N; i++){
for(k = 1; k <= 3; k++){
scanf("%d", data[i][k]);
}
}
for(k = 1; k <= 3; k++){
for(i = 1; i <= N; i++){
a = data[i][k];
for(l = 1; l <= N; l++){
if(i == l)continue;
if(a == data[l][k]){
cnt += 1;
break;
}
if(cnt == 0)data[i][0] += a;
}
}
}
for(i = 1; i <= N; i++){
printf("%d\n", data[i][0]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
3 | scanf("%d\n", &N);
| ^~~~~
a.cc:23:17: error: 'printf' was not declared in this scope
23 | printf("%d\n", data[i][0]);
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | int main(){
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.