submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s482492787 | p01317 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <utility>
#include <queue>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#define MP make_pair
#define PB push_b... | a.cc: In function 'int main()':
a.cc:46:46: error: no matching function for call to 'min(ll&, int&)'
46 | l[x][y] = min(l[x][y],t);
| ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/... |
s019399153 | p01317 | C++ | #include <iostream>
#include <algorithm>
#include <functional>
#include <cstdlib>
#include <sstream>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <complex>
#include <vector>
#include <cstdio>
#include <cmath>
#include <utility>
#define rep(i,a,b) for(int i=... | a.cc: In function 'int main()':
a.cc:65:21: error: 'ldp' was not declared in this scope
65 | ldp[i][j]=min(ldp[i][k]+ldp[k][j],ldp[i][j]);
| ^~~
a.cc:66:21: error: 'sdp' was not declared in this scope
66 | sdp[i][j]=min(sdp[i][k]+sdp[k][j],sdp[i][j... |
s886574094 | p01317 | C++ |
#include <iostream>
#include <algorithm>
#include <string.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define ll long long
#define ull unsigned ll
#define db double
#define INF 0x3f3f3f3f
#define MOD 1000000007
#define PII pair<int, int>
const int N=205;
int n,m,x,y,t,r,z[N],W[N][N],L[N][N],dp... | a.cc: In function 'int main()':
a.cc:65:17: error: 'assert' was not declared in this scope
65 | assert(z[i]<N);
| ^~~~~~
a.cc:5:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
4 | #include <string.h>
+++ |+#includ... |
s582730019 | p01317 | C++ | #include<bits/stdc++.h>
using namespace std;
#define LL long long
#define inf 0x3f3f3f3f
int e1[220][220],e2[220][220];
int f[1100][220],a[220];
void init(int N){
memset(e1,inf,sizeof(e1));
memset(e2,inf,sizeof(e2));
memset(f,inf,sizeof(f));
for(int i=1;i<=N;++i) e1[i][i]=e2[i][i]=0;
}
void floyd(int e[][210],int ... | a.cc: In function 'int main()':
a.cc:44:23: error: cannot convert 'int (*)[220]' to 'int (*)[210]'
44 | floyd(e1,N);
| ^~
| |
| int (*)[220]
a.cc:13:16: note: initializing argument 1 of 'void floyd(int (*)[210], int... |
s007706518 | p01317 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
#define MP make_pair
#define INF (sizeof(int) == 4 ? 1e9:1e18)
#... | a.cc: In function 'int main()':
a.cc:54:16: error: invalid types 'll {aka long long int}[int]' for array subscript
54 | dp[0][r[0]]=0;
| ^
|
s635358543 | p01317 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
#define MP make_pair
#define INF (sizeof(int) == 4 ? 1e9:1e18)
#... | a.cc: In function 'int main()':
a.cc:60:30: error: 'k' was not declared in this scope
60 | cmin(dp[i+1][k],dp[i][j]+Ld[v[i]][v[i+1]]);
| ^
|
s519753461 | p01317 | C++ | #include "bits\stdc++.h"
using namespace std;
typedef pair<int, int> P;
typedef pair<int, P> PI;
int distL[200][200];
int distS[200][200];
int dp[2][200];
int z[1000];
int main() {
int N, M;
while (cin >> N >> M, N) {
fill((int*)distL, (int*)(distL + 200), 1 << 25);
fill((int*)distS, (int*)(distS + 200), 1 << 25)... | a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory
1 | #include "bits\stdc++.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s781615624 | p01317 | C++ | #include<stdio.h>
#include<algorithm>
#include<vector>
using namespace std;
int land[200][200];
typedef pair<int,int>P;
vector<P>sea[200];
int R,z[1000];
const int INF = 0x0f0f0f0f;
int memo[200][1000];
int Solve(int boat, int index)
{
if(index >= R)
return 0;
int &ref = memo[boat][index];
if(ref >= 0)
retur... | a.cc: In function 'int main()':
a.cc:45:17: error: 'memset' was not declared in this scope
45 | memset(land,INF,sizeof(land));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<vector>
+... |
s537690403 | p01318 | C | #define _USE_MATH_DEFINES
#include<stdio.h>
#include<math.h>
int main(){
int N;
scanf("%d",&N);
while(N != 0){
int x[N],y[N],r[N],m[N];
for(int i=0;i<N;i++){
scanf("%d %d %d %d",&x[i],&y[i],&r[i],&m[i]);
}
int max = 0;
for(int i=0;i<N;i++){
for(double j=0; j< 2*M_PI; j=j+0.001){
double a,b,c,ab;... | /usr/bin/ld: /tmp/ccJNIdhH.o: in function `main':
main.c:(.text+0x2d8): undefined reference to `cos'
/usr/bin/ld: main.c:(.text+0x30f): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0x331): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0x34c): undefined reference to `sqrt'
/usr/bin/ld: main.c:(.text... |
s773153430 | p01318 | C | #define PI 3.141592
#include<stdio.h>
#include<math.h>
int main(){
int N,i,k;
scanf("%d",&N);
while(N != 0){
int x[N],y[N],r[N],m[N];
double j;
for(int i=0;i<N;i++){
scanf("%d %d %d %d",&x[i],&y[i],&r[i],&m[i]);
}
int max = 0;
for(i=0;i<N;i++){
for(j=0; j< 2*PI; j=j+0.001){
double a,b,c,ab;
... | /usr/bin/ld: /tmp/cciTIPIs.o: in function `main':
main.c:(.text+0x2b3): undefined reference to `cos'
/usr/bin/ld: main.c:(.text+0x2ea): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0x30c): undefined reference to `pow'
/usr/bin/ld: main.c:(.text+0x327): undefined reference to `sqrt'
/usr/bin/ld: main.c:(.text... |
s135101416 | p01318 | C++ | ////////////////////////////////////////
/// tu3 pro-con template ///
////////////////////////////////////////
#include <cassert>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <functional>
#include <vector>
#incl... | a.cc: In function 'void solve()':
a.cc:359:52: warning: narrowing conversion of 'r' from 'int' to 'double' [-Wnarrowing]
359 | gems.push_back({ P2(x, y), r, m, _ });
| ^
a.cc:359:55: warning: narrowing conversion of 'm' from 'int' to 'do... |
s761126819 | p01318 | C++ | /** 幾何ライブラリ **/
#include <complex>
#define X real()
#define Y imag()
const double EPS = 1e-7;
const double PI = acos(-1.0);
typedef double D;
typedef complex<D> P; // Point
struct L { // Line
P a, b;
L(){}
L(P aa, P bb) : a(aa), b(bb){}
};
struct C { // Circle
P p; D r, m;
C() {}
C(P pp, D rr, D mm) : p(pp),... | a.cc:11:9: error: 'complex' does not name a type
11 | typedef complex<D> P; // Point
| ^~~~~~~
a.cc:14:9: error: 'P' does not name a type
14 | P a, b;
| ^
a.cc:16:12: error: expected ')' before 'aa'
16 | L(P aa, P bb) : a(aa), b(bb){}
| ~ ^~~
| ... |
s211780814 | p01318 | C++ | #include<iostream>
#include<fstream>
#include"2D.h"
using namespace std;
inline int check(geo::Line l,vector<geo::Circle>& cd, vector<geo::Circle>& cm){
int res = 0;
int n = (int)cd.size();
for (int i = 0; i < n; i++){
double d = geo::distance( cd[i].first,l);
//cout << d << " ";
if (d<cm[i].second +geo::eps&... | a.cc:3:9: fatal error: 2D.h: No such file or directory
3 | #include"2D.h"
| ^~~~~~
compilation terminated.
|
s883351791 | p01318 | C++ | // last update 2012/12/15
#include <iostream>
#include <algorithm>
#include <cmath>
#include <complex>
#include <vector>
using namespace std;
typedef complex<double> P;
const double eps = 1e-8;
const double pi = acos(-1);
bool equals(double a, double b) { return abs(a - b) < eps; }
bool equals(P a, P b) {
return... | a.cc:102:28: error: 's1' was not declared in this scope; did you mean 'y1'?
102 | double d = getDistanceLP(s1, s2, c.o);
| ^~
| y1
a.cc:102:32: error: 's2' was not declared in this scope
102 | double d = getDistanceLP(s1, s2, c.o);
| ... |
s361106045 | p01318 | C++ | // last update 2012/12/15
#include <iostream>
#include <algorithm>
#include <cmath>
#include <complex>
#include <vector>
using namespace std;
typedef complex<double> P;
const double eps = 1e-8;
const double pi = acos(-1);
bool equals(double a, double b) { return abs(a - b) < eps; }
bool equals(P a, P b) {
return... | a.cc:102:28: error: 's1' was not declared in this scope; did you mean 'y1'?
102 | double d = getDistanceLP(s1, s2, c.o);
| ^~
| y1
a.cc:102:32: error: 's2' was not declared in this scope
102 | double d = getDistanceLP(s1, s2, c.o);
| ... |
s856462383 | p01318 | C++ | // last update 2015/05/29
#include <bits/stdc++.h>
using namespace std;
typedef complex<double> P;
typedef vector<P> G;
const double eps = 1e-8;
bool equals(double a, double b) { return abs(a - b) < eps; }
bool equals(P a, P b) {
return equals(a.real(), b.real()) && equals(a.imag(), b.real());
}
namespace std {... | a.cc:119:28: error: 's1' was not declared in this scope; did you mean 'y1'?
119 | double d = getDistanceLP(s1, s2, c.p);
| ^~
| y1
a.cc:119:32: error: 's2' was not declared in this scope
119 | double d = getDistanceLP(s1, s2, c.p);
| ... |
s437150947 | p01318 | C++ | // last update 2015/05/29
#include <bits/stdc++.h>
using namespace std;
typedef complex<double> P;
typedef vector<P> G;
const double eps = 1e-8;
bool equals(double a, double b) { return abs(a - b) < eps; }
bool equals(P a, P b) {
return equals(a.real(), b.real()) && equals(a.imag(), b.real());
}
namespace std {... | a.cc:119:28: error: 's1' was not declared in this scope; did you mean 'y1'?
119 | double d = getDistanceLP(s1, s2, c.p);
| ^~
| y1
a.cc:119:32: error: 's2' was not declared in this scope
119 | double d = getDistanceLP(s1, s2, c.p);
| ... |
s225448861 | p01318 | C++ | // last update 2015/05/29
#include <bits/stdc++.h>
using namespace std;
typedef complex<double> P;
typedef vector<P> G;
const double eps = 1e-8;
bool equals(double a, double b) { return abs(a - b) < eps; }
bool equals(P a, P b) {
return equals(a.real(), b.real()) && equals(a.imag(), b.real());
}
namespace std {... | a.cc:119:28: error: 's1' was not declared in this scope; did you mean 'y1'?
119 | double d = getDistanceLP(s1, s2, c.p);
| ^~
| y1
a.cc:119:32: error: 's2' was not declared in this scope
119 | double d = getDistanceLP(s1, s2, c.p);
| ... |
s075586734 | p01318 | C++ | #include <iostream>
#include <vector>
#include <complex>
#include <cmath>
#include <algorithm>
using namespace std;
typedef complex<double> P;
const double PI=acos(-1);
const double EPS=1e-12;
int cmp(double a,double b){
const double diff=a-b;
if(fabs(diff)<EPS)return 0;
else if(diff<0)return -1;
else retur... | a.cc: In function 'bool solve()':
a.cc:165:22: error: expected ')' before ';' token
165 | };
| ^
| )
a.cc:163:37: note: to match this '('
163 | int cnt=count_if(jewels.begin(),jewels.end(),[&](const pair<circle,circle> &j)... |
s147001918 | p01318 | C++ | #include<bits/stdc++.h>
using namespace std;
#define FOR(i,bg,ed) for(int i=(bg);i<(ed);i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second
#define pb push_back
#define IL inline
namespace geo {
typedef double D;
typedef bool B;
typedef complex<D> P;
#... | a.cc:210:23: error: 'Line' is not a member of 'geo'
210 | inline int check(geo::Line l,vector<geo::Circle>& cd, vector<geo::Circle>& cm){
| ^~~~
a.cc:210:42: error: 'Circle' is not a member of 'geo'
210 | inline int check(geo::Line l,vector<geo::Circle>& cd, vector<geo::Circle>& cm){
... |
s108085491 | p01318 | C++ | #include<bits/stdc++.h>
using namespace std;
#define FOR(i,bg,ed) for(int i=(bg);i<(ed);i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second
#define pb push_back
#define IL inline
namespace geo {
typedef double D;
typedef bool B;
typedef complex<D> P;
#define X ... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::_... |
s571704961 | p01318 | C++ | #include<bits/stdc++.h>
using namespace std;
#define FOR(i,bg,ed) for(int i=(bg);i<(ed);i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second
#define pb push_back
#define IL inline
namespace geo {
typedef double D;
typedef bool B;
typedef complex<D> P;
#define X ... | a.cc:18:45: error: non-member function 'geo::B geo::operator<(const P&, const P&)' cannot have cv-qualifier
18 | B operator<(const P& l, const P& r) const{ return (l.X == r.X) ? l.Y < r.Y : l.X < r.X; }
| ^~~~~
In file included from /usr/include/c++/14/bits/s... |
s821201156 | p01321 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] point = new int[100];
int n;
while((n = sc.nextInt()) != 0){
for(int i = 0; i < n; i++){
for(int j = 0; j < 5; j++){
point[i] += sc.nextInt();
}
System.out.println(point[i]);
}
int ... | 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
|
s978408197 | p01321 | C | #include <cstdio>
#include <algorithm>
using namespace std;
int main(void)
{
int i, n, j, s;
int score[128];
while (scanf("%d", &n), n != 0){
for (i = 0; i < 128; i++){
score[i] = 0;
}
for (i = 0; i < n; i++){
for (j = 0; j < 5; j++){
scanf("%d", &s);
score[i] += s;
}
}
sort(scor... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s513936410 | p01321 | C | #include <stdio.h>
int main(void)
{
int n,i,max,min;
int a,j,b;
while(scanf("%d",&n)&&n!=0){
max=0;
min=500;
for(i=0;i<n;i++){
a=0;
for(j=0;j<5;j++){
scanf("%d",&b);
a+=b;
}
a<max?max=max:max=a;
min<a?min=min:min=a;
}
printf("%d %d\n",max,min);
}
return 0 ;
} | main.c: In function 'main':
main.c:17:50: error: lvalue required as left operand of assignment
17 | a<max?max=max:max=a;
| ^
main.c:18:50: error: lvalue required as left operand of assignment
18 | ... |
s898512465 | p01321 | C | #include<stdio.h>
int main(void) {
int n,i,test,max=0,min=0;
int t;
scanf("%d",&n);
while(n) {
max=0;min=500;
for(;n>0;n--) {
test = 0;
for(i=0;i<5;i++) {
scanf("%d",&t);
test += t;
}
if(max<test) max=test;
if(min>test) min=test;
}
printf("%d %d",max,min);
scanf("%d",&n)
}
return(0);
} | main.c: In function 'main':
main.c:20:15: error: expected ';' before '}' token
20 | scanf("%d",&n)
| ^
| ;
21 | }
| ~
|
s461958020 | p01321 | C | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
int n;
List<Integer[]> list = new ArrayList<Integer[]>();
Buff... | main.c:1:1: error: unknown type name 'import'
1 | import java.io.BufferedReader;
| ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
1 | import java.io.BufferedReader;
| ^
main.c:2:1: error: unknown type name 'import'
2 | import java.io.IOExc... |
s458560725 | p01321 | C++ | #include<stdio.h>
int main(){
int n;
int a[6];
int ma=0;min=0;
while(1){
scanf("%d",&n);if(n==0)break;
for(int i=0;i<n;i++){
int s=0;
for(int j=0;j<5;j++)
{int x;scanf("%d",&x);s+=x;}
if(i==0)min=s;
if(s>ma)ma=s;
if(s<min)min=s;
}
printf("%d %d\n",ma,min);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:10: error: 'min' was not declared in this scope; did you mean 'main'?
6 | int ma=0;min=0;
| ^~~
| main
|
s383705394 | p01321 | C++ | #include<bits//stdc++.h>
using namespace std;
int main(){
int n;
while(cin>>n&&n!=0){
int a,b;
int ma=-1111111,mi1000000;
for(int i=0;i<n;i++){
b=0;
for(int j=0;j<5;j++) {
cin>>a;
b+=a;
}
ma=max(b,ma);
mi=min(b,mi);
}
cout<<ma<<" "<<mi<<endl;
}
} | a.cc: In function 'int main()':
a.cc:15:25: error: 'mi' was not declared in this scope; did you mean 'i'?
15 | mi=min(b,mi);
| ^~
| i
a.cc:17:32: error: 'mi' was not declared in this scope; did you mean 'ma'?
17 | ... |
s843457912 | p01321 | C++ | #include <iostream>
using namespace std;
int n;
int r;
int sum[100];
int main(){
while (cin >> n && n != 0) {
fill(sum, sum + 99, 0);
for (int i = 0; i < n; i++) {
for (int j = 0; j < 5; j++) {
cin >> r;
sum[i] += r;
}
}
sort(sum, sum + n - 1);
cout << sum[0] << " " << sum[n - 1] << endl;
}
... | a.cc: In function 'int main()':
a.cc:17:17: error: 'sort' was not declared in this scope; did you mean 'short'?
17 | sort(sum, sum + n - 1);
| ^~~~
| short
|
s098543393 | p01321 | C++ | #include <iostream>
#include <algorithm>
#include <math.h>
using namespace std;
int main() {
int n;
while (cin >> n)
int up = 0;
int low = 100000;
for (int i = 0; i < n; i++) {
int sum = 0;
for (int j = 0; j < 5; j++) {
int a;
cin >> a;
sum += a;
}
up = max(up, sum);
low ... | a.cc: In function 'int main()':
a.cc:17:5: error: 'up' was not declared in this scope
17 | up = max(up, sum);
| ^~
a.cc:20:11: error: 'up' was not declared in this scope
20 | cout << up << " " << low << endl;
| ^~
a.cc: At global scope:
a.cc:22:3: error: expected unqualified-id bef... |
s168992132 | p01321 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
main(){
int n;
while(cin>>n && n){
int mini=10000,maxi=-10000;
for(int i=0;i<n;i++){
int now=0,t;
for(int j=0;j<5;j++){
cin>>t;
now+=t;
}
maxi=max(maxi,now);
mini=min(mini,now);
}p
cout << maxi<<" " << mini <... | a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:16:6: error: 'p' was not declared in this scope
16 | }p
| ^
|
s329047234 | p01321 | C++ | #include <stdio.h>
int main() {
int n,i,a,b,c,d,e,sum,maxp,minp;
while(1) {
scanf("%d,&n);
if(n =0) break;
maxp = 0;
minp = 10000000;
for(i=0; i<n; i++) {
scanf("%d%d%d%d%d",&a,&b,&c,&d,&e) ;
sum = a + b + c + d + e ;
if(sum > maxp... | a.cc:7:17: warning: missing terminating " character
7 | scanf("%d,&n);
| ^
a.cc:7:17: error: missing terminating " character
7 | scanf("%d,&n);
| ^~~~~~~~
a.cc:9:1: error: extended character is not valid in an identifier
9 | if(n =0) brea... |
s757166734 | p01321 | C++ | #include <stdio.h>
int main() {
int n,i,a,b,c,d,e,sum,maxp,minp;
while(1) {
scanf("%d,&n);
if(n =0) break;
maxp = 0;
minp = 10000000;
for(i=0; i<n; i++) {
scanf("%d%d%d%d%d",&a,&b,&c,&d,&e) ;
sum = a + b + c + d + e ;
if(sum > maxp... | a.cc:7:17: warning: missing terminating " character
7 | scanf("%d,&n);
| ^
a.cc:7:17: error: missing terminating " character
7 | scanf("%d,&n);
| ^~~~~~~~
a.cc:9:1: error: extended character is not valid in an identifier
9 | if(n =0) brea... |
s040254576 | p01321 | C++ | #include <stdio.h>
int main() {
int n,i,a,b,c,d,e,sum,maxp,minp;
while(1) {
scanf("%d,&n);
if(n = 0) break;
maxp = 0;
minp = 10000000;
for(i=0; i<n; i++) {
scanf("%d%d%d%d%d",&a,&b,&c,&d,&e) ;
sum = a + b + c + d + e ;
if(sum > max... | a.cc:7:17: warning: missing terminating " character
7 | scanf("%d,&n);
| ^
a.cc:7:17: error: missing terminating " character
7 | scanf("%d,&n);
| ^~~~~~~~
a.cc:9:1: error: extended character is not valid in an identifier
9 | if(n = 0) bre... |
s481154808 | p01321 | C++ | #include <stdio.h>
int main() {
int n,i,a,b,c,d,e,sum,maxp,minp;
while(1) {
scanf("%d,&n);
if(n == 0) break;
maxp = 0;
minp = 10000000;
for(i=0; i<n; i++) {
scanf("%d%d%d%d%d",&a,&b,&c,&d,&e) ;
sum = a + b + c + d + e ;
if(sum > ma... | a.cc:7:17: warning: missing terminating " character
7 | scanf("%d,&n);
| ^
a.cc:7:17: error: missing terminating " character
7 | scanf("%d,&n);
| ^~~~~~~~
a.cc:9:1: error: extended character is not valid in an identifier
9 | if(n == 0) br... |
s957294798 | p01321 | C++ | #include<stdio.h>
int main() {
int a,b,c,d,e,n,maxp,minp,i,sum ;
while(1){
scanf("%d,%n) ;
if(n == 0) break;
maxp = 0;
minp = 500;
for(i=0;i<n;i++){
scanf("%d%d%d%d%d".&a,%b,%c,%d,%e) ;
sum = a + b + c + d + e ;
... | a.cc:7:17: warning: missing terminating " character
7 | scanf("%d,%n) ;
| ^
a.cc:7:17: error: missing terminating " character
7 | scanf("%d,%n) ;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:11: error: expected primary-expression before 'if'
... |
s694963116 | p01321 | C++ | #include<stdio.h>
int main() {
int a,b,c,d,e,n,maxp,minp,i,sum ;
while(1){
scanf("%d,%n) ;
if(n == 0) break;
maxp = 0;
minp = 500;
for(i=0;i<n;i++){
scanf("%d%d%d%d%d".&a,%b,%c,%d,%e) ;
sum = a + b + c + d + e ;
... | a.cc:7:17: warning: missing terminating " character
7 | scanf("%d,%n) ;
| ^
a.cc:7:17: error: missing terminating " character
7 | scanf("%d,%n) ;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:11: error: expected primary-expression before 'if'
... |
s644790039 | p01321 | C++ | #include<stdio.h>
int main() {
int a,b,c,d,e,n,maxp,minp,i,sum ;
while(1){
scanf("%d,%n) ;
if(n == 0) break;
minp = 0;
maxp = 500;
for(i=0;i<n;i++){
scanf("%d%d%d%d%d".&a,%b,%c,%d,%e) ;
sum = a + b + c + d + e ;
... | a.cc:7:17: warning: missing terminating " character
7 | scanf("%d,%n) ;
| ^
a.cc:7:17: error: missing terminating " character
7 | scanf("%d,%n) ;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:11: error: expected primary-expression before 'if'
... |
s484153061 | p01321 | C++ | #include <srdio.h>
int main(){
int i,n,maxp,minp,a,b,c,d,e,sum;
while(1){
scanf("%d",&n);
if(n == 0) break;
maxp = 0;
minp = 1000000;
for(i=o; i<n; i++){
scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
sum = a + b + c + d + e;
if(sum > maxp) m... | a.cc:1:10: fatal error: srdio.h: No such file or directory
1 | #include <srdio.h>
| ^~~~~~~~~
compilation terminated.
|
s938079658 | p01321 | C++ | #include <srdio.h>
int main(){
int i,n,maxp,minp,a,b,c,d,e,sum;
while(1){
scanf("%d",&n);
if(n == 0) break;
maxp = 0;
minp = 1000000;
for(i=0; i<n; i++){
scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
sum = a + b + c + d + e;
if(sum > maxp) m... | a.cc:1:10: fatal error: srdio.h: No such file or directory
1 | #include <srdio.h>
| ^~~~~~~~~
compilation terminated.
|
s813263131 | p01321 | C++ | #include <stdio.h>
int main() {
int i,n,maxp,minp,a,b,c,d,e,sum;
while(1){
scanf("%d",&n);
if(n == 0) break;
maxp = 0;
minp = 1000000;
for(i=0; i<n; i++){
scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
sum = a + b + c + d + e;
if(sum > maxp) ... | a.cc: In function 'int main()':
a.cc:21:9: error: 'print' was not declared in this scope; did you mean 'printf'?
21 | print("%d %d\n",maxp,minp);
| ^~~~~
| printf
|
s832912480 | p01321 | C++ | import java.util.Scanner;
public class Main
{
public static void main(String arg[])
{
Scanner in = new Scanner(System.in);
while(in.hasNext())
{
int n=in.nextInt();
if(n==0)
return;
int max=0;
int min=500;
while(n-->0)
{
int s=0;
for(int i=0;i<5;i++)
s+=in.nextInt();
if(ma... | 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:2:1: error: expected unqualified-id before 'public'
2 | public class Main
| ^~~~~~
|
s021994718 | p01321 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
int main() {
int n;
while(true) {
cin >> n;
if(!n) {
break;
}
vector< vector< int > > score(n, vector< int >(5, 0));
vector< int > point(n, 0);
for(int i = 0; i < n; i++) {
for(int j = 0; j < 5; j... | a.cc: In function 'int main()':
a.cc:35:40: error: 'INT_MAX' was not declared in this scope
35 | int p_max = 0, p_min = INT_MAX / 4;
| ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits... |
s879386875 | p01321 | C++ | import sys
def solve():
while True:
n = int(raw_input())
if n == 0:
return
s = []
for i in range(n):
d = map(int,raw_input().split())
s.append(sum(d))
print max(s),min(s)
if __name__ == "__main__":
solve() | a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s975961909 | p01322 | C | 3 3
*******1 100
******22 1000
11111112 1000000
01203291
02382022
11111111
10 10
****3228 149416
****3992 198635
****4286 77783
****4843 225244
***49835 231046
***59393 379996
*5763748 437345
*6726222 58054
*8117882 16375
*9244339 537727
77885716
96726222
26971031
66652868
89599648
37772338
64679621
65479161
92959393
5... | main.c:1:1: error: expected identifier or '(' before numeric constant
1 | 3 3
| ^
main.c:5:1: error: invalid digit "9" in octal constant
5 | 01203291
| ^~~~~~~~
main.c:6:1: error: invalid digit "8" in octal constant
6 | 02382022
| ^~~~~~~~
|
s327680352 | p01322 | C | #include <stdio.h>
int main(void){
int n,m,i,o;
while(1){
scanf("%d %d",&n,&m);
if(!n)break;
int score[];
char atari[100][9],a[1000][9];
for(i=0;i<n;i++){
scanf("%s %d",atari[i],score[i]);
}
for(o=0;o<m;o++){
scanf("%s",a[o]);
}
int ans=0;
int j,k;
for(i=0;i<n;i++){
for(j=0;j<m;j++){
for(k=7;atar... | main.c: In function 'main':
main.c:8:13: error: array size missing in 'score'
8 | int score[];
| ^~~~~
|
s120279223 | p01322 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int n,m;
char tosenB[100][10];
int tosenK[100];
char myB[1000][10];
bool mystrcmp(char s1[],char s2[]){
int len1=strlen(s1);
int len2=strlen(s2);
if(len1 != len2){
return false;
}else{
for(int i=0;i<len1;i++){
if(s1[i]!=s2[i] && s1[i]!='*... | a.cc: In function 'bool mystrcmp(char*, char*)':
a.cc:12:12: error: 'strlen' was not declared in this scope
12 | int len1=strlen(s1);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<cstdio>
+++ |+#includ... |
s502688854 | p01322 | C++ | #include <string>
#include <iostream>
#include <vector>
using namespace std;
main(){
vector<pair<int,pair<string,int> > >v;
int i=0,j,n,m,k;
string s;
loop:
if(cin>>n>>m,!n)return;
for(;i<n;i++){
cin>>s>>k;
for(j=0;s[j]=='*';j++);
v.push_back(make_pair(k,make_pair(s,j)));
}
for(k=0;m;m--){
... | a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
6 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:11:19: error: return-statement with no value, in function returning 'int' [-fpermissive]
11 | if(cin>>n>>m,!n)return;
| ^~~~~~
|
s383733390 | p01322 | C++ | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
class Point{
public:
int n[8],g;
bool operator < (const Point &p) const{ return g > p.g;}
};
int main(){
int i,j,n,m,b[8],ans;
Point p[100];
string str;
while(1){
cin >> n >> m;
if(n == 0 && !m) break;
for(i=0;i<n;i+... | a.cc: In function 'int main()':
a.cc:29:5: error: 'sort' was not declared in this scope; did you mean 'short'?
29 | sort(p,p+n);
| ^~~~
| short
|
s842372628 | p01322 | C++ | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
class Point{
public:
int n[8],g;
bool operator < (const Point &p) const{ return g > p.g;}
};
int main(){
int i,j,n,m,b[8],ans;
Point p[100];
string str;
while(1){
cin >> n >> m;
if(n == 0 && !m) break;
for(i=0;i<n;i+... | a.cc: In function 'int main()':
a.cc:29:5: error: 'sort' was not declared in this scope; did you mean 'short'?
29 | sort(p,p+n);
| ^~~~
| short
|
s240921681 | p01322 | C++ | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
class Point{
public:
int n[8],g;
Point(int g = 0):g(g){}
bool operator < (const Point &p) const{ return g > p.g;}
};
int main(){
int i,j,n,m,b[8],ans;
Point p[100];
string str;
while(1){
cin >> n >> m;
if(n == 0 && !m) ... | a.cc: In function 'int main()':
a.cc:30:5: error: 'sort' was not declared in this scope; did you mean 'short'?
30 | sort(p,p+n);
| ^~~~
| short
|
s329413700 | p01322 | C++ | #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin... | a.cc: In function 'int main()':
a.cc:41:17: error: 'h' was not declared in this scope
41 | if (f) {h
| ^
|
s307082414 | p01322 | C++ | b = lottery[i].f.size()-1#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
using namespace std;
int main(){
int n, m;
string lottery[101];
int value[101];
while(cin >> n >> m){
if(n == 0 && m == 0) break;
for(int i = 0 ; i < n ; i++){
cin >> lo... | a.cc:1:27: error: stray '#' in program
1 | b = lottery[i].f.size()-1#include <iostream>
| ^
a.cc:1:2: error: 'b' does not name a type
1 | b = lottery[i].f.size()-1#include <iostream>
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
f... |
s511286613 | p01322 | C++ | #include<algorithm>
#include<vector>
#include<cstdio>
#include<cstring>
#include<map>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
#define all(n) n.begin(),n.end()
#define N_MAX 100
int n,m;
string NUM[N_MAX];
long R[N_MAX];
string S;
int t,k;
bool is_atari(string s1,string s2... | a.cc:14:1: error: 'string' does not name a type; did you mean 'stdin'?
14 | string NUM[N_MAX];
| ^~~~~~
| stdin
a.cc:17:1: error: 'string' does not name a type; did you mean 'stdin'?
17 | string S;
| ^~~~~~
| stdin
a.cc:21:15: error: 'string' was not declared in this scope
21 | bool is_... |
s498038106 | p01323 | C++ | function bomb(y,x,color){
var dy=[-1,0,0,1];
var dx=[0,-1,1,0];
for(var i=0;i<4;i++){
var yy=y+dy[i];
var xx=x+dx[i];
if(yy<0 || xx<0 || yy>=12 || xx>=6)continue;
if(yx[yy][xx]==color) {
CNT++;
if(CNT==4)p.push([yy,xx]);
yx[yy][xx]=color+CNT;
bomb(yy,... | a.cc:42:21: warning: multi-character character constant [-Wmultichar]
42 | var input = require('fs').readFileSync('/dev/stdin', 'utf8');
| ^~~~
a.cc:42:40: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
42 | var input = require('fs').readFileSync('/dev/... |
s661333264 | p01323 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <vector>
#include <set>
using namespace std;
typedef long long LL;
static const double EPS = 1e-9;
#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,... | a.cc: In function 'void GetBlock()':
a.cc:20:3: error: 'memset' was not declared in this scope
20 | memset(block,0,sizeof(block));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <set>
+++ |+#include <cstring>
... |
s254339074 | p01323 | C++ | #include<iostream>
#include<string>
#include<queue>
#include<vector>
#include<cstring>
using namespace std;
#define REP(i,a,b) for(i=a; i<b; ++i)
#define rep(i,n) REP(i,0,n)
char board[12][6];
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
void print() {
int i,j;
rep(i,12) {
rep(j,6)
cout<<board... | a.cc: In function 'int main()':
a.cc:119:12: error: 'tmpb' was not declared in this scope; did you mean 'tm'?
119 | memset(tmpb, 0, sizeof(tmpb));
| ^~~~
| tm
|
s946723283 | p01323 | C++ | #include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <string>
#include <map>
#include <cctype>
using namespace std;
string area[12];
bool used[12][6];
int dx[] = {
1, 0, -1, 0
};
int dy[] = {
0, -1, 0, 1
};
int count(int i, int j, char c){
int counter = 1;
used[i][j] = true;
for... | a.cc: In function 'bool puyo_delete()':
a.cc:44:33: error: 'memset' was not declared in this scope
44 | memset(used, false, sizeof(used));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#inc... |
s763993479 | p01323 | C++ | #include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <string>
#include <map>
#include <cctype>
using namespace std;
string area[12];
bool used[12][6];
int dx[] = {
1, 0, -1, 0
};
int dy[] = {
0, -1, 0, 1
};
int count(int i, int j, char c){
int counter = 1;
used[i][j] = true;
for... | a.cc: In function 'bool puyo_delete()':
a.cc:47:33: error: 'memset' was not declared in this scope
47 | memset(used, false, sizeof(used));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#inc... |
s714704440 | p01323 | C++ | #include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <list>
#include <string>
#include <map>
#include <cctype>
using namespace std;
string area[12];
bool used[12][6];
int dx[] = {
1, 0, -1, 0
};
int dy[] = {
0, -1, 0, 1
};
int count(int i, int ... | a.cc: In function 'int count(int, int, char)':
a.cc:33:11: warning: no return statement in function returning non-void [-Wreturn-type]
33 | */}
| ^
a.cc: At global scope:
a.cc:34:9: error: expected unqualified-id before 'return'
34 | return counter;
| ^~~~~~
a.cc:35:1... |
s290245394 | p01323 | C++ | #include<iostream>
#include<vector>
using namespace std;
vector<char> vec;
char tab[20][20];
int ans,pre,dx[]={0,0,1,-1},dy[]={1,-1,0,0},plus,used[20][20];
void are1(int y,int x,char c){
pre++;
used[y][x]=1;
int ny,nx;
for(int i=0;i<4;i++){
ny=dy[i]+y;nx=dx[i]+x;
if(ny>=0&&ny<12&&nx>=0&&nx<6){
if(tab[ny][nx]=... | a.cc: In function 'void rensa()':
a.cc:33:9: error: 'memset' was not declared in this scope
33 | memset(used,0,sizeof(used));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<vector>
+++ |+#include <cs... |
s567373230 | p01323 | C++ | #include<iostream>
#include<vector>
using namespace std;
vector<char> vec;
char tab[20][20];
int ans,pre,dx[]={0,0,1,-1},dy[]={1,-1,0,0},plus,used[20][20];
void are1(int y,int x,char c){
pre++;
used[y][x]=1;
int ny,nx;
for(int i=0;i<4;i++){
ny=dy[i]+y;nx=dx[i]+x;
if(ny>=0&&ny<12&&nx>=0&&nx<6){
if(tab[ny][nx]=... | a.cc: In function 'void rensa()':
a.cc:43:33: error: reference to 'plus' is ambiguous
43 | plus++;
| ^~~~
In file included from /usr/include/c++/14/string:49,
from /usr/include/c++/14/bits/locale_classes.h:40,
fro... |
s809797467 | p01323 | C++ | #include<algorithm>
#include<vector>
#include<cassert>
#include<queue>
#include<string.h>
#define F first
#define S second
using namespace std;
typedef pair<int,int> P;
char cmap[13][13];
bool used[13][13];
int imap[13][13];
static const int dx[4] = {0,1,0,-1};
static const int dy[4] = {1,0,-1,0};
int Cnt = 0;
void df... | a.cc: In function 'void display()':
a.cc:64:11: error: 'cout' was not declared in this scope
64 | cout << cmap[i][j] << " ";
| ^~~~
a.cc:6:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
5 | #include<string.h>
+++ |+#inc... |
s006295252 | p01323 | C++ | #define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <cstdio>
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#in... | a.cc: In function 'bool markBlock(bool (*)[6], char (*)[6])':
a.cc:47:9: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
47 | dfs(x,y,stage,toErase,color,&count);
| ^~~
| ffs
|
s022529037 | p01324 | Java | 3
1 km = 10^3 m
1 m = 10^2 cm
1 km = 10^5 cm
7
1 kilometre = 10^3 metre
1 megametre = 10^3 kilometre
1 metre = 10^-6 megametre
1 terametre = 10^3 gigametre
1 petametre = 10^3 terametre
1 gigametre = 10^-6 petametre
1 metre = 10^-15 petametre
4
1 a = 10^2 b
1 a = 10^3 c
1 b = 10^2 c
1 c = 10^1 d
4
1 acm = 10^2 icpc
1 ic... | Main.java:1: error: class, interface, enum, or record expected
3
^
1 error
|
s688467633 | p01324 | Java | 3
1 km = 10^3 m
1 m = 10^2 cm
1 km = 10^5 cm
7
1 kilometre = 10^3 metre
1 megametre = 10^3 kilometre
1 metre = 10^-6 megametre
1 terametre = 10^3 gigametre
1 petametre = 10^3 terametre
1 gigametre = 10^-6 petametre
1 metre = 10^-15 petametre
4
1 a = 10^2 b
1 a = 10^3 c
1 b = 10^2 c
1 c = 10^1 d
4
1 acm = 10^2 icpc
1 ic... | Main.java:1: error: class, interface, enum, or record expected
3
^
1 error
|
s604917955 | p01324 | C++ | #include <iostream>
#include <unordered_map>
#include <unordered_set>
#include <tuple>
#include <list>
int* find(
std::unordered_map<std::string, std::unordered_map<std::string, int> > *map,
const std::string &s1, const std::string &s2)
{
auto it1 = map->find(s1);
if (it1 == map->end()) return NULL;
... | In file included from /usr/include/c++/14/list:65,
from a.cc:5:
/usr/include/c++/14/bits/stl_list.h: In instantiation of 'class std::__cxx11::list<const std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, s... |
s660576420 | p01324 | C++ | #include <string>
#include <cstdio>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
typedef string key_t;
char b1[99],b2[99];
void main2(int n){
map<key_t,vector<pair<key_t,long long>>>m;
for(;n;n--){
int d;
scanf(" 1 %s = 10^%d %s",b1,&d,b2);
string s1=b1,s2=b2;
m[s1].emplace_back... | a.cc:7:16: error: conflicting declaration 'typedef std::string key_t'
7 | typedef string key_t;
| ^~~~~
In file included from /usr/include/stdlib.h:514,
from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/ext/string_conversions.h:43,
... |
s576457260 | p01324 | C++ | REP(i,count){
vector<string>::iterator
it1 = find(tani.begin(),tani.end(),date2[i][0]),
it2 = find(tani.begin(),tani.end(),date2[i][1]);
bool f1 = (it1 != tani.end());
bool f2 = (it2 != tani.end());
int ind1 = ind[distance(tani.begin(),it1)];
int ind2 = ind[distance(tani... | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | REP(i,count){
| ^
a.cc:21:5: error: expected declaration before '}' token
21 | }
| ^
a.cc:22:5: error: expected unqualified-id before 'if'
22 | if(flag) cout << "Yes" << endl;
| ^~... |
s941648169 | p01324 | C++ | #include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
struct E{int from,to,cost;};
int N,n,d[200];
char c;
string s,s2... | a.cc: In function 'int main()':
a.cc:45:17: error: 'memset' was not declared in this scope
45 | memset(d,0,sizeof(d));
| ^~~~~~
a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
11 | #include <stack>
+++ |+#i... |
s719456996 | p01324 | C++ | #include<iostream>
#include<cmath>
#include<map>
#include<vector>
#include<cstdlib>
#include<sstream>
#include<set>
#include<cstdio>
#include<cassert>
#define F first
#define S second
#define inf (1<<28)
#define REP(i,s,n) for(int i=s;i<n;i++)
#define rep(i,n) REP(i,0,n)
using namespace std;
struct P
{
string unit;
... | a.cc: In function 'int main()':
a.cc:111:15: error: 'retult' was not declared in this scope; did you mean 'result'?
111 | if(!retult)continue;
| ^~~~~~
| result
|
s924521974 | p01325 | C++ | // UTPC2010 E. ツトツーツマツスツ・ツδ可イツトツづ個憂ツ鬱
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int n;
int a[10000], b[10000];
int p[10000];
while(cin >> n, n){
for(int i=0;i<n;i++) cin >> a[i];
for(int i=0;i<n;i++) cin >> b[i];
sort(a, a+n);
sort(b, b+n);
memset(p, 0,... | a.cc: In function 'int main()':
a.cc:18:17: error: 'memset' was not declared in this scope
18 | memset(p, 0, sizeof(p));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <algorithm>
+++... |
s973699789 | p01325 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long ll;
int n;
int aa[10001];
int bb[10001];
const int MAX_N=10001;
const int MAX_Q=10001;
const int DAT_SIZE=(1<<18)-1;
int N,Q;
int A[MAX_N];
char T[MAX_Q];
int L[MAX_Q],R[MAX_Q],X[MAX_Q];
// segmentation tree
ll data[DA... | a.cc: In function 'void add(int, int, int, int, int, int)':
a.cc:28:9: error: reference to 'data' is ambiguous
28 | data[k]+=x;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/... |
s550417980 | p01325 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <cstring>
#include <cstdlib>
using namespace std;
typedef long long ll;
int n;
int aa[10001];
int bb[10001];
const int MAX_N=10001;
const int MAX_Q=10001;
const int DAT_SIZE=(1<<18)-1;
int N,Q;
int A[MAX_N];
char T[MAX_Q];
int L[MAX_Q],R[MAX_Q],X[MA... | a.cc: In function 'void add(int, int, int, int, int, int)':
a.cc:30:9: error: reference to 'data' is ambiguous
30 | data[k]+=x;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/... |
s412272125 | p01325 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <cstring>
#include <cstdlib>
using namespace std;
typedef long long ll;
int n;
int aa[10001];
int bb[10001];
const int MAX_N=10001;
const int MAX_Q=10001;
const int DAT_SIZE=(1<<18)-1;
int N,Q;
int A[MAX_N];
char T[MAX_Q];
int L[MAX_Q],R[MAX_Q],X[MA... | a.cc: In function 'void add(int, int, int, int, int, int)':
a.cc:30:9: error: reference to 'data' is ambiguous
30 | data[k]+=x;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/... |
s551503851 | p01326 | C | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
int y;
int values;
int byteSize;
String[] bitPatturn;
Buff... | main.c:1:1: error: unknown type name 'import'
1 | import java.io.BufferedReader;
| ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
1 | import java.io.BufferedReader;
| ^
main.c:2:1: error: unknown type name 'import'
2 | import java.io.IOExc... |
s920132927 | p01326 | C++ | #include <iostream>
#include <string>
#include <vector>
enum { PATTERN_1, PATTERN_2, PATTERN_3, PATTERN_4 };
bool can_match(const std::string &str, const std::string &query)
{
for (int i = 0; i < str.size(); ++i)
if (str.at(i) != 'x' and
str.at(i) != query.at(i))
return false;
... | a.cc: In function 'size_t count(std::vector<std::__cxx11::basic_string<char> >&, size_t)':
a.cc:92:41: error: expected '}' at end of input
92 | variation(getbyte(1), 2, 6);
| ^
a.cc:89:5: note: to match this '{'
89 | {
| ^
a.cc:92:41: error: ... |
s972161314 | p01329 | C++ |
UTPC 2010
Stolen Jewel | a.cc:3:1: error: 'UTPC' does not name a type
3 | UTPC 2010
| ^~~~
|
s385018538 | p01329 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<queue>
#include<cassert>
#define INF (1<<29)
using namespace std;
const string ds="URDL";
const int dx[4]={0,1,0,-1};
const int dy[4]={-1,0,1,0};
int n,m;
vector<string>g;
struct AhoCorasick{
static const int max_n =101;
static co... | a.cc: In constructor 'AhoCorasick::AhoCorasick()':
a.cc:45:10: error: 'memo' was not declared in this scope
45 | fill(memo[0],memo[max_n],-2);
| ^~~~
|
s900649920 | p01329 | C++ | /*
* AOJ 2212: Stolen Jewel
* ???????????°?????????????????°??°???????????¨?????¨???????????????????????¨???????????¶?????????????????¢?????????????????¨???????????????????????¢????¬????????????¶????±???°????????????????°???\??°???
* ?±???????DP+?????????
* ??????????????¢?§???????????????????????????¶???????¢?????... | a.cc: In function 'int Dijkstra()':
a.cc:72:33: error: expected primary-expression before ')' token
72 | if (pq.size() > 1000) while();
| ^
|
s051875149 | p01329 | C++ | #include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
#include <set>
#include <map>
#include <time.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 100000... | a.cc: In function 'void func()':
a.cc:338:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
338 | int main(){
| ^~
a.cc:338:9: note: remove parentheses to default-initialize a variable
338 | int main(){
| ^~
| --
a.cc:338:9: note: o... |
s559084224 | p01330 | C++ | #include <iostream>
using namespace std;
int main()
{
const int nmax = 100;
int as[nmax + 1];
int N, P;
while(cin >> N >> P){
if(N == 0 && P == 0) break;
int count = 0;
for(int i = 0; i <= N; i++){
cin >> as[i];
}
int t = as[N];
for(int z = 0; z < 2; z++){
for(int j = N; j > 0; j--)
t = (t *... | a.cc: In function 'int main()':
a.cc:22:21: error: redeclaration of 'int t'
22 | int t = as[N];
| ^
a.cc:16:21: note: 'int t' previously declared here
16 | int t = as[N];
| ^
|
s572616041 | p01331 | C++ | #include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
const int MOD = 1000000007;
const int MAX_FACT = 200000;
const int MAX_DP = 100000;
inline int mod_mul(int x, int y)
{
return 1LL * x * y % MOD;
}
inline int mod_add(int x, int y)
{
return (x + y) % MOD;
}
inline int mod_sub(int x, in... | a.cc: In function 'void solve()':
a.cc:84:3: error: 'memset' was not declared in this scope
84 | memset(dp, 0, sizeof dp);
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <vector>
+++ |+#include <cstring>
4 |... |
s820377274 | p01333 | C | #define _CRT_SECURE_NO_DEPRECATE
#include "stdafx.h"
#include <stdio.h>
int main(void){
int a,b,c,d,e,f;
while(scanf("%d%d",&a,&b) , a != 0){
c = b - a;
d = c % 500;
e = (c % 1000 - d);
f = c - d - e;
printf("%d %d %d\n",d/100,e/500,f/1000);
}
return 0;
} | main.c:2:10: fatal error: stdafx.h: No such file or directory
2 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s024627933 | p01333 | C | #include <stdio.h>
main(){
int oturi[3]={1000,500,100};
int ans[3];
int a, b, i, temp, sa;
while(1){
scanf("%d %d", &a, &b);
if(a==0 && b==0) break;
sa=b-a;
if(temp>=0){
for(i=0;i<3;i++){
ans[i]=0;
}
for(i=0;;i++){
temp=sa-1000;
if(temp>=0){
ans[0]++;
sa=temp... | main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
3 | main(){
| ^~~~
main.c: In function 'main':
main.c:49:1: error: expected declaration or statement at end of input
49 | }
| ^
|
s643004077 | p01333 | C++ | #include<iostream>
int main() {
int A, B, n;
int x, y, z;
while(1) {
cin >> A >> B;
if(A == 0 && B == 0) break;
n = B - A;
if(n / 1000 > 0) {
x = n / 1000;
n = n % 1000;
}
else
x = 0;
if(n / 500 > 0) {
y = n / 500;
n = n % 500;
}
else
y... | a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
8 | cin >> A >> B;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Li... |
s763932424 | p01333 | C++ | main(x,y,a,b,c){for(;scanf("%d%d",&x,&y),x|y;printf("%d %d %d\n",a,b,c))for(y-=x,a=b=c=0;y;)(y>999)?++c,y-=1000:(y>499)?++b,y-=500:++a,y-=100;} | a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
1 | main(x,y,a,b,c){for(;scanf("%d%d",&x,&y),x|y;printf("%d %d %d\n",a,b,c))for(y-=x,a=b=c=0;y;)(y>999)?++c,y-=1000:(y>499)?++b,y-=500:++a,y-=100;}
| ^
|
s922534776 | p01333 | C++ | main(){int x,y,a,b,c;for(;scanf("%d%d",&x,&y),x|y;printf("%d %d %d\n",a,b,c))for(y-=x,a=b=c=0;y;)(y>999)?++c,y-=1000:(y>499)?++b,y-=500:++a,y-=100;} | a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
1 | main(){int x,y,a,b,c;for(;scanf("%d%d",&x,&y),x|y;printf("%d %d %d\n",a,b,c))for(y-=x,a=b=c=0;y;)(y>999)?++c,y-=1000:(y>499)?++b,y-=500:++a,y-=100;}
| ^~~~
a.cc: In function 'int main()':
a.cc:1:27: error: 'scanf' was no... |
s383334000 | p01333 | C++ | #include <iostream>
using namespace std;
void solve(){
int v,m;
while(cin >> v >> m, (v!=0 && m!=0) ){
int change = m-v;
int th = change/1000;
change -= th*1000;
int fifh = change/500;
change -= fifh*500;
int ah = change/100;
cout << th << " " << fifh << " " << ah << endl;
}
return;
}
int ma... | a.cc:26:2: error: stray '#' in program
26 | }#include <iostream>
| ^
a.cc:26:3: error: 'include' does not name a type
26 | }#include <iostream>
| ^~~~~~~
a.cc:29:6: error: redefinition of 'void solve()'
29 | void solve(){
| ^~~~~
a.cc:4:6: note: 'void solve()' previously defined here
... |
s334289082 | p01333 | C++ | include <iostream>
using namespace std;
int a, b;
int main(){
while(cin >> a >> b, a || b){
int c = b-a;
int cnt1, cnt2, cnt3;
cnt1 = cnt2 = cnt3 = 0;
while(c/1000){
c -= 1000;
cnt1++;
}
while(c/500){
c -= 500;
cnt2++... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:11: error: 'cin' was not declared in this scope
8 | while(cin >> a >> b, a || b){
| ^~~
a.cc:24:9: error: 'cout' was not declared in this scope
24 | cout <... |
s090867356 | p01333 | C++ | include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
int a,b;
while(1){
scanf("%d %d",&a,&b);
if(a==0 && b==0) break;
int turi=b-a;
printf("%d %d %d\n",turi%500/100,turi%1000/500,turi/1000);
}
} | a.cc:1:1: error: 'include' does not name a type
1 | include<cstdio>
| ^~~~~~~
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
fro... |
s388168383 | p01333 | C++ | import sys
def solve():
while True:
v,m = map(int,raw_input().split())
if [v,m] == [0,0]:
return
r1,r5,r10 = 0,0,0
re = m - v
r10 = re / 1000
re %= 1000
r5 = re / 500
re %= 500
r1 = re / 100
print str(r1) + " " + str(r5) + " " + str(r10)
if __name__ == "__main__":
solve() | a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s801433589 | p01333 | C++ | import sys
def solve():
while True:
v,m = map(int,raw_input().split())
if [v,m] == [0,0]:
return
r1,r5,r10 = 0,0,0
re = m - v
r10 = re / 1000
re %= 1000
r5 = re / 500
re %= 500
r1 = re / 100
print str(r1) + " " + str(r5) + " " + str(r10)
if __name__ == "__main__":
solve() | a.cc:1:1: error: 'import' does not name a type
1 | import sys
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s855185364 | p01334 | Java | import java.util.Scanner;
/*
* テ、ツスツ陛・ツ崢榲ァツ崢ョテ」ツ?ョテヲツ篠「テァツエツ「テ」ツ?ァテヲツ敖・テ」ツ?淌」ツ?ョテ」ツ?凝」ツつ津・ツ?・テ」ツつ古」ツ?ヲテ」ツ?甘」ツ??
* テ・ツ青古」ツ?佚・ツ崢榲ヲツ閉ーテァツ崢ョテ」ツ?ョテヲツ篠「テァツエツ「テ」ツ?ェテ」ツつ嘉」ツδォテ」ツδシテ」ツδ療」ツ?ァテ」ツ??ゥツ?陛」ツ??」ツ?ェテ」ツつ嘉」ツつづ」ツ??ヲツ猟「テ」ツ?ォテ」ツ?敕」ツ?ョテ」ツδォテ」ツδシテ」ツδ療」ツ?ッテ」ツつォテ」ツつヲテ」ツδウテ」ツδ暗ヲツクツ暗」ツ?ソ
*/
class E{
int loop;
int x;
int y;
... | Main.java:18: error: class AOJ2217 is public, should be declared in a file named AOJ2217.java
public class AOJ2217 {
^
1 error
|
s353650108 | p01334 | C | 1
0 0
2
1 1 0 1
1 0 0 0
2
1 1 0 1
1 1 1 0
3
0 1 2 2 2 1
0 2 1 2 2 1
0 0 0 1 1 1
4
3 2 2 0 3 2 2 1
1 1 0 3 1 1 3 1
0 3 2 3 3 0 2 3
1 1 1 1 3 2 1 3
0 | main.c:1:1: error: expected identifier or '(' before numeric constant
1 | 1
| ^
|
s576760336 | p01334 | C++ | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
typedef pair<int, int> P;
void dfs()
{
}
void solve()
{
int N;
while(cin >> N, N)
{
vector<vector<P> > field(N, N);
for(int i = 0; i < N; ++i)
{
for(int j = 0; j < N; ++j)
{
cin >> field[i][j].first >> field[i][j].second... | a.cc: In function 'void solve()':
a.cc:18:46: error: no matching function for call to 'std::vector<std::vector<std::pair<int, int> > >::vector(int&, int&)'
18 | vector<vector<P> > field(N, N);
| ^
In file included from /usr/include/c++/14/vector:66,
... |
s300641117 | p01334 | C++ | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
typedef pair<int, int> P;
void solve()
{
int N;
while(cin >> N, N)
{
vector<vector<P> > field(N, N);
for(int i = 0; i < N; ++i)
{
for(int j = 0; j < N; ++j)
{
cin >> field[i][j].first >> field[i][j].second;
}
}
bool ... | a.cc: In function 'void solve()':
a.cc:13:46: error: no matching function for call to 'std::vector<std::vector<std::pair<int, int> > >::vector(int&, int&)'
13 | vector<vector<P> > field(N, N);
| ^
In file included from /usr/include/c++/14/vector:66,
... |
s685558572 | p01334 | C++ | #include <stdio.h>
#include <utility>
using namespace std;
int p[100][100];
pair<int,int> f[100][100];
int dfs(int x,int y){
p[x][y] = 1;
if(p[f[x][y].first][f[x][y].second] == 1) return 1;
else if(p[f[x][y].first][f[x][y].second] == 0) return 0;
else return dfs(f[x][y].first,f[x][y].second);
}
int main(void){
... | a.cc: In function 'int main()':
a.cc:22:17: error: 'memset' was not declared in this scope
22 | memset(p,-1,sizeof(p));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <utility>
+++ |+... |
s576746126 | p01335 | C++ | #include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
int arr[4][13], rank[9], card[5], cnt[13];
string str[5];
int getMark(char ch){
if(ch == 'S'){
return 0;
}else if(ch == 'C'){
return 1;
}else if(ch == 'H'){
return 2;
}
return 3;
}
int getNum(char ch){
if... | a.cc: In function 'int judge()':
a.cc:49:20: error: reference to 'rank' is ambiguous
49 | return rank[8];
| ^~~~
In file included from /usr/include/c++/14/bits/move.h:37,
from /usr/include/c++/14/bits/exception_ptr.h:41,
from /usr/include/c++/14/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.