submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s634014459 | p00094 | C++ | #include<iostream>
#include<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << fixed << setprecision(10) << a * b / 3.305785 << endl;
}
| a.cc: In function 'int main()':
a.cc:11:20: error: 'setprecision' was not declared in this scope
11 | cout << fixed << setprecision(10) << a * b / 3.305785 << endl;
| ^~~~~~~~~~~~
a.cc:6:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#inc... |
s200473683 | p00094 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s951915707 | p00094 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s939117610 | p00094 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s878620590 | p00094 | C++ | #include <iostream>
#include <math.h>
using namespace std;
int main(void)
{
int a, b;
double S;
cin >> a >> b;
S = a * b / 3.305785;
cout << fixed << setprecision(6) << S << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:26: error: 'setprecision' was not declared in this scope
10 | cout << fixed << setprecision(6) << S << endl;
| ^~~~~~~~~~~~
a.cc:3:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include... |
s583550926 | p00094 | C++ | #include<iostream>
using namespace std;
int main()
{
cin>>x>>y;
cout<<(x+y)/3.305785<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:7: error: 'x' was not declared in this scope
6 | cin>>x>>y;
| ^
a.cc:6:10: error: 'y' was not declared in this scope
6 | cin>>x>>y;
| ^
|
s967205845 | p00094 | C++ | #include<iostream>
using namespace std;
int main()
{
while(true)
{
cin>>x>>y;
}
cout<<(x+y)/3.305785<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:7: error: 'x' was not declared in this scope
8 | cin>>x>>y;
| ^
a.cc:8:10: error: 'y' was not declared in this scope
8 | cin>>x>>y;
| ^
a.cc:10:9: error: 'x' was not declared in this scope
10 | cout<<(x+y)/3.305785<<endl;
| ^
... |
s512132434 | p00094 | C++ | #include<iostream>
using namespace std;
int main()
{
while(true)
{
cin>>x>>y;
}
cout<<(x+y)/3.305785<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:7: error: 'x' was not declared in this scope
8 | cin>>x>>y;
| ^
a.cc:8:10: error: 'y' was not declared in this scope
8 | cin>>x>>y;
| ^
a.cc:10:9: error: 'x' was not declared in this scope
10 | cout<<(x+y)/3.305785<<endl;
| ^
... |
s704283858 | p00094 | C++ | #include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int x,y;
cin>>x>>y;
cout<<precision(6)<<(x+y)/3.305785<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:8: error: 'precision' was not declared in this scope
9 | cout<<precision(6)<<(x+y)/3.305785<<endl;
| ^~~~~~~~~
|
s906950398 | p00094 | C++ | #include<iostream>
using namespae std;
int main()
{
int x,y;
cin>>x>>y;
cout<<(x*y)/3.305785<<endl;
return 0;
} | a.cc:2:7: error: expected nested-name-specifier before 'namespae'
2 | using namespae std;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | cin>>x>>y;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/inclu... |
s076920057 | p00094 | C++ | include<iostream>
#include<cstdio>
using namespace std;
int main(void){
double a,b;
cin >> a >> b;
printf("%.6f\n",a*b/3.305785);
return 0;
} | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope
8 | cin >> a >> b;
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#includ... |
s344102932 | p00094 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int main (void) {
int a, b;
double res;
cin >> a >> b;
res = a * b / 3.305785;
printf("%.6lf\n", res)
return 0;
} | a.cc: In function 'int main()':
a.cc:14:25: error: expected ';' before 'return'
14 | printf("%.6lf\n", res)
| ^
| ;
15 |
16 | return 0;
| ~~~~~~
|
s655381920 | p00094 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int main (void) {
int a, b;
double res;
cin >> a >> b;
res = a * b / 3.305785;
printf("%.6lf\n", res)
return 0;
} | a.cc: In function 'int main()':
a.cc:14:25: error: expected ';' before 'return'
14 | printf("%.6lf\n", res)
| ^
| ;
15 |
16 | return 0;
| ~~~~~~
|
s164688846 | p00094 | C++ | #include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout >> a*b/3.305785 >> "hogehogehogebakbakbaka";
return 0;
} | a.cc: In function 'int main()':
a.cc:8:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'double')
8 | cout >> a*b/3.305785 >> "hogehogehogebakbakbaka";
| ~~~~ ^~ ~~~~~~~~~~~~
| | |
| | double
| std::ostream... |
s585929241 | p00094 | C++ | #include <iostream>
using namespace std;
int main() {
int a, b;
double c;
cin >> a >> b;
c = a*b/3.305785;
cout >> c >> "hogehogehogebakbakbaka";
return 0;
} | a.cc: In function 'int main()':
a.cc:9:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'double')
9 | cout >> c >> "hogehogehogebakbakbaka";
| ~~~~ ^~ ~
| | |
| | double
| std::ostream {aka std::basic_ostream<cha... |
s946197991 | p00094 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
int main() {
int a, b;
double c;
cin >> a >> b;
c = a*b/3.305785;
printf("%ld", c);
cout >> "hogehogehogebakbakbaka";
return 0;
} | a.cc: In function 'int main()':
a.cc:11:8: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [23]')
11 | cout >> "hogehogehogebakbakbaka";
| ~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | const char [23]
| std... |
s197937673 | p00094 | C++ | #include <iostream>
using namespace std;
int main(){
double a,b;
int c;
cin>>a>>b;
c=a*b/3.305785
cout<<c<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before 'cout'
7 | c=a*b/3.305785
| ^
| ;
8 | cout<<c<<endl;
| ~~~~
|
s428128724 | p00094 | C++ | #include <iostream>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b;
c=a*b/3.305785
cout<<c<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:15: error: expected ';' before 'cout'
6 | c=a*b/3.305785
| ^
| ;
7 | cout<<c<<endl;
| ~~~~
|
s756647079 | p00094 | C++ | #include <iostream>
using namespace std;
int main(){
double a,b,c;
cin>>a>>b;
c=(a*b)/3.305785;
cout<<showpoint<<setprecision(7)<<c<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:18: error: 'setprecision' was not declared in this scope
7 | cout<<showpoint<<setprecision(7)<<c<<endl;
| ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
1 | #... |
s718456711 | p00094 | C++ | #include <c.stdio>
int main(void) {
int a,b;
scanf("%d%d",&a,&b);
printf("%.15f\n",(double)a*b/3.305785);
return 0;
} | a.cc:1:10: fatal error: c.stdio: No such file or directory
1 | #include <c.stdio>
| ^~~~~~~~~
compilation terminated.
|
s909804837 | p00094 | C++ | #include <stdio.h>
int main(){
float a,b;
scanf( "%f %f",&a,&b );
printf( "%f\n",a * b / 3.305785 ); | a.cc: In function 'int main()':
a.cc:6:39: error: expected '}' at end of input
6 | printf( "%f\n",a * b / 3.305785 );
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s200174620 | p00095 | C | #include <stdio.h>
int num[100], val[100];
int main(viod)
{
int i= 0;, n, mmn = 100,maxv = 0;
scanf("%d", &n);
for (i = 0; i< n; i++){
scanf("%d %d", &num[i], &val[i]);
if (maxc < val[i]){
maxv = val[i];}
}
for (i =0; i< n; i++){
if (maxv == val[i] && minn > num[i]){
minn = num[i];
}
}
printf("%d %d", minn, maxv);
re... | main.c: In function 'main':
main.c:4:5: error: type of 'viod' defaults to 'int' [-Wimplicit-int]
4 | int main(viod)
| ^~~~
main.c:6:10: error: expected expression before ',' token
6 | int i= 0;, n, mmn = 100,maxv = 0;
| ^
main.c:6:12: error: 'n' undeclared (first use in this function)
... |
s935924665 | p00095 | C | #include<stdio.h>
int main(void){
int t,a,v,i,max,num;
scanf("%d",&t)
max=0;
for(i=0;i<t;i++){
scanf("%d%d",&a,&v);
if(max<v){
max=v;
num=a;
}
}
printf("%d %d\n",num,max);
}
return 0;
} | main.c: In function 'main':
main.c:6:15: error: expected ';' before 'max'
6 | scanf("%d",&t)
| ^
| ;
7 | max=0;
| ~~~
main.c: At top level:
main.c:17:1: error: expected identifier or '(' before 'return'
17 | return 0;
| ^~~~~~
main.c:18:1: error... |
s150634643 | p00095 | C | #include<stdio.h>
int main(void){
int t,a,v,i,max,num;
scanf("%d",&t)
max=0;
for(i=0;i<t;i++){
scanf("%d%d",&a,&v);
if(max<v){
max=v;
num=a;
}
}
printf("%d %d\n",num,max);
return 0;
} | main.c: In function 'main':
main.c:6:15: error: expected ';' before 'max'
6 | scanf("%d",&t)
| ^
| ;
7 | max=0;
| ~~~
|
s176511175 | p00095 | C | #include <stdio.h>
int main(){
int a,d,b,c,e,i;
b=0;
scanf("%d",&a);
for(i=0;i<a;i++){
scanf("%d %d",&c[i],&d[i]);
if(b<d[i]){
b=d[i];
e=c[i];
}
printf("%d\n",i);
}
printf("%d %d\n",e,d);
return 0;
} | main.c: In function 'main':
main.c:8:33: error: subscripted value is neither array nor pointer nor vector
8 | scanf("%d %d",&c[i],&d[i]);
| ^
main.c:8:39: error: subscripted value is neither array nor pointer nor vector
8 | scanf("%d %d",&c[i... |
s709557978 | p00095 | C | #include <stdio.h>
int main(){
int a,d[100],b,c[100],e,i;
b=0;
scanf("%d",&a);
for(i=0;i<a;i++){
scanf("%d %d",&c,&d;
if(b<d){
b=d;
e=c;
}
}
printf("%d %d\n",e,b);
return 0;
} | main.c: In function 'main':
main.c:8:36: error: expected ')' before ';' token
8 | scanf("%d %d",&c,&d;
| ~ ^
| )
main.c:12:18: error: expected ';' before '}' token
12 | }
| ^
... |
s329274253 | p00095 | C | #include <stdio.h>
int main(){
int a,d,b,c,e,i;
b=0;
scanf("%d",&a);
for(i=0;i<a;i++){
scanf("%d %d",&c,&d;
if(b<d){
b=d;
e=c;
}
}
printf("%d %d\n",e,b);
return 0;
} | main.c: In function 'main':
main.c:8:36: error: expected ')' before ';' token
8 | scanf("%d %d",&c,&d;
| ~ ^
| )
main.c:12:18: error: expected ';' before '}' token
12 | }
| ^
... |
s440135853 | p00095 | C | if (v[i] > v[t]){
x = i;
} | main.c:1:9: error: expected identifier or '(' before 'if'
1 | if (v[i] > v[t]){
| ^~
|
s555717049 | p00095 | C | #include<stdio.h>
int main(void){
int number;
int a[20],b[20];
int i;
int max = 0;
int min = 0;
int x = 0;
scanf("%d",&number);
for(i = 0;i < number;i++){
scanf("%d %d",&a[i],&b[i]);
if(b[i] > max){
max = b[i];
x = a[i];
}
}
for(i = 0;i < number;i++;){
if(b[i] == max && a[i] < x){
min = a[i];... | main.c: In function 'main':
main.c:17:33: error: expected ')' before ';' token
17 | for(i = 0;i < number;i++;){
| ~ ^
| )
main.c:23:1: error: expected declaration or statement at end of input
23 | }
| ^
|
s885747548 | p00095 | C | 6
1 14
2 25
3 42
4 11
5 40
6 37 | main.c:1:1: error: expected identifier or '(' before numeric constant
1 | 6
| ^
|
s740422865 | p00095 | C | #include<stdio.h>
#include <string.h>
int main(){
int a, b[20], c[20], i, s = 0, ans;
scanf("%d", &a);
for(i = 0; i < a; i++){
scanf("%d %d", &b[i], &c[i]);
if(s < c[i]){
s = c[i];
ans = i;
}
}
printf("%d %d\n", b[ans], c[ans])
return 0;
} | main.c: In function 'main':
main.c:14:42: error: expected ';' before 'return'
14 | printf("%d %d\n", b[ans], c[ans])
| ^
| ;
15 | return 0;
| ~~~~~~
|
s127547018 | p00095 | C | #include<iostream>
#include<algorithm>
using namespace std;
int main(){
int n, a, b;
cin >> n;
int ra = 1 << 29;
int rb = -100;
for(int i = 0;i < n;i++){
cin >> a >> b;
if(rb < b || rb == b && ra > a){
ra = a;
rb = b;
}
}
cout << ra << " " << rb << endl;
return 0;
} | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s491248549 | p00095 | C | #include<stdio.h>
int main(){
int n,a,v,i,x,y;
scanf("%d",&n);
x=0;
y=0;
for(i=0;i<n;i++){
scanf("%d %d",&a,&v);
if(y<v){
x=a;
y=v;
}
}
if(x==0)[
x=1;
y=0;
}
printf("%d %d\n",x,y);
return 0;
} | main.c: In function 'main':
main.c:14:9: error: expected expression before '[' token
14 | if(x==0)[
| ^
main.c:16:5: error: expected ';' before '}' token
16 | y=0;
| ^
| ;
17 | }
| ~
main.c: At top level:
main.c:18:8: error: expected declaration specifiers or '...' b... |
s805151503 | p00095 | C++ | #include <iostream>
using namespace std;
int main(){
int n;
cin >> n;
int max=0; int kouho =0;
for(int i=0;i<n;i++){
int a,b;
cin >> a >> b;
if(max < b){
max = b;
kouho = a;
}
}
cout << a << " " << b << endl;
} | a.cc: In function 'int main()':
a.cc:15:13: error: 'a' was not declared in this scope
15 | cout << a << " " << b << endl;
| ^
a.cc:15:25: error: 'b' was not declared in this scope
15 | cout << a << " " << b << endl;
| ^
|
s874655206 | p00095 | C++ | #include<stdio.h>
int main(){
int x,y,n;
int X=0,Y=0;
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%d %d",&x,&y);
if(Y<y){X=x;Y=y}
}
printf("%d %d\n",X,Y);
return 0;
} | a.cc: In function 'int main()':
a.cc:14:16: error: expected ';' before '}' token
14 | if(Y<y){X=x;Y=y}
| ^
| ;
|
s693917671 | p00095 | C++ | #include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include "oki.h"
////////////////*My library*////////////////////////
#define rep_to(a,i,n) for(i=a;i<n;i++)
#define rep(i,n) for(i=0;i<n;i++)
#define rep_r(i,n) for(i=n-1;i>=0;i--)
#define debug_i(x) printf("x:%d\n",x)
#def... | a.cc:6:10: fatal error: oki.h: No such file or directory
6 | #include "oki.h"
| ^~~~~~~
compilation terminated.
|
s253924840 | p00095 | C++ | #include<stdio.h>
int main(void)
{
int n,a,b,c,i,max,min;
max=-1;
min=101;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d",&a,&b);
if(max<b){
max=b;
c=a;
/* }
if(min>c){
min=c;
}*/
}
printf("%d %d\n",min,max);
return 0;
} | a.cc: In function 'int main()':
a.cc:21:2: error: expected '}' at end of input
21 | }
| ^
a.cc:3:1: note: to match this '{'
3 | {
| ^
|
s466687183 | p00095 | C++ | #include <iostream>
using namespace std;
int main()
{
int n;
int min = 21, max = 0;
int a, v;
cin >> n;
for (int i = 0; i < n; i++){
cin >> a >> v;
if (max < v){
max = v;
min = a;
}
else if (max == v){
if (w1 > a){
min = a;
}
}
}
cout << w1 << ' ' << ... | a.cc: In function 'int main()':
a.cc:18:11: error: 'w1' was not declared in this scope
18 | if (w1 > a){
| ^~
a.cc:23:11: error: 'w1' was not declared in this scope
23 | cout << w1 << ' ' << max << endl;
| ^~
|
s345549590 | p00095 | C++ | #include <iostream>
#include <vector>
typedef pair<int, int> P;
using namespace std;
void solve(vector<P> v) {
int minID, maxNum;
minID = v[0].first();
maxNum = v[0].second();
for (int i = 1; i < v.size(); i++)
if (v[i].second > maxNum || (v[i].second == maxNum && v[i].first < minID)) {
minID = v[i].first(... | a.cc:4:9: error: 'pair' does not name a type
4 | typedef pair<int, int> P;
| ^~~~
a.cc:8:19: error: 'P' was not declared in this scope
8 | void solve(vector<P> v) {
| ^
a.cc:8:20: error: template argument 1 is invalid
8 | void solve(vector<P> v) {
| ... |
s916320469 | p00095 | C++ | #include <iostream>
#include <vector>
#include <utility>
typedef pair<int, int> P;
using namespace std;
void solve(vector<P> v) {
int minID, maxNum;
minID = v[0].first();
maxNum = v[0].second();
for (int i = 1; i < v.size(); i++)
if (v[i].second > maxNum || (v[i].second == maxNum && v[i].first < minID)) {
... | a.cc:5:9: error: 'pair' does not name a type
5 | typedef pair<int, int> P;
| ^~~~
a.cc:9:19: error: 'P' was not declared in this scope
9 | void solve(vector<P> v) {
| ^
a.cc:9:20: error: template argument 1 is invalid
9 | void solve(vector<P> v) {
| ... |
s656252575 | p00095 | C++ | #include "bits/stdc++.h"
using namespace std;
int a,b,c;
int n;
int main(){
cin>>n;
pair<int,int> p[n];
for (int i = 0; i < n; ++i) {
cin>>a>>b;
p[i].second=a;p[i].first=-b;
}
sort(p,p+n);
cout<<p[0].second<<" "<<-p[0].first<<endl;
//cout<<p[n-1].second<<" "<<-p[n-1].first<<endl; | a.cc: In function 'int main()':
a.cc:13:43: error: expected '}' at end of input
13 | cout<<p[0].second<<" "<<-p[0].first<<endl;
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s779631387 | p00095 | C++ | #include<iostream>
int a,v,M;main(A){for(std::cin>>a;std::cin>>a>>v;)M<v&&(M=v)&(A=a);std::printf("%d %d\n",A,M); } | a.cc:2:15: error: expected constructor, destructor, or type conversion before '(' token
2 | int a,v,M;main(A){for(std::cin>>a;std::cin>>a>>v;)M<v&&(M=v)&(A=a);std::printf("%d %d\n",A,M); }
| ^
|
s328578022 | p00095 | C++ | #include<iostream>
int a,v,M;
main(A)
{
for(std::cin>>a;std::cin>>a>>v;)M<v&&(M=v)&(A=a);
std::printf("%d %d\n",A,M);
} | a.cc:3:5: error: expected constructor, destructor, or type conversion before '(' token
3 | main(A)
| ^
|
s353890667 | p00095 | C++ | #include<iostream>
int a,v,M;main(A){for(std::cin>>a;std::cin>>a>>v;)M<v&&(M=v)&(A=a);std::cout<<A<<" "<<M<<"\n";} | a.cc:2:15: error: expected constructor, destructor, or type conversion before '(' token
2 | int a,v,M;main(A){for(std::cin>>a;std::cin>>a>>v;)M<v&&(M=v)&(A=a);std::cout<<A<<" "<<M<<"\n";}
| ^
|
s354468764 | p00095 | C++ | #include<iostream>
main(a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";} | a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token
2 | main(a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
| ^
|
s644012574 | p00095 | C++ | #include<iostream>
main(int a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";} | a.cc:2:12: error: 'v' has not been declared
2 | main(int a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
| ^
a.cc:2:14: error: 'A' has not been declared
2 | main(int a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);st... |
s138747343 | p00095 | C++ | #include<iostream>
int main(a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";} | a.cc:2:5: error: cannot declare '::main' to be a global variable
2 | int main(a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
| ^~~~
a.cc:2:10: error: 'a' was not declared in this scope
2 | int main(a,v,A,V){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&... |
s833600648 | p00095 | C++ | #include<iostream>
a,v,A,V;main(){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";} | a.cc:2:1: error: 'a' does not name a type
2 | a,v,A,V;main(){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V=v)&(A=a):A>a&&(A=a);std::cout<<A<<" "<<V<<"\n";}
| ^
a.cc:2:9: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | a,v,A,V;main(){for(std::cin>>A;std::cin>>a>>v;)V^v?V<v&&(V... |
s049092946 | p00095 | C++ | #include<iostream>
int a,v,V;main(A){for(std::cin>>A;std::cin>>a>>v;)(V<v||V==v&&A>a)&&(V=v)&(A=a);std::cout<<A<<" "<<V<<"\n";} | a.cc:2:15: error: expected constructor, destructor, or type conversion before '(' token
2 | int a,v,V;main(A){for(std::cin>>A;std::cin>>a>>v;)(V<v||V==v&&A>a)&&(V=v)&(A=a);std::cout<<A<<" "<<V<<"\n";}
| ^
|
s429797639 | p00095 | C++ | include <iostream>
using namespace std;
int main(void){
int n;
int max = 0;
int num = 0;
int flag = 0;
cin >> n;
for( int i = 0 ; i < n ; i++ ){
int a = 0,v = 0;
cin >> a >> v;
if( max <= v && flag == 0){
max = v;
num = a;
if( v == 0 ) flag = 1;
}
}
co... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope
11 | cin >> n;
| ^~~
a.cc:30:3: error: 'cout' was not declared in this scope
30 | cout << num << " " << max << endl;
|... |
s879479827 | p00095 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(void){
int n,num,w;
pair<int,int>;
cin >> n;
for(int i = 0 ; i < n ; i++){
cin >> num >> w;
p[num-1].first = num;
p[num-1].second = w;
}
sort(p,p+n);
cout << p[0].first << ' ' << p[0].second << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: error: declaration does not declare anything [-fpermissive]
7 | pair<int,int>;
| ^~~~~~~~~~~~~
a.cc:12:5: error: 'p' was not declared in this scope
12 | p[num-1].first = num;
| ^
a.cc:16:8: error: 'p' was not declared in this scope
16 | sort(... |
s893970558 | p00096 | C | #include<stdio.h>
int main(){
int n, a, b, c, d, cnt, x;
while(scanf("%d", &n) != EOF){
cnt=0;
for(a=1000;a>=0;a--){
for(b=n-a;b>=0;b--){
for(c=n-b;c>=0;c--){
for(d=n-c;d>=0;d--){
if(a+b+c+d==n){
cnt++;
}
}
}
}
}
printf("%d\n", cnt);
}
return 0; | main.c: In function 'main':
main.c:25:3: error: expected declaration or statement at end of input
25 | return 0;
| ^~~~~~
|
s262018801 | p00096 | C | #include<stdio.h>
int main(void){
int a, b, c, d, n, key;
while ( scanf("%d", &n) != EOF ) {
key = 0;
for ( a = 0; a <= n; a++) {
for ( b = a + 1; b <= n; b++) {
for ( c = b + 1; c <= n; c++ ) {
for ( d = d + 1; d <= n; d++ ) {
if ( n == a + b + c ... | main.c: In function 'main':
main.c:21:45: error: 'key1' undeclared (first use in this function); did you mean 'key'?
21 | if ( n == a + b + c + d ) key1++;
| ^~~~
| key
main.c:21:45: note: each undec... |
s888514077 | p00096 | C | #include<stdio.h>
int main(void){
int a, b, c, d, n, key, key1, key2, key3;
while ( scanf("%d", &n) != EOF ) {
key = key1 = key2 = key3 = 0;
for ( a = 0; a <= n; a++) {
for ( b = a + 1; b <= n; b++) {
for ( c = b + 1; c <= n; c++ ) {
for ( d = d + 1; d <= n; d++ ) {... | main.c: In function 'main':
main.c:29:18: error: expected ';' before 'for'
29 | c = b
| ^
| ;
30 | for ( d = c + 1; d <= n; d++ ) {
| ~~~
main.c:46:4: error: expected declaration or statement at end of input
46 | r... |
s789054945 | p00096 | C | #include<stdio.h>
int main(void){
int a, b, c, d, n, key, key1, key2, key3;
while ( scanf("%d", &n) != EOF ) {
key = key1 = key2 = key3 = 0;
for ( a = 0; a <= n; a++) {
for ( b = a + 1; b <= n; b++) {
for ( c = b + 1; c <= n; c++ ) {
for ( d = d + 1; d <= n; d++ ) {... | main.c: In function 'main':
main.c:29:18: error: expected ';' before 'for'
29 | c = b
| ^
| ;
30 | for ( d = c + 1; d <= n; d++ ) {
| ~~~
main.c:46:4: error: expected declaration or statement at end of input
46 | r... |
s452632804 | p00096 | C | include<stdio.h>
main(){
int a,b,cnt=0,n;
int ab[2001]={0};
int abcd[4001]={0};
for(a=0;a<=1000;a++)for(b=0;b<=1000;b++)ab[a+b]++;
for(a=0;a<=2000;a++)for(b=0;b<=2000;b++)abcd[a+b]+=ab[a]*ab[b];
while( scanf("%d",&b)!=EOF)
printf("%d\n",abcd[b]);
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s216387695 | p00096 | C | #include <stdio.h>
int N(int x){
return (x+1)*(x+2)*(x+3)/6
}
int main(){
while(~scanf("%d", &n))
printf("%lld\n", N[n]);
return 0;
} | main.c:3:10: error: stray '\343' in program
3 | int N(int<U+3000>x){
| ^~~~~~~~
main.c: In function 'N':
main.c:4:31: error: expected ';' before '}' token
4 | return (x+1)*(x+2)*(x+3)/6
| ^
| ;
5 | }
| ~ ... |
s546228691 | p00096 | C | #include <stdio.h>
int N(int x){
return (x+1)*(x+2)*(x+3)/6
}
int main(){
int n,m;
while(~scanf("%d", &n))
if (n > 2000)
n = 4000 - n;
if (n < 1001)
printf("%d\n", N(n));
else
m = n - 1000
print("%d\n", N(n)-(N(m)-m+1)/2)
return 0;
} | main.c:3:10: error: stray '\343' in program
3 | int N(int<U+3000>x){
| ^~~~~~~~
main.c: In function 'N':
main.c:4:31: error: expected ';' before '}' token
4 | return (x+1)*(x+2)*(x+3)/6
| ^
| ;
5 | }
| ~ ... |
s406814806 | p00096 | C | #include <stdio.h>
int nn(int x){
return (x+1)*(x+2)*(x+3)/6
}
int main(){
int n,m;
while(~scanf("%d", &n))
if (n > 2000)
n = 4000 - n;
if (n < 1001)
printf("%d\n", nn(n));
else
m = n - 1000
print("%d\n", nn(n)-(nn(m)-m+1)/2)
return 0;
} | main.c:3:11: error: stray '\343' in program
3 | int nn(int<U+3000>x){
| ^~~~~~~~
main.c: In function 'nn':
main.c:4:31: error: expected ';' before '}' token
4 | return (x+1)*(x+2)*(x+3)/6
| ^
| ;
5 | }
| ~ ... |
s051162442 | p00096 | C++ | #include<iostream>
int main(int argc, char const *argv[])
{
int a;
while(std::cin >>a){
int ans=0;
for(int i=0;i<=1000;i++){
for(int j=0;j<=1000;j++){
for(int k=0;k<=1000;k++){
for(int l=0;l<=1000;l++){
if(a==i+j+k+l) ans++... | a.cc: In function 'int main(int, const char**)':
a.cc:15:25: error: 'else' without a previous 'if'
15 | else if(a<i+j+k) break;
| ^~~~
a.cc:17:25: error: 'else' without a previous 'if'
17 | else if(a<i+j) break;
| ... |
s501610131 | p00096 | C++ | using namespace std;
int main(){
int count, num,val[4010], tmp[4010];
val[0] = 4;
tmp[0] = 6;
for (int a = 0; a < 4010; a++){
tmp[a + 1] = tmp[a] + a + 4;
}
for (int a = 0; a < 4010; a++){
val[a + 1] = val[a] + tmp[a];
}
while (cin >> num){
cout << val[num - 1]<<endl;
}
} | a.cc: In function 'int main()':
a.cc:12:16: error: 'cin' was not declared in this scope
12 | while (cin >> num){
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespac... |
s101815372 | p00096 | C++ | import std.stdio;
import std.algorithm;
import std.string;
import std.range;
import std.array;
import std.conv;
import std.complex;
import std.math;
int calc2(int n) {
if(n <= 1000) {
return n+1;
} else {
return 2000-n+1;
}
}
void main() {
while(!stdin.eof()){
int n = to!int(readln().chomp());
int sum;
... | a.cc:1:1: error: 'import' does not name a type
1 | import std.stdio;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import std.algorithm;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1... |
s103552418 | p00096 | C++ | import std.stdio;
import std.algorithm;
import std.string;
import std.range;
import std.array;
import std.conv;
import std.complex;
import std.math;
int calc2(int n) {
if(n <= 1000) {
return n+1;
} else {
return 2000-n+1;
}
}
void main() {
while(!stdin.eof()){
int n = to!int(readln().chomp());
int sum;
... | a.cc:1:1: error: 'import' does not name a type
1 | import std.stdio;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import std.algorithm;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1... |
s363074897 | p00096 | C++ | import java.util.Arrays;
import java.util.Scanner;
public class Main {
Scanner sc = new Scanner(System.in);
void run() {
int[][] dp = new int[4][4001];
for(int i=0;i<=1000;i++) dp[0][i] = 1;
for (int i = 0; i < 3; i++) {
for (int j = 0; j <= 4000; j++) {
for (int k = 0; k <= 1000; k++) {
if (j + k... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Arrays;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-t... |
s656281510 | p00096 | C++ | #include <iostream>
using namespace std;
int n;
int dp[5][4001];
int func(int i,int j){
if (dp[i][j]>=0) {
return dp[i][j];
}
int res=0;
if(i==4){
if (j==n) {
return 1;;
}
else{
return 0;
}
}
else{
for (int k=0; k<=n; k++)... | a.cc: In function 'int main()':
a.cc:30:9: error: 'memset' was not declared in this scope
30 | memset(dp, -1, sizeof(dp));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cs... |
s897620413 | p00096 | C++ | #include <iostream>
using namespace std;
int n;
int dp[5][4001];
int func(int i,int j){
if (dp[i][j]>=0) {
return dp[i][j];
}
int res=0;
if(i==4){
if (j==n) {
return 1;;
}
else{
return 0;
}
}
else{
for (int k=0; k<=n; k++)... | a.cc: In function 'int main()':
a.cc:30:9: error: 'memset' was not declared in this scope
30 | memset(dp, -1, sizeof(dp));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cs... |
s458157174 | p00096 | C++ | #include <iostream>
using namespace std;
int n;
int dp[5][4001];
int func(int i,int j){
if (dp[i][j]>=0) {
return dp[i][j];
}
int res=0;
if(i==4){
if (j==n) {
return 1;;
}
else{
return 0;
}
}
else{
for (int k=0; k<=n; k++)... | a.cc: In function 'int main()':
a.cc:30:9: error: 'memset' was not declared in this scope
30 | memset(dp, -1, sizeof(dp));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include <cs... |
s150542545 | p00096 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int n = sc.nextInt() + 1;
if (n < 990) {
System.out.println((n * (n + 1) * (n + 2)) / 6);
} else {
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s327068541 | p00096 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int n = sc.nextInt() + 1;
if (n < 990) {
System.out.println((n * (n + 1) * (n + 2)) / 6);
} else {
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s724023004 | p00096 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
typedef long long lli;
int main() {
lli n;
while(cin >> n) {
int ans = 0;
for(lli a = 0; a <= n; ++a) {
for(lli b = 0; a+b <= n; ++b) {
ans += min(1000LL, n-a-b) - max(0, n-1000LL-a-b) + 1;
}
}
cout << ans << endl;
... | a.cc: In function 'int main()':
a.cc:13:40: error: no matching function for call to 'max(int, lli)'
13 | ans += min(1000LL, n-a-b) - max(0, n-1000LL-a-b) + 1;
| ~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/inclu... |
s191050832 | p00096 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
typedef long long lli;
int main() {
lli n;
while(cin >> n) {
lli ans = 0;
for(lli a = 0; a <= n; ++a) {
for(lli b = 0; a+b <= n; ++b) {
ans += min(1000LL, n-a-b) - max(0, n-1000LL-a-b) + 1;
}
}
cout << ans << endl;
... | a.cc: In function 'int main()':
a.cc:13:40: error: no matching function for call to 'max(int, lli)'
13 | ans += min(1000LL, n-a-b) - max(0, n-1000LL-a-b) + 1;
| ~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/inclu... |
s829500848 | p00096 | C++ | #include <iostream>
using namespace std;
int memo[4][4001];
int rec(int idx, int left)
{
if(idx == 3) return (left <= 1000 ? 1 : 0);
if(memo[idx][left] != -1) return memo[idx][left];
int ans = 0;
for(int i=0; i <= min(1000, left); i++){
ans += rec(idx+1, left - i);
}
return ans;
}
int main()
{
for(int n =... | a.cc: In function 'int main()':
a.cc:22:17: error: 'memset' was not declared in this scope
22 | memset(memo, -1, sizeof memo);
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
... |
s014531992 | p00096 | C++ | #include <iostream>
using namespace std;
int memo[4][4001];
int rec(int idx, int left)
{
if(idx == 3) return (left <= 1000 ? 1 : 0);
if(memo[idx][left] != -1) return memo[idx][left];
int ans = 0;
for(int i=0; i <= min(1000, left); i++){
ans += rec(idx+1, left - i);
}
return ans;
}
int main()
{
for(int n =... | a.cc: In function 'int main()':
a.cc:22:17: error: 'memset' was not declared in this scope
22 | memset(memo, -1, sizeof memo);
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
... |
s524681501 | p00096 | C++ | #include<stdio.h>
long long dp[5][4001];
int main(){
dp[0][0]=1;
for(int i=0;i<4;i++)
for(int j=0;j<=4000;j++){
if(dp[i][j]){
for(int k=0;k<=1000;k++)dp[i+1][j+k]+=dp[i][j];
}
}
while(~scanf("%d",&a))
for(int i=0;i<a;i++){
int b;
scanf("%d",&b);
printf("%lld\n",dp[4][b]);
}}
} | a.cc: In function 'int main()':
a.cc:11:28: error: 'a' was not declared in this scope
11 | while(~scanf("%d",&a))
| ^
a.cc: At global scope:
a.cc:17:1: error: expected declaration before '}' token
17 | }
| ^
|
s837185768 | p00096 | C++ | #include<stdio.h>
long long dp[5][4001];
int main(){
dp[0][0]=1;
for(int i=0;i<4;i++)
for(int j=0;j<=4000;j++){
if(dp[i][j]){
for(int k=0;k<=1000;k++)dp[i+1][j+k]+=dp[i][j];
}
}
while(~scanf("%d",&a)){
for(int i=0;i<a;i++){
int b;
scanf("%d",&b);
printf("%lld\n",dp[4][b]);
}
}
} | a.cc: In function 'int main()':
a.cc:11:28: error: 'a' was not declared in this scope
11 | while(~scanf("%d",&a)){
| ^
|
s126830221 | p00096 | C++ | T = 1000
def f(x):
return max(0, T + 1 - abs(T - x))
while True:
try:
n = input()
except EOFError:
break
cnt = 0
for i in range(n):
cnt += f(i) * f(n-i)
print cnt
#O(n), | a.cc:14:2: error: invalid preprocessing directive #O
14 | #O(n),
| ^
a.cc:1:1: error: 'T' does not name a type
1 | T = 1000
| ^
|
s571562125 | p00096 | C++ | main(m,n){for(;~scanf("%d",&n);printf("%d\n",(n*n*n-n-4*m*m*m+4*m)/6))
n=n>36?0:n>18?38-n:n+2,m=n>11?n-10:0;} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(m,n){for(;~scanf("%d",&n);printf("%d\n",(n*n*n-n-4*m*m*m+4*m)/6))
| ^
|
s706778569 | p00096 | C++ | main(){int m,n;for(;~scanf("%d",&n);printf("%d\n",(n*n*n-n-4*m*m*m+4*m)/6))
n=n>36?0:n>18?38-n:n+2,m=n>11?n-10:0;} | a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | main(){int m,n;for(;~scanf("%d",&n);printf("%d\n",(n*n*n-n-4*m*m*m+4*m)/6))
| ^~~~
a.cc: In function 'int main()':
a.cc:1:22: error: 'scanf' was not declared in this scope
1 | main(){int m,n;for(;~scanf("%d",&n);prin... |
s820370178 | p00096 | C++ | #include <stdio.h>
long N(long x){
return (x+1)*(x+2)*(x+3)/6;
}
int main(){
long n;
while(~scanf("%ld",&n)){
if (n > 2000) n = 4000 - n;
if (n < 1001) printf("%d\n",N(n));
else printf("%ld\n", N(n)-(N(2*(n-1000)-n-1001)/2);
}
}
return 0;
} | a.cc:10:18: error: extended character is not valid in an identifier
10 | if (n > 2000) n = 4000 - n;
| ^
a.cc: In function 'int main()':
a.cc:10:18: error: '\U00003000n' was not declared in this scope
10 | if (n > 2000) n = 4000 - n;
| ^~~
a.cc:12:55: error:... |
s640708589 | p00096 | C++ | #include <stdio.h>
long N(long x){
return (x+1)*(x+2)*(x+3)/6;
}
int main(){
long n;
while(~scanf("%ld",&n)){
if (n > 2000) n = 4000 - n;
if (n < 1001) printf("%d\n",N(n));
else printf("%ld\n", N(n)-(N(2*(n-1000)-n-1001)/2);
}
return 0;
} | a.cc:10:18: error: extended character is not valid in an identifier
10 | if (n > 2000) n = 4000 - n;
| ^
a.cc: In function 'int main()':
a.cc:10:18: error: '\U00003000n' was not declared in this scope
10 | if (n > 2000) n = 4000 - n;
| ^~~
a.cc:12:55: error:... |
s772157579 | p00096 | C++ | #include <stdio.h>
long N(long x){
return (x+1)*(x+2)*(x+3)/6;
}
int main(){
long n;
while(~scanf("%ld",&n)){
if (n > 2000)
n = 4000 - n;
if (n < 1001)
printf("%d\n",N(n));
else
printf("%ld\n", N(n)-(N(2*(n-1000)-n-1001)/2);
}
return 0;
} | a.cc:11:7: error: extended character is not valid in an identifier
11 | n = 4000 - n;
| ^
a.cc: In function 'int main()':
a.cc:11:7: error: '\U00003000n' was not declared in this scope
11 | n = 4000 - n;
| ^~~
a.cc:15:54: error: expected ')' before ';' token
15 | ... |
s973046807 | p00096 | C++ | #include <iostream>
using namespace std;
int main() {
long long int n;
while( cin >> n ) {
long long int ans = (n+3)*(n+2)*(n+1)/3/2/1;
if ( n > 1000 ) {
ans -= (n-1000+3)*(n-1000+2)*(n-1000+1)/3/2/1*4;
}
cout << << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:14: error: expected primary-expression before '<<' token
12 | cout << << endl;
| ^~
|
s655818239 | p00097 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* 0 から 100 の数字から異なる n 個の数を取り出して合計が s となる組み合わせの数を出力する
* n 個の数はおのおの 0 から 100 までとし、1つの組み合わせに同じ数字は使えません。
* @author sugawara-a2
*
*/
public class main
{
final private static int LIMIT = 100;
public static void main(... | Main.java:12: error: class main is public, should be declared in a file named main.java
public class main
^
1 error
|
s543220063 | p00097 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* 0 から 100 の数字から異なる n 個の数を取り出して合計が s となる組み合わせの数を出力する
* n 個の数はおのおの 0 から 100 までとし、1つの組み合わせに同じ数字は使えません。
* @author sugawara-a2
*
*/
public class AOJ_0097
{
final private static int LIMIT = 100;
public static void m... | Main.java:12: error: class AOJ_0097 is public, should be declared in a file named AOJ_0097.java
public class AOJ_0097
^
1 error
|
s122064743 | p00097 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {
public static void main(String[] args){
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String tes = null;
ArrayList<Integer> al = new ArrayList<Integer>();
ArrayList<Int... | Main.java:15: error: cannot find symbol
} catch (IOException e) {
^
symbol: class IOException
location: class Main
Main.java:33: error: cannot find symbol
} catch (IOException e) {
^
symbol: class IOException
location: class Main
2 errors
|
s822651317 | p00097 | Java | import java.util.*;
public class main {
public static void Main(String[] args) {
int n,s,max,count;
count = 0;
n=9;
max=100;
s=200;
Scanner sc = new Scanner(System.in);
for(;;){
n = sc.nextInt();
s = sc.nextInt();
if(n==0&&s==0)break;
count = check(n,s,max);
System.ou... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s349552092 | p00097 | Java | import import java.util.*;
public class Main {
public static void main(String[] args) {
int n,s,max,count;
count = 0;
n=9;
max=100;
s=200;
Scanner sc = new Scanner(System.in);
for(;;){
n = sc.nextInt();
s = sc.nextInt();
if(n==0&&s==0)break;
count = check(n,s,max);
Sy... | Main.java:1: error: <identifier> expected
import import java.util.*;
^
1 error
|
s561090973 | p00097 | Java | import java.util.*;
public class main {
public static void main(String[] args) {
int n,s,max,count;
count = 0;
n=9;
max=100;
s=200;
Scanner sc = new Scanner(System.in);
for(;;){
n = sc.nextInt();
s = sc.nextInt();
if(n==0&&s==0)break;
count = check(n,s,max);
System.ou... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s623961522 | p00097 | Java | import java.util.*;
public class main {
public static void Main(String[] args) {
int n,s,max,count;
count = 0;
n=9;
max=100;
s=200;
Scanner sc = new Scanner(System.in);
for(;;){
n = sc.nextInt();
s = sc.nextInt();
if(n==0&&s==0)break;
if(s>864) s=864;
count = check(n,s,ma... | Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
^
1 error
|
s672996978 | p00097 | Java | import java.util.Scanner;
//Sum of Integers II
public class AOJ0097 {
void run(){
Scanner sc = new Scanner(System.in);
long[] dp = new long[2001];
for(int i=0;i<=1000;i++)for(int j=0;j<=1000;j++)dp[i+j]++;
while(sc.hasNext()){
int N = sc.nextInt();
long res = 0;
for(int s=0;s<=2000;s++)if(0 <= N-s &... | Main.java:4: error: class AOJ0097 is public, should be declared in a file named AOJ0097.java
public class AOJ0097 {
^
1 error
|
s353872179 | p00097 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args)throws IOException{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(isr);
String string;
long res[][] = ... | Main.java:25: error: incompatible types: possible lossy conversion from long to int
System.out.println(res[n][s]);
^
Main.java:25: error: incompatible types: possible lossy conversion from long to int
System.out.println(res[n][s]);
^
2 errors
|
s018360868 | p00097 | Java | import java.util.Scanner;
//Sum of Integers II
public class Main {
long[][][] dp;
long get(int rest, int x, int s){
if(rest==0 && s==0)return 1;
if(rest<0 || x<0 || s<0)return 0;
if(dp[rest][x][s]!=-1)return dp[rest][x][s];
long res = 0;
for(int nx=x;nx>=0;nx--)res+=get(rest-1, nx-1, s-nx);
return dp[... | Main.java:29: error: cannot find symbol
new AOJ0097().run();
^
symbol: class AOJ0097
location: class Main
1 error
|
s624741362 | p00097 | Java | public class Main {
public static void main(String[] args){
int[][] allData = new int[10][1001];
allData[0][0] = 1;
for (int iRang = 0; iRang <= 100; iRang++){
for (int iSum = 1000; iSum >= 0; iSum--){
for (int item = 9; item >= 1; item--){
if (iSum - iRang >... | Main.java:17: error: cannot find symbol
Scanner input = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:17: error: cannot find symbol
Scanner input = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s008670454 | p00097 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class AOJ_0097
{
final private static int LIMIT = 100;
public static void main(String[] args) throws NumberFormatException, IOException
{
BufferedReader input = new BufferedReader(new InputStreamReader(Syste... | Main.java:5: error: class AOJ_0097 is public, should be declared in a file named AOJ_0097.java
public class AOJ_0097
^
1 error
|
s564470535 | p00097 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import static java.lang.Integer.parseInt;
/**
* Sum of Integers II
*/
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.i... | Main.java:39: error: reached end of file while parsing
}
^
1 error
|
s215655176 | p00097 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import static java.lang.Integer.parseInt;
/**
* Sum of Integers II
*/
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.i... | Main.java:39: error: reached end of file while parsing
}
^
1 error
|
s889991677 | p00097 | C | #include <stdio.h>
#include <string.h>
typedef long LONG;
LONG memo[10][1001][101];
LONG comb(int *use, int n, int s, int m)
{
int i;
LONG c;
// printf("<%d %d %d>\n", n, s, m);
if (memo[n][s][m] != -1){
return (memo[n][s][m]);
}
if (n == 1){
if (0 <= s && s <= 100 && s >= m && use[s] == 0){
// ... | main.c: In function 'main':
main.c:59:38: error: 'use' undeclared (first use in this function)
59 | printf("%ld\n", comb(use, n, s, 0));
| ^~~
main.c:59:38: note: each undeclared identifier is reported only once for each function it appears in
|
s167221043 | p00097 | C | #include <stdio.h>
#include <string.h>
int comb(int N, int S, int num);
int n, s;
int memo[101][1001][101];
int main(void)
{
int i, j;
while (1){
memset(memo, -1, sizeof(memo));
scanf("%d %d", &n, &s);
if (!n && !s)return 0;
printf("%d\n", comb(n, 0, 0));
}
}
long comb(int N, int... | main.c:29:6: error: conflicting types for 'comb'; have 'long int(int, int, int)'
29 | long comb(int N, int S, int num)
| ^~~~
main.c:4:5: note: previous declaration of 'comb' with type 'int(int, int, int)'
4 | int comb(int N, int S, int num);
| ^~~~
|
s995882746 | p00097 | C | #include <stdio.h>
#include <string.h>
??
int comb(int N, int S, int num);
??
int n, s;
long memo[11][1001][101];
??
int main(void)
{
????????int i, j;
??????????
????????while (1){
??????????????????
??????????????????
????????????????memset(memo, -1, sizeof(memo));
??????????????????
??????????????????
??????????????... | main.c:3:1: error: expected identifier or '(' before '?' token
3 | ??
| ^
main.c:5:1: error: expected identifier or '(' before '?' token
5 | ??
| ^
main.c:8:1: error: expected identifier or '(' before '?' token
8 | ??
| ^
main.c:28:1: error: expected identifier or '(' before '?' token
2... |
s682537937 | p00097 | C | #include<stdio.h>
#define MAX 101
int j;
int A[MAX];
for(j=0;j<MAX;j++)A[j]=j;
int cnt=0;
void dfs(int i,int rest,int d,int n){
if(i<MAX){
if(d==n){
if(rest==0){cnt++;return;}
else return;
}
if(rest<0)return;/*sを超える*/
dfs(i+1,rest-A[i],d+1,n);/*A[i]を選ぶ*/
dfs(i+1,rest,d,n);/*A[i]を選ばな... | main.c:5:1: error: expected identifier or '(' before 'for'
5 | for(j=0;j<MAX;j++)A[j]=j;
| ^~~
main.c:5:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
5 | for(j=0;j<MAX;j++)A[j]=j;
| ^
main.c:5:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.