submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s268382894 | p01513 | C++ | #include <cstdio>
#include <set>
using namespace std;
#define MAX 128
int main()
{
while(1) {
int n;
set<int> know[MAX];
bool leak[MAX];
memset(leak, true, sizeof(leak));
scanf("%d", &n);
if(!n) break;
for(int i = 1; i <= n; i++) {
int m;
scanf("%d", &m);
while(m--) {
int p;
scanf(... | a.cc: In function 'int main()':
a.cc:14:17: error: 'memset' was not declared in this scope
14 | memset(leak, true, sizeof(leak));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <set>
... |
s245228949 | p01513 | C++ | #include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <stack>
#include <deque>
#include <queue>
#include <set>
#include <cmath>
#include <algorithm>
#include <map>
#include <list>
#include <cstdlib>
using namespace std;
typedef pair<int, int> P;
#define MAX 128
int main()
{
while(1) {
... | a.cc: In function 'int main()':
a.cc:27:17: error: 'memset' was not declared in this scope
27 | memset(leak, true, sizeof(leak));
| ^~~~~~
a.cc:14:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
13 | #include <cstdli... |
s341856439 | p01513 | C++ | #include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <stack>
#include <deque>
#include <queue>
#include <set>
#include <cmath>
#include <algorithm>
#include <map>
#include <list>
#include <cstdlib>
using namespace std;
typedef pair<int, int> P;
#define MAX 128
int main()
{
while(1) {
... | a.cc: In function 'int main()':
a.cc:68:18: error: expected '}' at end of input
68 | return 0;
| ^
a.cc:22:1: note: to match this '{'
22 | {
| ^
|
s191586777 | p01513 | C++ | #include <cstdio>
#include <cstring>
#include <cmath>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <functional>
#include <vector>
#include <queue>
#include <string>
#include <complex>
#include <stack>
#include <set>
#include <map>
#define REP(i,n) for (int i = 0; i < (n); i++... | a.cc: In function 'vevector<T> readjag(int)':
a.cc:39:80: error: expected primary-expression before 'int'
39 | template <class T> vevector<T> readjag(int n) { vevector<T> v; REP(i,n) { READ(int,m); v.push_back(read<T>(m)); } return v; }
| ... |
s837661095 | p01514 | Java | import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
import com.sun.org.apache.regexp.internal.recompile;
public class Main{
static int p,t,r;
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
while(true){
t=sc.nextInt();
p=sc.nextInt();
r=sc.... | Main.java:5: error: package com.sun.org.apache.regexp.internal does not exist
import com.sun.org.apache.regexp.internal.recompile;
^
1 error
|
s117632779 | p01514 | C | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main() {
int T,P,R;
int i,j,k,temp;
int **t;
int log_team,log_p,log_time;
char log_m[10];
for(;;) {
scanf("%d %d %d",&T,&P,&R);
if(!T&&!P&&!R) break;
t=malloc(T*sizeof(int));
for(i=0;i<T;i++)
t[i]=(int *)malloc(4*sizeof(int)); //???i?????... | main.c: In function 'main':
main.c:70:9: error: expected declaration or statement at end of input
70 | }
| ^
|
s947157938 | p01514 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <tuple>
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define all(c) (c).begin(), (c).end()
int main(){
int T, P, R;
while(cin >> T >> P >> R, T|P|R){
vector<vector<int> > pen(T, vector<int>(P));
vector<tuple<i... | a.cc: In function 'int main()':
a.cc:27:9: error: 'sort' was not declared in this scope; did you mean 'short'?
27 | sort(all(info));
| ^~~~
| short
|
s587979378 | p01514 | C++ | 1 3 7200
3 1 2600
2 0 0
5 2 7000
3 1 4000
4 1 4000
1 0 0
2 0 0
4 2 2000
5 2 2000
1 2 2600
3 2 2600
2 0 0
6 0 0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1 3 7200
| ^
|
s589672200 | p01514 | C++ | import java.util.Arrays;
import java.util.Scanner;
public class Main {
class Team implements Comparable<Team>{
int id, s;
int[] p;
int ac;
Team(int id, int pro) {
this.id = id;
this.p = new int[pro];
this.s = 0;
this.ac = 0;
}
@Override
public int compareTo(Team o) {
if (this.ac != o.ac... | a.cc:17:17: error: stray '@' in program
17 | @Override
| ^
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 | impo... |
s626781878 | p01514 | C++ | #include<iostream>
#include<vector>
using namespace std;
int G[102][102];
const int INF=-2;
int main(){
int n,m,p;
cin>>n;
for(int i=0;i<102;i++)fill(G[i],G[i]+102,INF);
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
cin>>p;
G[i][p]=1;
}
}
return 0;
}#include<iostream>
#include<vector>
using namespace std;... | a.cc:17:2: error: stray '#' in program
17 | }#include<iostream>
| ^
a.cc:17:3: error: 'include' does not name a type
17 | }#include<iostream>
| ^~~~~~~
a.cc:20:5: error: redefinition of 'int G [102][102]'
20 | int G[102][102];
| ^
a.cc:4:5: note: 'int G [102][102]' previously declared ... |
s803097137 | p01514 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct Team {
int tid, correct, penalty;
Team() {}
Team(int tid, int correct, int penalty) : tid(tid), correct(correct), penalty(penalty) {}
};
bool operator >(const Team& t1, const Team& t2) {
if (t1.correct == t2.correct) return t1... | a.cc: In function 'int main()':
a.cc:28:38: error: 'solved' was not declared in this scope; did you mean 'solver'?
28 | if (!solved[tid][pid]) {
| ^~~~~~
| solver
|
s961860397 | p01514 | C++ | #include <iostream>
#include <string>
using namespace std;
struct Team{
int team_num,time,correct;
};
int main(){
Team data[51];
while(1){
int i,j,T,P,R; cin >> T >> P >> R;
if ( T == 0 && P == 0 && R == 0 ) break;
for( i = 1; i <= T; i++ ){
data[i].time = 0;
data[i].correct = 0;
d... | a.cc: In function 'int main()':
a.cc:63:10: error: cannot convert '__complex__ int' to 'int' in return
63 | return 0j;
| ^~
| |
| __complex__ int
|
s924753752 | p01514 | C++ | include <stdio.h>
#include <string.h>
typedef struct {
int ID;
int penalty;
int solved;
} set;
set team[51];
int i, j;
int wrong[51][11];
int tID, pID, time;
int T, P, R;
char mes[10];
int count;
int max_solved, min_penalty, winner;
void findfirst(void);
int main(void)
{
while(1) {
scanf("%d %d %d... | a.cc:1:1: error: 'include' does not name a type
1 | include <stdio.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:25:9: error: 'scanf' was not declared in this scope
25 | scanf("%d %d %d", &T, &P, &R);
| ^~~~~
a.cc:49:13: error: 'printf' was not declared in this scope
49 | ... |
s106383732 | p01514 | C++ | #include<bits/stdc++.h>
#define I 900000
int x[99],z[99],y[99][20],h[99],a,b,c,d,e,f,i,j,k;string S;
int main(){
while(true){
for(i=0;i<99;i++){x[i]=I;}
memset(y,0,sizeof(y));
memset(h,0,sizeof(h));
std::cin>>a>>b>>c;
if(a==0){break;}
for(i=0;i<c;i++){
std::cin>>d>>e>>f>>S;
if(S[0]=='W'){
y[d][e]++;
}
else{
x[d]+=I;
x[... | a.cc:3:51: error: 'string' does not name a type; did you mean 'stdin'?
3 | int x[99],z[99],y[99][20],h[99],a,b,c,d,e,f,i,j,k;string S;
| ^~~~~~
| stdin
a.cc: In function 'int main()':
a.cc:12:20: error: '... |
s244279100 | p01514 | C++ | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.InputStream;
| ^~~~~~
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.io.IOException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodu... |
s135971213 | p01514 | C++ | #include<iostream>
#include<string>
#include<vector>
using namespace std;
struct team{
int point,penalty,wrong[11],id;
bool operator<(const team& a) const{
return point == a.point ? (penalty == a.penalty ? id < a.id : penalty < a.penalty) : point > a.point;
}
};
int main(){
int t,p,r,i,j,k,b,o,tid,pid,tim... | a.cc: In function 'int main()':
a.cc:35:5: error: 'sort' was not declared in this scope; did you mean 'short'?
35 | sort(teams.begin(),teams.end());
| ^~~~
| short
|
s015848493 | p01514 | C++ | ???#include <vector>
#include <iostream>
#include <string>
#include <algorithm>
#include <tuple>
#define REP(i,n) for(int i=0;i<(n);i++)
#define P pair<int,int>
using namespace std;
bool compare(const tuple<int,int,int> &a, const tuple<int,int,int> &b){
if(get<0>(a) == get<0>(b)){
if(get<1>(a) == get<1>(b)){
r... | a.cc:1:4: error: stray '#' in program
1 | ???#include <vector>
| ^
a.cc:1:1: error: expected unqualified-id before '?' token
1 | ???#include <vector>
| ^
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/1... |
s234836794 | p01514 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
struct Tscore {
int t_id;
int AC_num;
int penalty;
int WA_num[11];
Tscore(int id) {
t_id = id;
AC_num = 0;
penalty = 0;
for (int i = 0; i < 11; i++) WA_num[i] = 0;
}
bool operator ... | a.cc: In function 'int main()':
a.cc:51:9: error: 'sort' was not declared in this scope; did you mean 'short'?
51 | sort(teams.begin(), teams.end());
| ^~~~
| short
|
s885973727 | p01514 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>
#include <fstream>
using namespace std;
#def... | a.cc:40:15: error: 'int time' redeclared as different kind of entity
40 | int tid, pid, time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/... |
s885364649 | p01514 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>
#include <fstream>
using namespace std;
#def... | a.cc:40:15: error: 'int time' redeclared as different kind of entity
40 | int tid, pid, time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/... |
s359154676 | p01514 | C++ | #include<iostream>
#include<tuple>
#include<queue>
using namespace std;
signed main(){
while(1){
int T, P, R;
cin>> T>> P>> R;
if(!(T||P||R)) break;
int hoge[T][P];
fill((int*)hoge, (int*)hoge+T*P, 0);
for(int i=0; i<R; i++){
int team, prob, time;
string s;
... | a.cc: In function 'int main()':
a.cc:39:22: error: 'V' was not declared in this scope
39 | for(int i=0; i<V.size(); i++){
| ^
|
s609279191 | p01514 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int T, P, R, tid, pid, t;
string m;
while (cin >> T >> P >> R, T) {
vector< vector<int> > V(T, vector<int>(3, 0));
vector< vector<int> > Problem(T, vector<int>(P, 0));
for (int i = 0; i < T; ++i) V[i][2] = i+1;
... | a.cc: In function 'int main()':
a.cc:26:5: error: 'sort' was not declared in this scope; did you mean 'short'?
26 | sort(V.begin(), V.end());
| ^~~~
| short
|
s151013429 | p01514 | C++ | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int T, P, R, tid, pid, t;
string m;
while (cin >> T >> P >> R, T) {
vector< vector<int> > V(T, vector<int>(3, 0));
vector< vector<int> > Problem(T, vector<int>(P, 0));
for (int i = 0; i < T; ... | a.cc: In function 'int main()':
a.cc:29:68: error: expected '}' at end of input
29 | cout << V[i][2] << " " << -V[i][0] << " " << V[i][1] << endl;
| ^
a.cc:28:33: note: to match this '{'
28 | for (int i = 0; i < T; ++i) {
| ... |
s641631579 | p01514 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<cmath>
#include<vector>
#include<functional>
#include<stack>
using namespace std;
int T[100000], P[10000], R[10000], tID[10000][500], pID[10000][500], time[10000][500], msg[10000][500], n = 0;
int main() {
while (cin >> T[n] >> P[n] >> R[n]) {
if (T... | a.cc:11:85: error: 'int time [10000][500]' redeclared as different kind of entity
11 | int T[100000], P[10000], R[10000], tID[10000][500], pID[10000][500], time[10000][500], msg[10000][500], n = 0;
| ^
In file included from /us... |
s482718033 | p01514 | C++ | #include<iostream>
#include<algorithm>
#include<string>
#include<cmath>
#include<vector>
#include<functional>
#include<stack>
#include <utility>
using namespace std;
int T[100000], P[10000], R[10000], tID[10000][500], pID[10000][500], time[10000][500], msg[10000][500], n = 0;
int main() {
while (cin >> T[n] >> P[n]... | a.cc:12:85: error: 'int time [10000][500]' redeclared as different kind of entity
12 | int T[100000], P[10000], R[10000], tID[10000][500], pID[10000][500], time[10000][500], msg[10000][500], n = 0;
| ^
In file included from /us... |
s752051326 | p01514 | C++ | //ACCEPT????????????????????????Wrong Answer?????????????????£?????????????????????????????¨?????¨????????????
#include <iostream>
#include <string>
#include <tuple>
#include <algorithm>
using namespace std;
int T, P, R;
int team, prob, t; string mes;
bool isAccepted[50][10];
int acTimeSum[50];
int wrongCnt[50][10];
... | a.cc: In function 'int main()':
a.cc:32:54: error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
32 | isAccepted[team][prob]++;
| ~~~~~~~~~~~~~~~~~~~~~^
|
s302764079 | p01514 | C++ | 3 3 5
3 1 800 WRONG
1 1 1200 CORRECT
3 1 1400 CORRECT
1 2 2400 CORRECT
1 3 3600 CORRECT
5 2 5
3 1 1000 WRONG
5 2 2000 CORRECT
3 1 2800 CORRECT
4 1 4000 CORRECT
5 1 5000 CORRECT
6 3 15
2 1 10 WRONG
3 3 15 WRONG
3 3 20 CORRECT
1 1 50 CORRECT
4 2 60 WRONG
1 2 70 WRONG
4 1 80 CORRECT
1 2 90 WRONG
1 2 150 CORRECT
3 1 160 WR... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3 3 5
| ^
|
s119672067 | p01514 | C++ | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); ++i)
struct Info
{
int solved, time, tid, wrong[11];
bool operator< (const Info &rhv) const {
return solved == rhv.solved ?
(time == rhv.time ? tid < rhv.tid : time < rhv.t... | a.cc: In function 'int main()':
a.cc:26:9: error: 'memset' was not declared in this scope
26 | memset(info, 0, sizeof(info));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++ |+#include... |
s184964056 | p01514 | C++ | #include <stdio.h>
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
class State
{
public:
int No,ok,pena;
State(int No = 0,int ok = 0, int pena = 0):
No(No),ok(ok),pena(pena){}
bool operator < (const State &ano) const{
if(ok > ano.ok)return true;
else if(ok == ano.ok && pena < a... | a.cc: In function 'int main()':
a.cc:55:60: error: expected ')' before 'a'
55 | printf("%d %d %d\n",a[i].No,a[i].ok a[i].pena);
| ~ ^~
| )
|
s278808093 | p01514 | C++ | #include<iostream>
#include<cstring>
#include<string>
#include<algorithm>
using namespace std;
int t, p, r, tID, pID, times;
int point[100], wrong[100][100], penalty[100], ans[100];
string message;
bool AC_comp(const int &a, const int &b){
if(point[a] == point[b]){
if(penalty[a] == penalty[b])
return return... | a.cc: In function 'bool AC_comp(const int&, const int&)':
a.cc:14:20: error: expected primary-expression before 'return'
14 | return return a < b;
| ^~~~~~
a.cc:14:19: error: expected ';' before 'return'
14 | return return a < b;
| ^~~~~~~
... |
s455156502 | p01514 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
struct A{
int n;
int pena;
int id;
bool operator<(const A &a)const{
if(n!=a.n)return n>a.n;
if(pena!=a.pena)return pena<a.pena;
return id<a.id;
}
};
int main(){
int T,P,R;
int p[50][10];
A team[50];
while(cin>>T>>P>>R,T|P|R){
... | a.cc: In function 'int main()':
a.cc:22:17: error: 'memset' was not declared in this scope
22 | memset(p,0,sizeof(p));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
+++ |+... |
s610365187 | p01514 | C++ | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <string>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#define rep(i,j) REP((i), 0, (j))
#define REP(i,j,k) for(int i=(j);(i)<(k);++i)
#define between(a,x,b) ((a)<=(x)&&(x)<=(... | a.cc: In function 'int main()':
a.cc:41:36: error: expected ';' before 'fail'
41 | t[tid].second.second += 1 //fail[tid][pid] * 1200 + time;
| ^
| ;
42 | fail[tid][pid] = -1;
| ~~~~ ... |
s867510356 | p01514 | C++ |
import java.io.*;
import java.util.*;
public class Main {
FastScanner in = new FastScanner(System.in);
PrintWriter out = new PrintWriter(System.out);
class Team implements Comparable<Team> {
int id, solve, penalty;
int[] wrong;
Team(int id, int solve, int penalty, int n) {
this.id = id;
this.solve... | a.cc:20:17: error: stray '@' in program
20 | @Override
| ^
a.cc:31:17: error: stray '@' in program
31 | @Override
| ^
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' o... |
s091600809 | p01515 | Java | public class Main {
abstract class P {
abstract boolean getValue();
}
class AND extends P {
P left;
P right;
public AND(P l, P r) {
left = l;
right = r;
}
boolean getValue() {
return left.getValue() && right.getValue();
}
public String toString(){
return "("+left+"∧"+right+")";
}
... | Main.java:218: error: as of release 9, '_' is a keyword, and may not be used as an identifier
public static void main(String[] _) throws Exception {
^
1 error
|
s138015681 | p01515 | Java | package vol24.no2401;
import java.util.Scanner;
import java.util.regex.Pattern;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNext()) {
String str = in.next();
if (!"#".equals(str)) {
String[] lr = str.split("=");
Formula left = Formula.of(lr... | Main.java:46: error: non-static variable this cannot be referenced from a static context
Not n = new Not(of(string.substring(1)));
^
1 error
|
s438203860 | p01515 | C | /*
AizuOnline A2401
Title Equation
13/3/24 WA
*/
#include <stdio.h>
// Select Below
//#include <stdlib.h>
#include <string.h>
//#include <float.h>
//#include <math.h>
//#include <limits.h>
//Global data section
#define MAXLEN 1001
#define NVARS 10
char expr[MAXLEN];
//
void strreplace(char * s,int len,char from,char t... | main.c:150:1: error: return type defaults to 'int' [-Wimplicit-int]
150 | main()
| ^~~~
main.c: In function 'main':
main.c:155:34: error: 's' undeclared (first use in this function)
155 | while(EOF!=scanf("%s",expr) && s[0]!='#')
| ^
main.c:155:34: note: each undeclare... |
s298431232 | p01515 | C++ | #include <bits/stdc++.h>
using namespace std;
int i, v; string s;
int () {
i++;
if(s[i]=='T') return 1;
if(s[i]=='F') return 0;
if(isalpha(s[i])) return v>>(s[i]-'a')&1;
if(s[i]=='-') return !P();
int l=P();
i++;char o=s[i];if(o=='-')i++;
int r=P();i++;
if(o=='*') return l&r;
if(o=='+') return l|r;
... | a.cc:4:6: error: expected unqualified-id before ')' token
4 | int () {
| ^
a.cc: In function 'int main()':
a.cc:23:19: error: 'P' was not declared in this scope
23 | i=-1; int l=P();
| ^
|
s773103801 | p01515 | C++ | #include<bits/stdc++.h>
int i,v;string s;
int P() {
i++;
if(s[i]=='T')return 1;
if(s[i]=='F')return 0;
if(isalpha(s[i]))return v>>(s[i]-'a')&1;
if(s[i]=='-')return !P();
int l=P();
i++;int o=s[i];if(o=='-')i++;
int r=P();i++;
if(o=='*')return l&r;
if(o=='+')return l|r;
if(o=='-')return l<=r;
}
int... | a.cc:2:9: error: 'string' does not name a type; did you mean 'stdin'?
2 | int i,v;string s;
| ^~~~~~
| stdin
a.cc: In function 'int P()':
a.cc:5:6: error: 's' was not declared in this scope
5 | if(s[i]=='T')return 1;
| ^
a.cc:6:6: error: 's' was not declared in this scop... |
s778097935 | p01515 | C++ |
#include <iostream>
#include <string>
using namespace std;
string s;
int i;
bool f[256];
bool imp(bool x, bool y){
if ( x && y)return true;
if ( x && !y)return false;
if (!x && y)return true;
if (!x && !y)return true;
}
bool form(){
if (s[i] == 'T'){ i++; return true; }
if (s[i] == 'F'){ i++; return fals... | a.cc: In function 'int main()':
a.cc:67:17: error: 'memset' was not declared in this scope
67 | memset(f,0,256*sizeof(bool));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <iostream>
... |
s092645988 | p01515 | C++ | #include <iostream>
#include <string>
#include <stack>
using namespace std;
char wa(char a, char b);
char seki(char a, char b);
char naraba(char a, char b);
char not(char a);
bool kaiseki(string b) {
stack<char> stk1;
stack<char> stk2;
char aa, bb;
for (int i = 0; i < b.size(); i++) {
if (b[i] == '=') {
aa ... | a.cc:10:6: error: expected unqualified-id before 'not' token
10 | char not(char a);
| ^~~
a.cc:89:6: error: expected unqualified-id before 'not' token
89 | char not(char a) {
| ^~~
|
s197785965 | p01515 | C++ | #include<bits/stdc++.h>
using namespace std;
string s;
int p;
int equation();
int formula();
//1:true 0:false
int equation(){
int a=formula();
if(s[p]=='=')p++;//'='
int b=formula();
cout<<"a "<<a<<" b "<<b<<endl;
//if(a==b && a!=-1)return 1;
else return 0;
}
//1:true 0:false -1:?????°
int formula(){
... | a.cc: In function 'int equation()':
a.cc:17:3: error: 'else' without a previous 'if'
17 | else return 0;
| ^~~~
|
s546864551 | p01515 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
#define MAX_NUM 2
#define MAX_CH 10
#define MAX_N 1200
string S, T;
char NUM[MAX_NUM + 1] = "01";
char CH[MAX_CH + 1] = "abcdefghij";
int TR[MAX_CH];
int CNT[MAX_N];
int Plus(int c1, int c2) {
return max(c1, c2);
}
int kak... | a.cc: In function 'int calc2(std::string)':
a.cc:34:22: error: 'STOI' was not declared in this scope
34 | p1 = STOI(A2[0]);
| ^~~~
a.cc:49:30: error: 'STOI' was not declared in this scope
49 | p1 = STOI(A2[1]);
| ... |
s886863537 | p01515 | C++ | #include <iostream>
#include <algorithm>
#include <array>
using namespace std;
const int N = 11;
const int B = 1<<11;
using V = bitset<B>;
#ifndef HELLO_HPP_
#define HELLO_HPP_
// This file was automatically generated by Caper.
// (http://jonigata.github.io/caper/caper.html)
#include <cstdlib>
#include <cassert>
#i... | a.cc:8:11: error: 'bitset' does not name a type
8 | using V = bitset<B>;
| ^~~~~~
a.cc: In member function 'bool calc::Parser<_Value, _SemanticAction, _StackSize>::call_0_Merge(Nonterminal, int, int, int)':
a.cc:270:2: error: 'V' was not declared in this scope
270 | V arg0; sa_.downcast(arg0, get... |
s442188119 | p01515 | C++ | #include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <func... | a.cc: In function 'int main()':
a.cc:142:42: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>'
142 | if (cal(s2.substr(0, eq), idx1) != cal(s2.substr(eq + 1, s2.length() - eq - ... |
s303530028 | p01515 | C++ | #include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <func... | a.cc: In function 'int main()':
a.cc:141:33: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::__cxx11::basic_string<char>'
141 | if (cal((string)s2.substr(0, eq), idx1) != cal((string)s2.substr(eq + 1, s2.... |
s478147510 | p01515 | C++ | #include<string>
#define MAX 13
using namespace std;
bool o;
void rec(string s){
if(!o) return;
//cout << s << endl;
bool f;
int p;
while(s.find("-0")!=-1){
p=s.find("-0");
s[p]='1';s[p+1]=' ';
f=true;
}
while(s.find("-1")!=-1){
p=s.find("-1");
s[p]='0';s[p+1]=' ';
f=true;
}
wh... | a.cc: In function 'int main()':
a.cc:102:9: error: 'cin' was not declared in this scope
102 | while(cin >> s,s!="#"){
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<string>
+++ |+#include <iostream>
2 ... |
s018173295 | p01515 | C++ | #include<string>
#define MAX 11
using namespace std;
bool o;
void rec(string s){
if(!o) return;
//cout << s << endl;
while(1){
bool f=false;
int p;
while(s.find("-0")!=-1){
p=s.find("-0");
s[p]='1';s[p+1]=' ';
f=true;
}
while(s.find("-1")!=-1){
p=s.find("-1");
... | a.cc: In function 'int main()':
a.cc:108:9: error: 'cin' was not declared in this scope
108 | while(cin >> s,s!="#"){
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<string>
+++ |+#include <iostream>
2 ... |
s151307988 | p01515 | C++ | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a) (a).begin(),(a).end()
#define pb push_back
#define INF (1e9+1)
//#define INF (1LL<<59)
typedef string::const_iterator State;
string getop(State &begin){
if(*begin... | a.cc: In function 'bool exp(State&)':
a.cc:49:12: error: 'isnumber' was not declared in this scope
49 | if(isnumber(*begin)){
| ^~~~~~~~
|
s052897785 | p01515 | C++ | 'use strict';
function token(s) {
var len = s.length;
return function (target, pos) {
return target.substr(pos, len) === s ? [true, s, pos + len] : [false, null, pos];
};
}
function choice() {
var parsers = arguments;
return function (target, pos) {
var _iteratorNormalCompletion = true;
var _did... | a.cc:1:1: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
1 | 'use strict';
| ^~~~~~~~~~~~
a.cc:139:53: warning: multi-character character constant [-Wmultichar]
139 | var impP = fmap(seq(token('('), formulaP, token('->'), formulaP, token(')')), function (x) {
| ... |
s443286544 | p01515 | C++ | 'use strict';
function token(s) {
const len = s.length;
return (target, pos) =>
target.substr(pos, len) === s ? [true, s, pos + len]
: [false, null, pos];
}
function choice() {
const parsers = arguments;
return (target, pos) => {
for (let parser of parsers) {
const parsed = parser(target, ... | a.cc:1:1: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
1 | 'use strict';
| ^~~~~~~~~~~~
a.cc:1:1: error: expected unqualified-id before '\x72696374'
a.cc:3:1: error: 'function' does not name a type; did you mean 'union'?
3 | function token(s) {
| ^~~~~~~~
|... |
s651100786 | p01515 | C++ | #include <functional>
#include <iostream>
#include <string>
#include <unordered_set>
#include <vector>
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
template<typename A> using F = std::function<A>;
using namespace std;
template<typename T> struct ParseResult {
bool succeeded;... | a.cc: In function 'Parser<T> make_view(Parser<T>&&)':
a.cc:98:20: error: 'make_shared' is not a member of 'std'
98 | return [f = std::make_shared<T>(std::move(f))](const std::string &target, const int pos) {
| ^~~~~~~~~~~
a.cc:5:1: note: 'std::make_shared' is defined in header '<memory>'; ... |
s135475598 | p01515 | C++ | #include <functional>
#include <iostream>
#include <string>
#include <unordered_set>
#include <vector>
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
template<typename A> using F = std::function<A>;
using namespace std;
template<typename T> struct ParseResult {
bool succeeded;... | a.cc: In function 'Parser<T> make_view(Parser<T>&&)':
a.cc:98:20: error: 'make_shared' is not a member of 'std'
98 | return [f = std::make_shared<Parser<T>>(std::move(f))](const std::string &target, const int pos) {
| ^~~~~~~~~~~
a.cc:5:1: note: 'std::make_shared' is defined in header '<me... |
s039228228 | p01515 | C++ | // g++ -std=c++11 a.cpp
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include<cstring>
#include<queue>
#include<stack>
#include<bitset>
#include<cstdio>
#include<sstream>
#include<iomanip>
#include<assert.h>
#include<typeinfo>
#d... | a.cc: In function 'int main()':
a.cc:89:43: error: cannot bind non-const lvalue reference of type 'State&' {aka 'std::__cxx11::basic_string<char>::const_iterator&'} to an rvalue of type 'State' {aka 'std::__cxx11::basic_string<char>::const_iterator'}
89 | if(formula(s.begin())==formula(t.begi... |
s842674718 | p01515 | C++ | #include<iostream>
#include<string>
using namespace std;
int not(int a){
if(a==1) return 0;
return 1;
}
int and(int a,int b){
if(a==1 && b==1) return 1;
return 0;
}
int or(int a,int b){
if(a==0 && b==0) return 0;
return 1;
}
int naraba(int a,int b){
if(a==0 || (a==1 && b==1)) return 1;
return 0;
}
string s... | a.cc:5:5: error: expected unqualified-id before 'not' token
5 | int not(int a){
| ^~~
a.cc:10:9: error: expected unqualified-id before 'int'
10 | int and(int a,int b){
| ^~~
a.cc:10:9: error: expected ')' before 'int'
10 | int and(int a,int b){
| ~^~~
| )
a.c... |
s445583144 | p01515 | C++ | #include<iostream>
#include<string>
using namespace std;
int not(int a){
if(a==1) return 0;
return 1;
}
int and(int a,int b){
if(a==1 && b==1) return 1;
return 0;
}
int or(int a,int b){
if(a==0 && b==0) return 0;
return 1;
}
int naraba(int a,int b){
if(a==0 || (a==1 && b==1)) return 1;
return 0;
}
string s... | a.cc:5:5: error: expected unqualified-id before 'not' token
5 | int not(int a){
| ^~~
a.cc:10:9: error: expected unqualified-id before 'int'
10 | int and(int a,int b){
| ^~~
a.cc:10:9: error: expected ')' before 'int'
10 | int and(int a,int b){
| ~^~~
| )
a.c... |
s386927279 | p01515 | C++ | #include <iostream>
using namespace std;
bool formula(string &s, int &p)
{
if (s[p] == 'T') {
++p;
return true;
} else if (s[p] == 'F') {
++p;
return false;
} else if (s[p] == '-') {
++p;
return !formula(s, p);
} else if (s[p] == '(') {
++p;
bool lhs = formula(s, p);
if (s[p] == '*') {
++... | a.cc: In function 'int main()':
a.cc:67:21: error: 'binary_search' was not declared in this scope
67 | if (binary_search(V.begin(), V.end(), t[j])) {
| ^~~~~~~~~~~~~
a.cc: In function 'bool formula(std::string&, int&)':
a.cc:39:1: warning: control reaches end of non-void fun... |
s570382562 | p01515 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#define all(c) c.begin(),c.end()
#define uni(c) c.erase(unique(c.begin(),c.end()),c.end())
#define pb push_back
using namespace std;
int expr(string& s, int& i);
int term(string& s, int& i);
int factor(string& s, int& i);
int number(string& s, int& i);
int expr... | a.cc: In function 'int main()':
a.cc:120:38: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
120 | cout<<expr(x,0)<<" "<<expr(y,0)<<endl;
| ^
a.cc:15:26: note: initializing argument 2 of 'int expr(std::string... |
s617031748 | p01515 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#define all(c) c.begin(),c.end()
#define uni(c) c.erase(unique(c.begin(),c.end()),c.end())
#define pb push_back
using namespace std;
int expr(string& s, int& i);
int term(string& s, int& i);
int factor(string& s, int& i);
int number(string& s, in... | a.cc: In function 'int main()':
a.cc:118:38: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
118 | cout<<expr(x,0)<<" "<<expr(y,0)<<endl;
| ^
a.cc:16:26: note: initializing argument 2 of 'int expr(std::string... |
s329527012 | p01515 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#define all(c) c.begin(),c.end()
#define uni(c) c.erase(unique(c.begin(),c.end()),c.end())
#define pb push_back
using namespace std;
int expr(string& s, int& i);
int term(string& s, int& i);
int factor(string& s, int& i);
int number(string& s, in... | a.cc:117:25: error: stray '\' in program
117 | \if(expr(x,0)!=expr(y,0)){
| ^
a.cc: In function 'int main()':
a.cc:117:36: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
117 | \if(expr(x,0)!=expr(y... |
s021244208 | p01515 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <bitset>
#define rep(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, b)... | a.cc: In function 'bool dfs(std::string&, int)':
a.cc:95:32: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
95 | if(!dfs(replace(s, val[i], "TF"[j]), i+1)) retur... |
s510232278 | p01515 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <bitset>
#define rep(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, b)... | a.cc: In function 'bool dfs(std::string&, int)':
a.cc:96:32: error: cannot bind non-const lvalue reference of type 'std::string&' {aka 'std::__cxx11::basic_string<char>&'} to an rvalue of type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
96 | if(!dfs(replace(s, val[i], "TF"[j]), i+1)) retur... |
s903604238 | p01515 | C++ | // Equation
import java.util.*;
public class Main {
static int pos;
static String equation;
static int a, b, c, d, e, f, g, h, i, j, k;
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (true) {
equation = scanner.next();
if (equation.equals("#"))
break;
boo... | a.cc:2:1: error: 'import' does not name a type
2 | import java.util.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
4 | public class Main {
| ^~~~~~
|
s965225986 | p01516 | C++ | 1 1 1
5 5 0 5
2 1 2
5 5 0 5
15 5 0 5
3 2 3
15 15 0 5
5 5 10 5
25 25 20 5
0 0 0
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1 1 1
| ^
|
s364321197 | p01516 | C++ | 1 1 1
5 5 0 5
2 1 2
5 5 0 5
15 5 0 5
3 2 3
15 15 0 5
5 5 10 5
25 25 20 5
0 0 0
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 1 1 1
| ^
|
s766528451 | p01516 | C++ | //Based on Spaghetti source (http://www.prefield.com/algorithm/geometry/ccw.html.)
//Based on the library written by tailed.
#include <complex>
#include <vector>
#include <iostream>
#include <cassert>
using namespace std;
typedef complex<double> xy_t;
typedef pair<xy_t, xy_t> line_t;
typedef pair<xy_t, double> circle... | /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
|
s151687985 | p01516 | C++ | #include<vector>
#include<iostream>
#include<string>
#include<algorithm>
#include<complex>
#include<cmath>
#define pb(a) push_back(a)
const double EPS = 1e-8;
using namespace std;
const double INF = 1e12;
typedef complex<double> P;
namespace std{
bool operator<(const P& a,const P& b){
return real(a)!=real(b)?real(a)... | a.cc: In function 'std::vector<L> hoge(int, int, int, int)':
a.cc:73:27: error: lvalue required as left operand of assignment
73 | ps[i].real()=x+cos(a);
| ~~~~~~~~~~^~
a.cc:74:27: error: lvalue required as left operand of assignment
74 | ps[i].imag()=y+sin(a)... |
s848246215 | p01516 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<cstring>
#include<cctype>
#include<complex>
#include<algorithm>
#include<iomanip>
#define rep(X,Y) for(int X=0;(X)<(Y);++X)
#define X first
#define Y second
#define pb push_back
using namespace std;
typedef pair<int,int> pii;
typedef pair<int,pii> piii;
c... | In file included from /usr/include/c++/14/cmath:47,
from /usr/include/c++/14/complex:44,
from a.cc:6:
a.cc:74:14: error: expected unqualified-id before numeric constant
74 | const double M_PI=3.14159265358979;
| ^~~~
|
s582860030 | p01516 | C++ | #include <complex>
#include <cmath>
#include <iostream>
#include <utility>
#include <vector>
#include <cassert>
#include <algorithm>
#include <cstdio>
#include <climits>
using namespace std;
#define X real()
#define Y imag()
#define fi first
#define se second
typedef complex<double> PT;
typedef PT VC;
typedef pair<P... | a.cc: In function 'double dist_seg_seg(SG, SG)':
a.cc:64:22: error: 'DBL_MAX' was not declared in this scope
64 | double res = DBL_MAX;
| ^~~~~~~
a.cc:10:1: note: 'DBL_MAX' is defined in header '<cfloat>'; this is probably fixable by adding '#include <cfloat>'
9 | #include <cli... |
s464573277 | p01516 | C++ | #ifndef _WIN32
#include<iostream>
#endif
#include<cmath>
#include<iomanip>
#include<algorithm>
#include<vector>
#include<string>
#include<map>
#include<tuple>
#include<complex>
#include<queue>
#include<functional>
using namespace std;
typedef long long LL;
#define FOR(i,bg,ed) for(int i=(bg);i<(ed);i++)
#define REP(i,... | a.cc:62:8: error: 'B' does not name a type
62 | IL B is_LS_LS(LS p, LS q) {
| ^
a.cc: In function 'D distance_LS_LS(LS, LS)':
a.cc:71:12: error: 'is_LS_LS' was not declared in this scope
71 | if(is_LS_LS)return 0;
| ^~~~~~~~
a.cc:73:33: error: 'LS' {aka 'struct std::pair<... |
s843586359 | p01516 | C++ | #ifndef _WIN32
#include<iostream>
#endif
#include<cmath>
#include<iomanip>
#include<algorithm>
#include<vector>
#include<string>
#include<map>
#include<tuple>
#include<complex>
#include<queue>
#include<functional>
using namespace std;
typedef long long LL;
#define FOR(i,bg,ed) for(int i=(bg);i<(ed);i++)
#define REP(i,... | a.cc: In function 'D distance_LS_LS(LS, LS)':
a.cc:74:33: error: 'LS' {aka 'struct std::pair<std::complex<double>, std::complex<double> >'} has no member named 'fi'
74 | distance_P_LS(p.fi,q),
| ^~
a.cc:75:33: error: 'LS' {aka 'struct std::pair<std::complex<doubl... |
s481239270 | p01516 | C++ | #include <iostream>
#include <iomanip>
#include <cmath>
#define REP(i,n) for(int i = 0;i < (n);i++)
#define FOR(i,a,n) for(int i = (a);i < (n);i++)
const double M_PI = acos(-1);
const double EPS = 1e-10;
const double INF = 1e9;
using namespace std;
int N,M,L;
struct Point{
double x,y;
Point operator - (const ... | In file included from /usr/include/c++/14/cmath:47,
from a.cc:3:
a.cc:6:14: error: expected unqualified-id before numeric constant
6 | const double M_PI = acos(-1);
| ^~~~
|
s099950755 | p01516 | C++ | #include <iostream>
#include <iomanip>
#include <cmath>
#define REP(i,n) for(int i = 0;i < (n);i++)
#define FOR(i,a,n) for(int i = (a);i < (n);i++)
const double M_PI = acos(-1);
const double EPS = 1e-10;
const double INF = 1e9;
using namespace std;
int N,M,L;
struct Point{
double x,y;
Point operator - (const ... | In file included from /usr/include/c++/14/cmath:47,
from a.cc:3:
a.cc:6:14: error: expected unqualified-id before numeric constant
6 | const double M_PI = acos(-1);
| ^~~~
|
s178250588 | p01516 | C++ | #include <iostream>
#include <iomanip>
#include <cmath>
#define REP(i,n) for(int i = 0;i < (n);i++)
#define FOR(i,a,n) for(int i = (a);i < (n);i++)
const double M_PI = acos(-1);
const double EPS = 1e-10;
const double INF = 1e9;
using namespace std;
int N,M,L;
struct Point{
double x,y;
Point operator - (const ... | In file included from /usr/include/c++/14/cmath:47,
from a.cc:3:
a.cc:6:14: error: expected unqualified-id before numeric constant
6 | const double M_PI = acos(-1);
| ^~~~
|
s922183312 | p01516 | C++ | #include <iostream>
#include <iomanip>
#include <cmath>
#define REP(i,n) for(int i = 0;i < (n);i++)
#define FOR(i,a,n) for(int i = (a);i < (n);i++)
double M_PI = acos(-1);
const double EPS = 1e-10;
const double INF = 1e9;
using namespace std;
int N,M,L;
struct Point{
double x,y;
Point operator - (const Point&... | In file included from /usr/include/c++/14/cmath:47,
from a.cc:3:
a.cc:6:8: error: expected unqualified-id before numeric constant
6 | double M_PI = acos(-1);
| ^~~~
|
s786231544 | p01516 | C++ | #include<bits/stdc++.h>
using namespace std;
#define INF 1e10
#define EPS (1e-10) //誤差
typedef complex<double> P;
struct star{
P point[5];
};
//実数同士の比較
bool EQ(double a, double b){
return (abs(a - b) < EPS);
}
//二つのベクトルが等しいかどうか
bool EQV(P a, P b){
return (EQ(a.real(), b.real()) && EQ(a.imag(), b.i... | a.cc:27:8: error: redefinition of 'struct star'
27 | struct star{
| ^~~~
a.cc:7:8: note: previous definition of 'struct star'
7 | struct star{
| ^~~~
a.cc:32:6: error: redefinition of 'bool EQ(double, double)'
32 | bool EQ(double a, double b){
| ^~
a.cc:12:6: note: 'bool E... |
s437336782 | p01516 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<bitset>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; i++ )
#define rep(i,n) REP(i,0,n)
typedef lo... | a.cc: In function 'int main()':
a.cc:106:42: error: 'm' was not declared in this scope
106 | cout<<fixed<<setprecision(12)<<d[m-1][l-1]<<endl;
| ^
a.cc:106:47: error: 'l' was not declared in this scope
106 | cout<<fixed<<setprecision(12)<<d[m-1][l-1]<<e... |
s657523909 | p01516 | C++ | #include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstr... | a.cc:75:37: error: macro "EQ" passed 3 arguments, but takes just 2
75 | if(EQ(cross(a1-a2,b1-b2),0,0))return false;
| ^
a.cc:73:9: note: macro "EQ" defined here
73 | #define EQ(a,b) (abs((a)-(b))<EPS)
| ^~
a.cc: In function 'bool crossing(P, P, P, P)... |
s763843894 | p01516 | C++ | #include <cstdio>
#include <iostream>
#include <vector>
#include <functional>
#include <numeric>
#include <string>
#include <iterator>
#include <sstream>
#include <map>
#include <set>
#include <utility>
#include <algorithm>
#include <complex>
#include <cmath>
using namespace std;
int N,M,L;
typedef complex<double> P... | a.cc: In function 'double get_min(int, int)':
a.cc:53:21: error: 'INT_MAX' was not declared in this scope
53 | double mn = INT_MAX;
| ^~~~~~~
a.cc:15:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
14 | #include <cmath>... |
s520105005 | p01516 | C++ | #include<cmath>
#include<cstdio>
#include<algorithm>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
const double INF=1e77;
const double EPS=1e-8;
const double PI=acos(-1);
template<class T>
struct point{
T x,y;
point operator+(const point &a)const{ point t = {x+a.x,y+a.y}; return t; }
... | a.cc: In function 'point<T> operator*(T, const point<T>&)':
a.cc:22:22: error: expected primary-expression before 'p'
22 | return (point<T> p = {c*a.x,c*a.y});
| ^
a.cc:22:21: error: expected ')' before 'p'
22 | return (point<T> p = {c*a.x,c*a.y});
| ~ ^~... |
s030313909 | p01516 | C++ | #include <iostream>
#include<string>
#include <complex>
#include<list>
#include<float.h>
#include <functional>
#include <vector>
#include <map>
#include <queue>
#include <pair.h>
using namespace std;
typedef complex<double> P;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define REP0(i,n) REP(i,0,n)
#define foreach(it,o)... | a.cc:10:10: fatal error: pair.h: No such file or directory
10 | #include <pair.h>
| ^~~~~~~~
compilation terminated.
|
s962069752 | p01516 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<functional>
#include<numeric>
#include<queue>
#include<stack>
#include<cmath>
#include<complex>
#define INF 10000000.0
#define pb push_back
using namespace std;
#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0; i<(int)(n... | a.cc:16:9: error: '__int64' does not name a type; did you mean '__int64_t'?
16 | typedef __int64 ll;
| ^~~~~~~
| __int64_t
|
s067792054 | p01516 | C++ | #include <iostream>
#include <complex>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
using namespace std;
typedef complex<double> Point;
typedef pair<double, int> P;
struct Segment{
Point p1, p2;
};
typedef Segment Line;
class ST{
public:
double x, y, a, r;
ST(){}
ST(double x, doub... | a.cc: In function 'Point rotate(Point, Point, double)':
a.cc:87:11: error: lvalue required as left operand of assignment
87 | res.real() = p.real() * cos(dir) - p.imag() * sin(dir);
| ~~~~~~~~^~
a.cc:88:11: error: lvalue required as left operand of assignment
88 | res.imag() = p.real() * sin(dir) + p.... |
s635906691 | p01516 | C++ |
import java.util.*;
import java.io.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.lang.Math.*;
public class Main {
int INF = 1 << 28;
//long INF = 1L << 62;
double EPS = 1e-10;
void run() {
Scanner sc = new Scanner(System.in);
for (;;) {
int n = sc.nextInt... | a.cc:2:1: error: 'import' does not name a type
2 | import java.util.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.io.*;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: ... |
s578040028 | p01517 | Java | public class Main {
int n;
class Country{
int id;
int string;
long enemy;
List<String> Node=new ArrayList<String>();
public void parseNode(){
enemy=0L;
for(String node:Node){
enemy+=(1<<nametoId.get(node));
}
}
}
HashMap<String,Integer> nametoId;
public void run(){
Scanner sc=new Sc... | Main.java:93: error: as of release 9, '_' is a keyword, and may not be used as an identifier
public static void main(String[] _) throws Exception {
^
1 error
|
s861959794 | p01517 | Java | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
public class Main{
Scanner sc=new Scanner(System.in);
int INF=1<<28;
double EPS=1e-12;
int n;
int[] pow;
String[] names;
HashSe... | Main.java:44: error: as of release 9, '_' is a keyword, and may not be used as an identifier
int[] _;
^
Main.java:60: error: as of release 9, '_' is a keyword, and may not be used as an identifier
_=new int[n];
^
Main.java:62: error: as of release 9, '_' is a keyword, and may not be used as an identifier
... |
s029214960 | p01517 | C++ | #include<bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
using P=pair<ll,ll>;
#define MOD 1000000007ll
#define INF 1000000000ll
#define EPS 1e-7
#define FOR(i,n,m) for(ll i=n;i<(ll)m;i++)
#define REP(i,n) FOR(i,0,n)
#define DUMP(a) REP(d,a.size()){cout<<a[d];if(d!=a.size()-1)cout<<" ";else... | a.cc: In function 'll solve()':
a.cc:66:19: error: no matching function for call to 'std::vector<std::pair<long long int, long long int> >::assign(ll&, int)'
66 | ord.assign(n,-1);
| ~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/... |
s347816947 | p01517 | C++ | //#include"bits/stdc++.h"
#include<iostream>
#include<vector>
#include<string>
#include<map>
#include<algorithm>
using namespace std;
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
//#define int long long
using vi=vector<int>;
using vvi=vector<vi>;
//#define INF 0x3f3f3f3... | a.cc: In function 'int main()':
a.cc:31:17: error: 'memset' was not declared in this scope
31 | memset(E, 0, sizeof(E));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #include<algorithm>
+++ ... |
s442620070 | p01517 | C++ | //#include"bits/stdc++.h"
#include<iostream>
#include<vector>
#include<string>
#include<map>
#include<algorithm>
using namespace std;
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
//#define int long long
using vi=vector<int>;
using vvi=vector<vi>;
//#define INF 0x3f3f3f3... | a.cc: In function 'int main()':
a.cc:31:17: error: 'memset' was not declared in this scope
31 | memset(E, 0, sizeof(E));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #include<algorithm>
+++ ... |
s332353520 | p01517 | C++ | #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;
//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt"
int ans = 0;
i... | a.cc: In function 'int main()':
a.cc:54:50: error: 'a' was not declared in this scope
54 | connects[myid].first = b;a
| ^
a.cc:55:41: error: 'j' was not declared in this scope
55 | for (int j = 0; j < c; ++j) {
... |
s171839740 | p01517 | C++ | #include <bits/stdc++.h>
using namespace std;
int n;
int ans;
int bs[114514];
int cs[114514];
char buf[114514];
bool used[114514];
string as[114514];
vector<int> es[114514];
vector<string> ds[114514];
map<string, int> rev;
void calc(int v, int sum) {
if (v >= n) {
ans = max(ans, sum);
return;
}
if (!us... | a.cc: In function 'int main()':
a.cc:65:7: error: 'vs' was not declared in this scope; did you mean 'es'?
65 | vs.erase(u)
| ^~
| es
a.cc:70:16: error: 'u' was not declared in this scope
70 | if (used[u]) continue;
| ^
a.cc:81:10: error: 'vs' was not declar... |
s516730229 | p01517 | C++ | 7
INTERCAL 10 3 Chef Piet COW
Chef 7 3 INTERCAL Piet COW
Piet 6 2 INTERCAL Chef
COW 7 2 INTERCAL Chef
J 6 1 A
A 12 1 J
Grass 0 0
7
Qin 105 4 Zhao Wei Han Chu
Zhao 81 4 Qin Wei Qi Yan
Wei 70 5 Qin Zhao Han Qi Chu
Han 45 3 Qin Wei Chu
Qi 79 4 Zhao Wei Chu Yan
Chu 102 4 Qin Wei Han Qi
Yan 53 2 Zhao Qi
14
Magadha 98 8 Mace... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 7
| ^
|
s190660720 | p01517 | C++ | #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long ll;
int pw[50],N;
class UnionFind {
public:
vector<int> data;
UnionFind(int size) : data(size, -1) { }
bool unionSet(int x, int y) {
x = root(x); y = root(y);
if (x != y) {... | a.cc: In function 'int main()':
a.cc:67:17: error: 'memset' was not declared in this scope
67 | memset(rest, 0, sizeof(rest));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <algorithm>... |
s724921155 | p01517 | C++ | //OBOG2012E 敵の敵は味方
#include<iostream>
#include<cstring>
using namespace std;
int nstr;
char strings[40][17];
void init_id(){
nstr=0;
}
int get_id(char str[]){
for(int i=0;i<nstr;i++)
if(strcmp(str,strings[i])==0)return i;
strcpy(strings[nstr],str);
return nstr++;
}
/**/
__int64 get_bit(int id){
return (__int6... | a.cc:19:1: error: '__int64' does not name a type; did you mean '__int64_t'?
19 | __int64 get_bit(int id){
| ^~~~~~~
| __int64_t
a.cc:26:9: error: '__int64' does not name a type; did you mean '__int64_t'?
26 | __int64 neighbor;
| ^~~~~~~
| __int64_t
a.cc:29:34: error... |
s654163198 | p01517 | C++ | #include <iostream>
#include <queue>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
int N, G[42][42];
string C[42];
#define UNION 1
#define NEIGHBOR 2
struct Union{
string A;
int B,C;
int D[42];
queue<string> S;
} U[42];
class UnionSearch{
public:
int State[42], B;
UnionSear... | a.cc:25:9: error: extra qualification 'UnionSearch::' on member 'UnionSearch' [-fpermissive]
25 | UnionSearch::UnionSearch();
| ^~~~~~~~~~~
a.cc:26:14: error: extra qualification 'UnionSearch::' on member 'AddUnion' [-fpermissive]
26 | void UnionSearch::AddUnion(int u);
| ... |
s276617163 | p01517 | C++ | #include <iostream>
#include <cstring>
using namespace std;
int Cc;
char Name[40][20];
char NearS[40][40][20];
bool Near[40][40];
bool ally[40];
int Power[40];
int n, t;
int Max_Power;
void make_ally(bool ally1[40], int name, int power){
int i,j;
bool ally2[40];
memcpy(ally2,ally1,sizeof(ally));
ally2[name] = 1... | a.cc: In function 'int main()':
a.cc:63:30: error: 'Remain_Power' was not declared in this scope; did you mean 'Max_Power'?
63 | Max_Power=0; Remain_Power=0;
| ^~~~~~~~~~~~
| Max_Power
|
s454046979 | p01517 | C++ | #include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
typedef __int64 int64;
int nstr;
char strings[40][17];
void init_id(){
nstr=0;
}
int get_id(char str[]){
for(int i=0;i<nstr;i++)
if(strcmp(str,strings[i])==0)return i;
strcpy(strings[nstr],str);
return nstr++;
}
inline int64 get_bit(... | a.cc:5:9: error: '__int64' does not name a type; did you mean '__int64_t'?
5 | typedef __int64 int64;
| ^~~~~~~
| __int64_t
a.cc:19:8: error: 'int64' does not name a type; did you mean 'int64_t'?
19 | inline int64 get_bit(int id){
| ^~~~~
| int64_t
a.cc:26:9:... |
s611700964 | p01517 | C++ | v | a.cc:1:1: error: 'v' does not name a type
1 | v
| ^
|
s594068539 | p01517 | C++ | #include <vector>
#include <iostream>
#include <map>
using namespace std;
map<string,int> dictionary;
int dic(string name){
if( dictionary.count(name) ) return dictionary[name];
else{
int t = dictionary.size();
return dictionary[name] = t;
}
}
vector<int> g[40];
int P[40];
int dmg[40]={};
int deg[40]={};
int... | a.cc: In function 'int dfs()':
a.cc:61:9: error: 'sort' was not declared in this scope; did you mean 'short'?
61 | sort(good.begin(),good.end());
| ^~~~
| short
a.cc:70:1: warning: control reaches end of non-void function [-Wreturn-type]
70 | }
| ^
|
s644934118 | p01518 | C++ | #include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <climits>
#include <ctime>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <deque>
#include <complex>
#include <string>
#include <iomanip>... | a.cc:202:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
202 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:205:21: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'double')
205 | cin >> S.X >> S.Y >>... |
s676769787 | p01518 | C++ | #include <iostream>
#include<string>
#include <complex>
#include<list>
#include<float.h>
#include <functional>
#include <hash_map.h>
//lib
using namespace std;
typedef complex<double> P;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define REP0(i,n) REP(i,0,n)
//foreachの中で内部を変更しないこと。
#define foreach(it,o) for(__typeof((... | a.cc:7:10: fatal error: hash_map.h: No such file or directory
7 | #include <hash_map.h>
| ^~~~~~~~~~~~
compilation terminated.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.