submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s711517170 | p00629 | C++ | #include<iostream>
#include<vector>
#include<string.h>
using namespace std;
struct log{
int id,belong,correct,penalty;
};
int main(void){
struct log team[1001];
int n,idcount[1001];
while(cin>>n,n){
memset(team,0,sizeof(team));
memset(idcount,0,sizeof(idcount));
for(int i=1;i<=n;i++){
cin>>team... | a.cc: In function 'int main()':
a.cc:58:30: error: 'i' was not declared in this scope
58 | idcount[team[i].belong]=0;
| ^
|
s465715102 | p00629 | C++ | #include<iostream>
#include<vector>
#include<string.h>
using namespace std;
struct log{
int id,belong,correct,penalty;
};
int main(void){
struct log team[1001];
int n,idcount[1001];
while(cin>>n,n){
memset(team,0,sizeof(team));
memset(idcount,0,sizeof(idcount));
for(int i=1;i<=n;i++){
cin>>team... | a.cc:77:10: error: expected unqualified-id before '>' token
77 | }iostream>
| ^
a.cc:83:8: error: redefinition of 'struct log'
83 | struct log{
| ^~~
a.cc:7:8: note: previous definition of 'struct log'
7 | struct log{
| ^~~
a.cc:87:5: error: redefinition of 'int main()... |
s083744979 | p00630 | Java | package aoj10xx;
import java.util.Scanner;
public class AOJ1044 {
public static void main ( String[] args ){
Scanner sc = new Scanner( System.in );
while( true ){
String src = sc.next();
char[] strc = src.toCharArray();
String type = sc.next();
char diff = 'a' - 'A';
switch (type.toCharArray()[... | Main.java:5: error: class AOJ1044 is public, should be declared in a file named AOJ1044.java
public class AOJ1044 {
^
1 error
|
s275010800 | p00630 | C++ | #include<iostream>
#include<string>
#include<cctype>
#include<algorithm>
using namespace std;
int main()
{
string s;
string::iterator i;
char c;
int x;
while(cin>>s>>c,c-'X')
{
s[0]=toupper(s[0]);
while(x=s.find('_'),x!=string::npos)
s.erase(x,1),s[x]=toupper(s[x]);
if(c-'U')s[0]=tolower(s[0]);
if(c=='... | a.cc: In function 'int main()':
a.cc:19:51: error: no matching function for call to 'find_if(std::__cxx11::basic_string<char>::iterator&, std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'
19 | for(i=s.begin();(i=find_if(i,s.end(),isupper))!=s.end();++i)
... |
s733105184 | p00630 | C++ | #include<iostream>
#include<string>
#include<cctype>
#include<algorithm>
#include<functional>
using namespace std;
int main()
{
string s;
string::iterator i;
char c;
int x;
while(cin>>s>>c,c-'X')
{
s[0]=toupper(s[0]);
while(x=s.find('_'),x!=string::npos)
s.erase(x,1),s[x]=toupper(s[x]);
if(c-'U')s[0]=tol... | a.cc: In function 'int main()':
a.cc:20:69: error: no matching function for call to 'ptr_fun(<unresolved overloaded function type>)'
20 | for(i=s.begin();(i=find_if(i,s.end(),ptr_fun(isupper)))!=s.end();++i)
| ~~~~~~~^~~~~~~~~... |
s727082420 | p00630 | C++ | while true do
identifier, role = gets.chomp.split(' ')
break if role == 'X'
words = Array.new
if identifier[0] =~ /[A-Z]/ then
words = identifier.scan(/[A-Z][a-z]*/).map {|x| x.downcase }
elsif identifier.include? '_' then
words = identifier.split '_'
else
words = identifier.scan(/(?:^[a-z]*)|(... | a.cc:1:1: error: expected unqualified-id before 'while'
1 | while true do
| ^~~~~
a.cc:8:3: error: 'elsif' does not name a type
8 | elsif identifier.include? '_' then
| ^~~~~
a.cc:12:3: error: 'end' does not name a type
12 | end
| ^~~
a.cc:15:39: error: expected unqualified-id befor... |
s628383275 | p00631 | Java | import java.util.*;
public class Main {
static int n;
static int[] a = new int[21];
static int dfs(int A, int B, int i) {
int x;
int y;
if(i == n) return Math.abs(A-B);
x = dfs(A+a[i], B, i+1);
y = dfs(A, B+a[i], i+1);
return Math.min(x, y);
}
... | Main.java:19: error: illegal character: '\uff5b'
while(sc.hasNext())?
^
Main.java:26: error: illegal character: '\uff5d'
?
^
2 errors
|
s788257688 | p00631 | C | #include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
int main(void)
{
int i, n, array[20], A, B;
while (scanf("%d", &n), n != 0){
A = B = 0;
for (i = 0; i < n; i++){
scanf("%d", &array[i]);
}
sort(array, array + n);
reverse(array, array + n);
for (i = 0; i < n; i++)... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s529628152 | p00631 | C | #include <cstdio>
#include <cstdlib>
#include <algorithm>
using namespace std;
int main()
{
int i, n, array[20], A, B;
while (scanf("%d", &n), n != 0){
A = B = 0;
for (i = 0; i < n; i++){
scanf("%d", &array[i]);
}
sort(array, array + n);
reverse(array, array + n);
for (i = 0; i < n; i++){
... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s699955887 | p00631 | C | #include<stdio.h>
#include<math.h>
int result;
int main(){
int i,n,data[20],;
while(1){
scanf("%d",&n);
if(n==0)break;
for(i=0;i<n;i++)scanf("%d",&data[i]);
result=1000000;
printf("%d\n",search(n,data,0,0,0));
}
return 0;
}
int search(int n,int data[],int i,int a,int b){
if(i<n){
s... | main.c: In function 'main':
main.c:7:20: error: expected identifier or '(' before ';' token
7 | int i,n,data[20],;
| ^
main.c:13:19: error: implicit declaration of function 'search' [-Wimplicit-function-declaration]
13 | printf("%d\n",search(n,data,0,0,0));
| ... |
s017729717 | p00631 | C++ | #include<iostream>
#include<vector>
#include<math.h>
#include<stdlib.h>
#include<algorithm>
using namespace std;
static const int MAX_MEMBERS = 20;
int Members;
int FightingPower[MAX_MEMBERS];
vector<int> power;
int seek = 0;
int FightingPower[MAX_MEMBERS], n, res;
const int INF = 1000001;
void dfs(int i, int a_su... | a.cc:16:5: error: redefinition of 'int FightingPower [20]'
16 | int FightingPower[MAX_MEMBERS], n, res;
| ^~~~~~~~~~~~~
a.cc:11:5: note: 'int FightingPower [20]' previously declared here
11 | int FightingPower[MAX_MEMBERS];
| ^~~~~~~~~~~~~
|
s930050721 | p00631 | C++ | #include <functional>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
#include <cfloat>
#include <map>
using namespace std;
int main(){
int n;
while(cin>>n,n!=0){
int a=0,b=0;
vector<int> s(n);
for(int i=0;i<n;i++)
cin>>s[i];
sort(s.begin(),s.end(),greater<int>());
for(in... | a.cc: In function 'int main()':
a.cc:14:15: error: 'cin' was not declared in this scope
14 | while(cin>>n,n!=0){
| ^~~
a.cc:8:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
7 | #include <map>
+++ |+#include <iostream>
... |
s989105575 | p00631 | C++ | #include <cmath>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int n, sum; vector<int> a;
while(true)
{
cin >> n;
if(n == 0) { break; }
a = vector<int>(n);
for(int i = 0; i < n; i++)
{
... | a.cc: In function 'int main()':
a.cc:42:14: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>')
42 | cout << min << endl;
| ~~~~~^~~~~~
In file included from /usr/include/c++/14/iostream:41,
... |
s067409109 | p00631 | C++ | #include<iostream>
using namespace std;
int abs(int a){return a < 0 ? -a : a;}
int main(){
int n;
int a[22];
while(cin>>n,n){
for(int i=0;i<n;i++)
cin>>a[i];
int mi=INT_MAX;
for(int l=0;l<(2<<n);l++){
int p=0,q=0;
for(int i=0;i<n;i++){
... | a.cc: In function 'int main()':
a.cc:10:16: error: 'INT_MAX' was not declared in this scope
10 | int mi=INT_MAX;
| ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
1 | #include<iostream>
+++ |+#include <clim... |
s636695459 | p00631 | C++ | #include<iostream>
using namespace std;
int abs(int a){return a < 0 ? -a : a;}
int main(){
int n;
int a[22];
while(cin>>n,n){
for(int i=0;i<n;i++)
cin>>a[i];
int mi=INT_MAX;
for(int l=0;l<(2<<n);l++){
int p=0,q=0;
for(int i=0;i<n;i++){
... | a.cc: In function 'int main()':
a.cc:10:16: error: 'INT_MAX' was not declared in this scope
10 | int mi=INT_MAX;
| ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
1 | #include<iostream>
+++ |+#include <clim... |
s428406031 | p00631 | C++ | #include<bits/stdc++.h>
#define mk make_pair
using namespace std;
int a[20],n;
unordered_map<pair<pair<int,int>,int>,int >m;
int dfs(int d,int x,int y){
if(d==n){if(y<x)swap(x,y);return y-x;}
return min(dfs(d+1,x+a[d],y),dfs(d+1,x,y+a[d]));
}
int main(){
while(cin>>n,n){
for(int i=0;i<n;i++)cin>>a[i];
cou... | a.cc:5:44: error: use of deleted function 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map() [with _Key = std::pair<std::pair<int, int>, int>; _Tp = int; _Hash = std::hash<std::pair<std::pair<int, int>, int> >; _Pred = std::equal_to<std::pair<std::pair<int, int>, int> >; _Alloc = std::allocator<std::... |
s230845478 | p00631 | C++ | void dfs(int now, int i);
int a[100];
int minimum = 1000000000, n, sum;
void dfs(int now,int i){
if(i == n){
if(minimum > abs(sum-now*2)){
minimum = abs(sum-now*2);
return;
}
}
dfs(now, i+1);
dfs(now-a[i], i+1);
}
int main(){
while(1){
sum = 0;
cin >> n;
if(n == 0) break;
... | a.cc: In function 'void dfs(int, int)':
a.cc:7:18: error: 'abs' was not declared in this scope
7 | if(minimum > abs(sum-now*2)){
| ^~~
a.cc: In function 'int main()':
a.cc:18:5: error: 'cin' was not declared in this scope
18 | cin >> n;
| ^~~
a.cc:26:5: error: 'sort' was ... |
s486401514 | p00631 | C++ | #include<iostream>
#include<algorithm>
#include<math>
using namespace std;
int main(){
double sum,mostnear;
bool a[20];
int n,kyas[20],shiftmax,sssum,ansint,i,j;
while(1){
scanf("%d",&n);
if(n==0)
break;
for(i=0;i<n;i++){
scanf("%d",&kyas[i]);
}
sort(kyas,kyas+n);
sum=0;
for(i=0;i<n;i++){
sum... | a.cc:3:9: fatal error: math: No such file or directory
3 | #include<math>
| ^~~~~~
compilation terminated.
|
s887879960 | p00631 | C++ | #include<iostream>
#include<algorithm>
#include<math>
using namespace std;
int main(void){
double sum,mostnear;
bool a[20];
int n,kyas[20],shiftmax,sssum,ansint,i,j;
while(1){
scanf("%d",&n);
if(n==0)
break;
for(i=0;i<n;i++){
scanf("%d",&kyas[i]);
}
sort(kyas,kyas+n);
sum=0;
for(i=0;i<n;i++){
... | a.cc:3:9: fatal error: math: No such file or directory
3 | #include<math>
| ^~~~~~
compilation terminated.
|
s068713145 | p00631 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
int n;
for(;;)
{
vector<int> num;
cin >> n;
if(n==0)
break;
for(int i=0;i<n;i++)
{
int a;
cin >> a;
num.push_back(a);
}
sort(num.begin(),num.end());
int a=0,b=0;
int a_f=1;
if(num.si... | a.cc: In function 'int main()':
a.cc:31:33: error: 'sqrt' was not declared in this scope
31 | cout << sqrt((num[0]-num[1])*(num[0]-num[1])) << endl;
| ^~~~
a.cc:72:33: error: 'sqrt' was not declared in this scope
72 | cout << sq... |
s134402515 | p00631 | C++ | #include <iostream>
using namespace std;
int n;
int data[20];
int rec(int p, int A, int B) {
static int min;
if(p == 0) min = 999999;
if(p == n) {
int temp = abs(A-B);
if(temp < min) min = temp;
return 0;
}
rec(p+1, A+data[p], B);
rec(p+1, A, B+data[p]);
return min;
}
int main() {
while(1... | a.cc: In function 'int rec(int, int, int)':
a.cc:15:14: error: reference to 'data' is ambiguous
15 | rec(p+1, A+data[p], B);
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/b... |
s243872118 | p00631 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main () {
int ab[20];
bool used[20];
int sum;
int aSum;
int bSum;
bool aUsed[20];
bool bUsod[20];
while (true) {
int n;
cin >> n;
if ( n == 0)
break;
sum = 0;
aSum = 0;
bSum = 0;
for (int i=0; i<n; i++ ) {
cin >> ab[i];
... | a.cc: In function 'int main()':
a.cc:30:25: error: 'bUsed' was not declared in this scope; did you mean 'bUsod'?
30 | bUsed[i] = false;
| ^~~~~
| bUsod
a.cc:42:33: error: 'bUsed' was not declared in this scope; did you mean 'bUsod'?
... |
s903734694 | p00631 | C++ | #include<cstdio>
#include<cstdlib>
#include<numeric>
using namespace std;
int main(){
for(int n;scanf("%d",&n),n;){
int a[20];
for(int i=0;i<n;i++) scanf("%d",a+i);
int ans=1<<30;
int sum=accumulate(a,a+n,0);
for(int i=0;i<(1<<n);i++){
int psum=0;
for(int j=0;j<n;j++){
if(i&(1<<j)) psum+=a[j];
... | a.cc: In function 'int main()':
a.cc:19:29: error: 'min' was not declared in this scope; did you mean 'main'?
19 | ans=min(ans,abs(sum-2*psum));
| ^~~
| main
|
s184334028 | p00631 | 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;
int n,p[20],s[1<<20],s1[1<<10];
int main(){
while(cin>>n){
if... | a.cc: In function 'int main()':
a.cc:30:33: error: 'dif' was not declared in this scope; did you mean 'div'?
30 | dif=min(dif,abs(sss*2-sum));
| ^~~
| div
a.cc:32:31: error: 'dif' was not declared in this scop... |
s573080993 | p00631 | C++ |
int n;
while(cin>>n&&n!=0){
int a[20];
int sum=0;
for(int i=0; i < n; i++){
cin >> a[i];
sum+=a[i];
}
sort(a,a+n);
int Asum=0;
vector<int>A,B;
for(int i = 0; i < n; i++){
if(Asum < sum){
A.push_back(a[i]);
Asum+=a[i];
sum-=a[i];
}
else{
for(int j = i; j < n; j++){
... | a.cc:3:9: error: expected unqualified-id before 'while'
3 | while(cin>>n&&n!=0){
| ^~~~~
a.cc:39:9: error: expected unqualified-id before 'return'
39 | return 0;
| ^~~~~~
a.cc:40:1: error: expected declaration before '}' token
40 | }
| ^
|
s093413325 | p00631 | C++ | #include <cstdio>
#include <algorithm>
using namespace std;
#define INF (1<<25)
int main(){
int n , v[20] , X[41] , Y[41] , top;
while(scanf("%d\n",&n)&& n){
int dp2[21] = {0};
for(int i = 0 ; i < n ; i++) scanf("%d",&v[i]) , memo[i].clear();
sort(v,v+n,greater<int>());
for(int i = n-1 ; i >= 0 ; i--) dp2[i... | a.cc: In function 'int main()':
a.cc:10:66: error: 'memo' was not declared in this scope
10 | for(int i = 0 ; i < n ; i++) scanf("%d",&v[i]) , memo[i].clear();
| ^~~~
a.cc:11:28: error: 'greater' was not declared in this scope
... |
s789176073 | p00631 | C++ | #include<cstdio>
#include<sstream>
#include<string>
#define reps(i,f,n) for(int i = f; i < int(n); i++)
#define rep(i,n) reps(i,0,n)
using namespace std;
int main(void){
int n;
while(cin >> n){
int ans = 100000000;
int a[32]={0};
if(!n)break;
rep(i,n)cin >> a[i];
rep(i,1<<n){
int ga = 0,gb = 0;
... | a.cc: In function 'int main()':
a.cc:13:15: error: 'cin' was not declared in this scope
13 | while(cin >> n){
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include<sstream>
+++ |+#include <iostream>
... |
s187123655 | p00631 | C++ | #include<cstdio>
#include<algorithm>
#define reps(i,f,n) for(int i = f; i < int(n); i++)
#define rep(i,n) reps(i,0,n)
using namespace std;
int main(void){
int n;
while(cin >> n){
int ans = 100000000;
int a[32]={0};
if(!n)break;
rep(i,n)cin >> a[i];
rep(i,1<<n){
int ga = 0,gb = 0;
for(int j = 1,... | a.cc: In function 'int main()':
a.cc:12:15: error: 'cin' was not declared in this scope
12 | while(cin >> n){
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include<algorithm>
+++ |+#include <iostream... |
s908337488 | p00631 | C++ | #include<iostream>
#include<cmath>
using namespace std;
#define INF = (1 << 30)
#define rep(i,n) for(int i = 0 ; i < (n) ; ++i)
int n,ANS,vc[20];
void dfs(int rec,int now){
if(now == n){
ANS = min(ANS,abs(rec));
return;
}
dfs(rec+vc[now],now+1);
dfs(rec-vc[now],now+1);
}
int main(){
while(cin >> n ,... | a.cc: In function 'int main()':
a.cc:4:13: error: expected primary-expression before '=' token
4 | #define INF = (1 << 30)
| ^
a.cc:19:11: note: in expansion of macro 'INF'
19 | ANS = INF;
| ^~~
|
s300210490 | p00631 | C++ | #include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
#define INF = (1 << 30)
#define rep(i,n) for(int i = 0 ; i < (n) ; ++i)
int n,ANS,vc[20];
void dfs(int rec,int now){
if(now == n){
ANS = min(ANS,abs(rec));
return;
}
dfs(rec+vc[now],now+1);
dfs(rec-vc[now],now+1);
}
int main()... | a.cc: In function 'int main()':
a.cc:5:13: error: expected primary-expression before '=' token
5 | #define INF = (1 << 30)
| ^
a.cc:20:11: note: in expansion of macro 'INF'
20 | ANS = INF;
| ^~~
|
s467697889 | p00632 | Java | import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
public class Main {
MyScanner sc = new MyScanner();
Scanner sc2 = new Scanner(System.in);
int mod = 1000000007;
int[] dx = { 1, 0, -1, 0, 0 };
int[] dy = { 0, 1, 0, -1, 0 };
void ru... | Main.java:154: error: cannot find symbol
new AOJ_1046().run();
^
symbol: class AOJ_1046
location: class Main
1 error
|
s519465690 | p00632 | C | #include <stdio.h>
#include <string.h>
typedef struct tag_Pair{
int R;
int C;
}Pair;
int main(){
int H,W;
char Map[21][21];
char Pat[11];
int i,j;
while(1){
scanf("%d %d",&H,&W);
if(!H&&!W)break;
for(i=0;i<H;i++){
scanf("%s\n",Map[i]);
}
scanf("%s\n",Pat);
int turn =0;
int M[H][W];
Pai... | main.c: In function 'main':
main.c:72:2: error: expected expression before '/' token
72 | */ for(k=0;k<FScnt;k++){
| ^
|
s884867584 | p00632 | C++ | 4 7
A#...#B
.#.#.#.
.#.#.#.
...#...
5
4 7
A#...#B
.#.#.#.
.#.#.#.
...#...
2
4 7
A#...#B
.#.#.#.
.#.#.#.
...#...
4
4 7
A#...#B
.#.#.#.
.#.#.#.
...#...
442668
1 10
A#.......B
55555554
1 10
A#.......B
55555555
0 0 | a.cc:2:2: error: stray '#' in program
2 | A#...#B
| ^
a.cc:2:6: error: stray '#' in program
2 | A#...#B
| ^
a.cc:3:2: error: stray '#' in program
3 | .#.#.#.
| ^
a.cc:3:4: error: stray '#' in program
3 | .#.#.#.
| ^
a.cc:3:6: error: stray '#' in program
3 | .#.#.#.
... |
s244893966 | p00632 | C++ | #include<iostream>
#include<queue>
using namespace std;
typedef pair<pair<int,int>,int> pa;
#define ff first.first
#define fs first.second
int h,w,sx,sy,gx,gy;
int dx[4]={1,0,-1,0};
int dy[4]={0,-1,0,1};
int co[21][21];
char ma[21][21];
bool visited[21][21];
string pat;
int main(){
while(cin>>h>>w,h){
for... | a.cc: In function 'int main()':
a.cc:20:26: error: 'INT_MAX' was not declared in this scope
20 | co[i][j]=INT_MAX;
| ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #include<queue>
+++... |
s531808502 | p00632 | C++ | #include <iostream>
using namespace std;
typedef struct {
int x, y;
} Vector;
char map[16 + 2][16 + 2];
unsigned int data[16][16][16][16][10];
int ans;
int ans_x, ans_y;
int change(char move[], Vector mv[])
{
int i = 0;
while (move[i] != '\0'){
mv[i].x = mv[i].y = 0;
switch (move[i]){
case '5':
brea... | a.cc: In function 'int calc(int, int, int, int, Vector*, int, int)':
a.cc:56:13: error: reference to 'data' is ambiguous
56 | if (data[sx - 1][sy - 1][gx - 1][gy - 1][depth % move_count] == 1){
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c+... |
s395960362 | p00632 | C++ | #include <stdio.h>
#include <list>
using namespace std;
//#define DEBUG
typedef struct {
int px, py;
int gx, gy;
int move_index;
int depth;
} DATA;
char map[20 + 2][20 + 2];
char move_inst[11];
list<unsigned> lstHash;
list<DATA> lstSarch;
unsigned calc_hash(const DATA& data)
{
unsigned hash;
hash = data.p... | a.cc: In function 'bool is_add(const DATA&)':
a.cc:35:76: error: 'find' was not declared in this scope
35 | if (map[data.px][data.py] == -1 || map[data.px][data.py] == '#' || find(lstHash.begin(), lstHash.end(), hash) != lstHash.end()){
| ... |
s876992948 | p00632 | C++ | #include<stdio.h>
#include<queue.h>
int main(){
queue<int> q;
int w,h,f[484],i,j,d[]={22,0,-1,0,1,0,-22},a,b,t,x,z;
char p[15];
for(;scanf("%d%d ",&h,&w),h;){
for(j=0;j<w+2;j++)f[j]=f[j-~h*22]=-9;
for(i=1;i<=h;i++){
for(j=1;j<=w;j++){
f[x=i*22+j]=-1;
switch(getchar()){
case'#':--f[x];break;
... | a.cc:2:9: fatal error: queue.h: No such file or directory
2 | #include<queue.h>
| ^~~~~~~~~
compilation terminated.
|
s246807182 | p00632 | C++ | #include<stdio.h>
#include<queue>
int main(){
std::queue<int> q;
int w,h,f[484],i,j,d[]={22,0,-1,0,1,0,-22},a,b,t,x,z;
char p[15];
for(;scanf("%d%d ",&h,&w),h;){
for(j=0;j<w+2;j++)f[j]=f[j-~h*22]=-9;
for(i=1;i<=h;i++){
for(j=1;j<=w;j++){
f[x=i*22+j]=-1;
switch(getchar()){
case'#':--f[x];break;
... | a.cc: In function 'int main()':
a.cc:50:2: error: expected '}' at end of input
50 | }
| ^
a.cc:3:11: note: to match this '{'
3 | int main(){
| ^
|
s027475701 | p00632 | C++ | #import<stdio.h>
#import<queue.h>
int main(){
queue<int> q;
int w,h,f[484],i,j,d[]={22,0,-1,0,1,0,-22},a,b,t,x,z;
char p[15];
for(;scanf("%d%d ",&h,&w),h;){
for(j=0;j<w+2;j++)f[j]=f[j-~h*22]=-9;
for(i=1;i<=h;i++){
for(j=1;j<=w;j++){
f[x=i*22+j]=-1;
switch(getchar()){
case'#':--f[x];break;
c... | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<stdio.h>
| ^~~~~~
a.cc:2:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
2 | #import<queue.h>
| ^~~~~~
a.cc:2:8: fatal error: queue.h: No such file or directory
2 | #import<queue.h>
| ... |
s622826785 | p00632 | C++ | #import<stdio.h>
#import<queue>
int main(){std::queue<int>q;int w,h,f[484],i,j,a,b,t,x,z;char p[15];for(;scanf("%d%d ",&h,&w),h;){for(j=0;j<w+2;j++)f[j]=f[j-~h*22]=-9;for(i=1;i<=h;i++){for(j=1;j<=w;j++)f[x=i*22+j]=-1,z=getchar(),z-35?z>65?b=x:z>64?a=x:1:--f[x];f[i*22]=f[i*22-~w]=-9;getchar();}f[a]=t=0;q.push(0);for(q.p... | a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<stdio.h>
| ^~~~~~
a.cc:2:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
2 | #import<queue>
| ^~~~~~
a.cc: In function 'int main()':
a.cc:3:639: error: expected '}' at end of input
3 | int main... |
s685249859 | p00632 | C++ | int main(){std::queue<int>q;int w,h,f[484],i,j,a,b,t,x,z;char p[15];for(;scanf("%d%d ",&h,&w),h;){for(j=0;j<w+2;j++)f[j]=f[j-~h*22]=-9;for(i=1;i<=h;i++){for(j=1;j<=w;j++)f[x=i*22+j]=-1,z=getchar(),z-35?z>65?b=x:z>64?a=x:1:--f[x];f[i*22]=f[i*22-~w]=-9;getchar();}f[a]=t=0;q.push(0);for(q.push(a);a=q.front(),q.size()>1;q.... | a.cc: In function 'int main()':
a.cc:1:17: error: 'queue' is not a member of 'std'
1 | int main(){std::queue<int>q;int w,h,f[484],i,j,a,b,t,x,z;char p[15];for(;scanf("%d%d ",&h,&w),h;){for(j=0;j<w+2;j++)f[j]=f[j-~h*22]=-9;for(i=1;i<=h;i++){for(j=1;j<=w;j++)f[x=i*22+j]=-1,z=getchar(),z-35?z>65?b=x:z>64?a=x:1:--f[x];... |
s700237058 | p00632 | C++ | #include<iostream>
#include<map>
#include<string>
#include<vector>
#include<algorithm>
#define all(c) c.begin(),c.end()
#define pb push_back
#define INF 10000000
using namespace std;
typedef pair<int,int> P;
int w,h;
vector<string> s;
P d[10];
int antime;
P q;
map<int,int> mp;
string op;
int dp[20][20][20][20][100];
bo... | a.cc: In function 'int main()':
a.cc:74:17: error: 'memset' was not declared in this scope
74 | memset(dp,-1,sizeof(dp));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include<algorithm>
+++... |
s070810929 | p00633 | C++ | #include<bits/stdc++.h>
#define inf 1<<29
#define linf 1e18
#define eps (1e-10)
#define mod 1000000007
#define pi M_PI
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define pd(a) printf("%.10f\n",(double)(a))
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#... | a.cc: In function 'int main()':
a.cc:156:5: error: 'c' was not declared in this scope; did you mean 'vc'?
156 | c.clear();
| ^
| vc
|
s371411669 | p00633 | C++ | #include<iostream>
#include<cfloat>
#include<cassert>
#include<cmath>
#include<cstdio>
#include<vector>
using namespace std;
#define EPS (1e-10)
#define equals(a, b) (fabs((a) - (b)) < EPS )
#define dle(a, b) (equals(a, b) || a < b )
static const double PI = acos(-1);
class Point{
public:
double x, y;
... | a.cc: In function 'void compute()':
a.cc:110:9: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
110 | sort( angles.begin(), angles.end() );
| ^~~~
| sqrt
|
s240277087 | p00633 | C++ | #include<iostream>
#include<complex>
#include<cmath>
#include<vector>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n) REP(i,0,n)
typedef complex<double> P;
double dot(P a,P b){
return a.real()*b.real()+a.imag()*b.imag();
}
//~ÌSÀWða,b,¼aðr1,r2Æ·éB
//r1Ær2ÌÔÌ£ð... | a.cc: In function 'double solve(int, P*, double*)':
a.cc:48:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
48 | sort(data[i].data.begin(),data[i].data.end(),cmp);
| ^~~~
| sqrt
a.cc: At global scope:
a.cc:87:1: warning: ISO C++ forbids declaration of 'main' with no type... |
s626798749 | p00633 | C++ | #include<cstdio>
#include<vector>
#include<complex>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef complex<double> Point;
const double EPS=1e-9;
const double PI=acos(-1);
class Line:public vector<Point>{
public:
Line(){}
Line(const Point &a,const Point &b){ push_back(a), push_back(b); }
};
... | a.cc: In function 'int main()':
a.cc:158:25: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
158 | sort(P[i].begin(),P[i].end(),cmp_arg);
| ^~~~
| sqrt
|
s993514561 | p00633 | C++ | #include <iostream>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <complex>
using namespace std;
#define rep(i,n) for(int i = 0 ; i < n ; i++)
const double EPS = 1e-10;
typedef complex<double> P,point;
struct C {P p; double r;C(const P &p, double r) : ... | a.cc: In function 'double Len(const C&, std::pair<std::complex<double>, std::complex<double> >)':
a.cc:51:11: error: no match for 'operator[]' (operand types are 'std::pair<std::complex<double>, std::complex<double> >' and 'int')
51 | cp[0] -= a.p;
| ^
a.cc:52:11: error: no match for 'operato... |
s002757347 | p00633 | C++ | #include<iostream>
#include<vector>
#include<cmath>
using namespace std;
struct POINT{
double x;
double y;
};
struct CIRCLE{
POINT p;
double r;
};
struct DATA{
double radian;
int log;
};
int CheckCase(const CIRCLE, const CIRCLE);
double GetDistance(const CIRCLE, const CIRCLE);
void GetDigree(const CIRC... | a.cc: In function 'int main()':
a.cc:71:7: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
71 | sort(data.begin(), data.end(), Compare);
| ^~~~
| sqrt
|
s235365190 | p00633 | C++ | #include <algorithm>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <vector>
#define EPSILON 1e-9
class point_t;
class vector_t {
public:
double x;
double y;
double z;
public:
vector_t(double x = 0, double y = 0, double z = 0) : x(x), y(y), z(z) {};
vector_t(co... | a.cc: In member function 'void matrix_t::identitize()':
a.cc:136:5: error: 'memset' was not declared in this scope
136 | memset(matrix_, 0, sizeof(matrix_));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <vect... |
s872572391 | p00633 | C++ | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <vector>
#define EPSILON 1e-9
class point_t;
class vector_t {
public:
double x;
double y;
double z;
public:
vector_t(double x = 0, double y = 0, double z = 0) : x(x), y(y), z(z) {... | a.cc: In member function 'void matrix_t::identitize()':
a.cc:137:5: error: 'memset' was not declared in this scope
137 | memset(matrix_, 0, sizeof(matrix_));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #include <vect... |
s376117584 | p00634 | C++ | #include <stdio.h>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <sstream>
#include <climits>
using namespace std;
#defin... | a.cc: In function 'void dijkstra2(int)':
a.cc:118:39: error: 'i' was not declared in this scope
118 | edge e = G[v][i];
| ^
a.cc: At global scope:
a.cc:141:1: error: expected declaration before '}' token
141 | }
| ^
|
s492841407 | p00634 | C++ | #include <stdio.h>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <sstream>
#include <climits>
using namespace std;
#defin... | a.cc: In function 'void dijkstra2(int)':
a.cc:115:39: error: 'i' was not declared in this scope
115 | edge e = G[v][i];
| ^
a.cc: At global scope:
a.cc:133:1: error: expected declaration before '}' token
133 | }
| ^
|
s640940238 | p00634 | C++ | #include <stdio.h>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <sstream>
#include <climits>
using namespace std;
#defin... | a.cc: In function 'void dijkstra2(int)':
a.cc:115:39: error: 'i' was not declared in this scope
115 | edge e = G[v][i];
| ^
a.cc: At global scope:
a.cc:133:1: error: expected declaration before '}' token
133 | }
| ^
|
s942458975 | p00634 | C++ | #include <stdio.h>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <sstream>
#include <climits>
using namespace std;
#defin... | a.cc: In function 'void dijkstra2(int)':
a.cc:135:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
135 | int main(){
| ^~
a.cc:135:9: note: remove parentheses to default-initialize a variable
135 | int main(){
| ^~
| --
a.cc:135:9:... |
s897109372 | p00634 | C++ | #include <stdio.h>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <sstream>
#include <climits>
using namespace std;
#defin... | a.cc: In function 'void dijkstra2(int)':
a.cc:115:27: error: 'i' was not declared in this scope
115 | edge e = G[v][i];
| ^
a.cc: At global scope:
a.cc:133:1: error: expected declaration before '}' token
133 | }
| ^
|
s322054271 | p00634 | C++ | #include <stdio.h>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <sstream>
#include <climits>
using namespace std;
#defin... | a.cc:133:1: error: expected declaration before '}' token
133 | }
| ^
|
s934160624 | p00634 | C++ | #include <stdio.h>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <sstream>
#include <climits>
using namespace std;
#defin... | a.cc:117:1: error: expected declaration before '}' token
117 | }
| ^
|
s341587411 | p00634 | C++ | #include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm>
#inc... | a.cc: In function 'void rec(int, int, int, int)':
a.cc:49:36: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::pair<std::__cxx11::basic_string<char>, int>; _Alloc = std::allocator<std::pair<std::__cxx11::basic_string<char>, int> >; size_t... |
s692692554 | p00634 | C++ | #include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm>
#inc... | a.cc: In function 'void rec(int, int, int, int)':
a.cc:49:36: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = std::pair<std::__cxx11::basic_string<char>, int>; _Alloc = std::allocator<std::pair<std::__cxx11::basic_string<char>, int> >; size_t... |
s449674382 | p00635 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int n, ne[11], a[11][11], res, t;
while(cin>>n && n){
res = INT_MAX;
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
cin >> a[i][j];
}
}
for(int i = 0; i < n; i++){
for(int j = i+1; j < n; j++){
a[i][j] ... | a.cc: In function 'int main()':
a.cc:11:23: error: 'INT_MAX' was not declared in this scope
11 | res = INT_MAX;
| ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #include <algorithm>
+++ ... |
s711204720 | p00635 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
int n, ne[11], a[11][11], res, t;
while(cin>>n && n){
res = INT_MAX;
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
cin >> a[i][j];
}
}
for(int i = 0; i < n; i++){
for(int j = i+1; j < n; ... | a.cc: In function 'int main()':
a.cc:12:23: error: 'INT_MAX' was not declared in this scope
12 | res = INT_MAX;
| ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
3 | #include <algorithm>
+++ ... |
s551170205 | p00635 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int n, ne[11], a[11][11], res, t;
while(cin>>n && n){
res = INT_MAX;
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
cin >> a[i][j];
}
ne[i] = i;
}
do {
t = 0;
for(int i = 0; i < n-1 && t < res; i++){
... | a.cc: In function 'int main()':
a.cc:11:23: error: 'INT_MAX' was not declared in this scope
11 | res = INT_MAX;
| ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
2 | #include <algorithm>
+++ ... |
s758695395 | p00635 | C++ | #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;
int dfs(vect... | a.cc: In function 'int dfs(std::vector<std::vector<int> >&, std::bitset<10>&, std::vector<int>&, int&)':
a.cc:41:9: error: 'ois' was not declared in this scope
41 | ois[i] = 0;
| ^~~
|
s112006186 | p00637 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int f = 0;
int i = 0;
for(;;){
int n = sc.nextInt();
if(n==0){
System.exit(0);
}else{
in... | Main.java:24: error: cannot find symbol
System.out.print(p[z]+"-"+p[i-1]+" ");
^
symbol: variable z
location: class Main
Main.java:29: error: cannot find symbol
if(a[f]==a[i-1]){
^
symbol: variable a
... |
s338987307 | p00637 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int f = 0;
int i = 0;
for(;;){
int n = sc.nextInt();
if(n==0){
System.exit(0);
}else{
in... | Main.java:29: error: cannot find symbol
if(a[f]==a[i-1]){
^
symbol: variable a
location: class Main
Main.java:29: error: cannot find symbol
if(a[f]==a[i-1]){
^
symbol: variable a
location: class Main
Main.java:30: error: cannot find... |
s602916326 | p00637 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int i,n;
for(int k=0;k<10000000;k++){
n=sc.nextInt();
if(n==0){
break;
}
int p[] = new int[n];
for(i=0;i<n;i++){
p[i]=sc.nextInt();
}
for(i=0;i<n;i++){
if(i... | Main.java:26: error: 'else' without 'if'
}else if(i==n-1){
^
Main.java:43: error: class, interface, enum, or record expected
}
^
2 errors
|
s867627920 | p00637 | C | #include <stdio.h>
int main(void){
int n,t,a[100];
while(1){
scanf("%d",&n);
if(n==0){
return 0;
}
for(t=0;t<n;t++){
scanf("%d",&a[t]);
}
if(n==1){
printf("%d\n",a[0]);
}
else{
printf("%d",a[0]);
for(t=1;t<n-1;t++){
if((a[t-1]+1!=a[t])&&(a[t]+1==a[t+1])){
printf(" %d",a[t]);
... | main.c: In function 'main':
main.c:29:36: error: expected expression before '=' token
29 | if(a[n-2]+==a[n-1]){
| ^
|
s248756439 | p00637 | C | main(n,p,i,a[51]){for(;~scanf("%d",&n),n;){for(a[n]=p=i=0;i<n;i++)scanf("%d",a+i);for(i=1;i<=n;i++)if(a[i-1]-a[i]+1)printf(i-p-1?n-i?"%d-%d ":"%d-%d\n":n-i?"%d ":"%d\n",a[p],a[i-1]),p=i;}exit(0);} | main.c:1:13: error: expected ')' before '[' token
1 | main(n,p,i,a[51]){for(;~scanf("%d",&n),n;){for(a[n]=p=i=0;i<n;i++)scanf("%d",a+i);for(i=1;i<=n;i++)if(a[i-1]-a[i]+1)printf(i-p-1?n-i?"%d-%d ":"%d-%d\n":n-i?"%d ":"%d\n",a[p],a[i-1]),p=i;}exit(0);}
| ^
| )
|
s296488539 | p00637 | C | #include<string.h>
#include<stdio.h>
int main(){
int up;//??????
bool b[10000][51];
int c=-1;
int i2;
int itizi;
int i;
int con;//?¶??????????
int saisyo[10000];
for(i=0;c==-1;i++){
scanf("%d",&up);
if(up==0){c=i;break;}
scanf("%d",&itizi);
saisyo[i]=itizi;
b[i][itizi]=true;
for(i2=1;i2<up;i2++){
... | main.c: In function 'main':
main.c:6:1: error: unknown type name 'bool'
6 | bool b[10000][51];
| ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
2 | #include<stdio.h>
+++ |+#include <stdbool.h>
3 |
main.c:18:29: error: 'tru... |
s941924312 | p00637 | C | #include<stdio.h>
int main(){
int up;//??????
bool b[100000][51];
int c=-1;
int i2;
int itizi;
int i;
int con;//?¶??????????
int saisyo[100000];
for(i=0;c==-1;i++){
scanf("%d",&up);
if(up==0){c=i;break;}
scanf("%d",&itizi);
saisyo[i]=itizi;
b[i][itizi]=true;
for(i2=1;i2<up;i2++){
scanf("%d",&it... | main.c: In function 'main':
main.c:5:1: error: unknown type name 'bool'
5 | bool b[100000][51];
| ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include<stdio.h>
+++ |+#include <stdbool.h>
2 |
main.c:17:29: error: 'tr... |
s412242644 | p00637 | C | #include<stdio.h>
int main(){
int up;//??????
bool b[1000000][51];
int c=-1;
int i2;
int itizi;
int i;
int con;//?¶??????????
int saisyo[1000000];
for(i=0;c==-1;i++){
scanf("%d",&up);
if(up==0){c=i;break;}
scanf("%d",&itizi);
saisyo[i]=itizi;
b[i][itizi]=true;
for(i2=1;i2<up;i2++){
scanf("%d",&... | main.c: In function 'main':
main.c:5:1: error: unknown type name 'bool'
5 | bool b[1000000][51];
| ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include<stdio.h>
+++ |+#include <stdbool.h>
2 |
main.c:17:29: error: 't... |
s184867032 | p00637 | C | #include<stdio.h>
int main(){
int up;//??????
bool b[10000000][51];
int c=-1;
int i2;
int itizi;
int i;
int con;//?¶??????????
int saisyo[10000000];
for(i=0;c==-1;i++){
scanf("%d",&up);
if(up==0){c=i;break;}
scanf("%d",&itizi);
saisyo[i]=itizi;
b[i][itizi]=true;
for(i2=1;i2<up;i2++){
scanf("%d"... | main.c: In function 'main':
main.c:5:1: error: unknown type name 'bool'
5 | bool b[10000000][51];
| ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include<stdio.h>
+++ |+#include <stdbool.h>
2 |
main.c:17:29: error: '... |
s080101516 | p00637 | C | #include<stdio.h>
int main(){
int up;//??????
bool b[100000][52];
int c=-1;
int i2;
int itizi;
int i;
int con;//?¶??????????
int saisyo[100000];
for(i=0;c==-1;i++){
scanf("%d",&up);
if(up==0){c=i;break;}
scanf("%d",&itizi);
saisyo[i]=itizi;
b[i][itizi]=true;
for(i2=1;i2<up;i2++){
scanf("%d",&it... | main.c: In function 'main':
main.c:5:1: error: unknown type name 'bool'
5 | bool b[100000][52];
| ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include<stdio.h>
+++ |+#include <stdbool.h>
2 |
main.c:17:29: error: 'tr... |
s576768198 | p00637 | C | #include<stdio.h>
int main(){
int up;//??????
bool b[10000][1000];
int c=-1;
int i2;
int itizi;
int i;
int con;//?¶??????????
int saisyo[10000];
for(i=0;c==-1;i++){
scanf("%d",&up);
if(up==0){c=i;break;}
scanf("%d",&itizi);
saisyo[i]=itizi;
b[i][itizi]=true;
for(i2=1;i2<up;i2++){
scanf("%d",&it... | main.c: In function 'main':
main.c:5:1: error: unknown type name 'bool'
5 | bool b[10000][1000];
| ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
1 | #include<stdio.h>
+++ |+#include <stdbool.h>
2 |
main.c:17:29: error: 't... |
s782348628 | p00637 | C++ | n,p,i,a[50];
main(){
while(~scanf("%d", &n),n) {
for(i=0;i<n;i++)scanf("%d",&a[i]);p=0;
for(i=1;i<n;i++){
if(a[i-1]+1!=a[i]) {
if(i-p-1)printf("%d-%d ",a[p],a[i-1]);
else printf("%d ",a[p]);
p=i;
}
}
if(n-p-1)printf("%d-%d\n",a[p],a[n-1]);
else printf("%d\n",a[p]);
}
} | a.cc:1:1: error: 'n' does not name a type
1 | n,p,i,a[50];
| ^
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:3:29: error: 'n' was not declared in this scope
3 | while(~scanf("%d", &n),n) {
... |
s903194674 | p00637 | C++ | 50#include <bits/stdc++.h>
using namespace std ;
#define pb(n) push_back(n)
#define fi first
#define se second
#define X real()
#define Y imag()
#define value(x,y,w,h) (x >= 0 && x < w && y >= 0 && y < h)
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_el... | a.cc:1:3: error: stray '#' in program
1 | 50#include <bits/stdc++.h>
| ^
a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 50#include <bits/stdc++.h>
| ^~
a.cc:25:12: error: 'vector' does not name a type
25 | using vi = vector<int>;
| ^~~~~~
a.cc:26:12: error... |
s545682985 | p00637 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
int n,a,p;
while(cin>>n,n){
vector<int>v;
for(int i=0;i<n;i++){
cin>>a;
v.push_back(a);
}
sort(v.begin(),v.end());
p=v[0];
cout<<p<<"-";
for(int i=1;i<n-1;i++)
... | a.cc: In function 'int main()':
a.cc:12:9: error: 'sort' was not declared in this scope; did you mean 'short'?
12 | sort(v.begin(),v.end());
| ^~~~
| short
|
s778331572 | p00637 | C++ | #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;
//#define int long long
#define DBG 1
#define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=... | a.cc: In function 'int main()':
a.cc:8:50: error: cannot bind non-const lvalue reference of type 'std::_Bit_reference&' to an rvalue of type 'std::_Bit_iterator::reference'
8 | #define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
| ^
a.c... |
s186044681 | p00637 | C++ | import java.util.*;class Main{public static void main(String[]z){Scanner s=new Scanner(System.in);String r;for(int n,a,b,c;(n=s.nextInt())>0;System.out.println(r+a+(a<c?"-"+c:"")))for(r="",a=c=s.nextInt();n-->1;){b=s.nextInt();if(b-c>1){r+=a+(a<c?"-"+c:"")+" ";a=b;}c=b;}}} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;class Main{public static void main(String[]z){Scanner s=new Scanner(System.in);String r;for(int n,a,b,c;(n=s.nextInt())>0;System.out.println(r+a+(a<c?"-"+c:"")))for(r="",a=c=s.nextInt();n-->1;){b=s.nextInt();if(b-c>1){r+=a+(a<c?"-"+c:"")+" ";a=b;... |
s244717508 | p00637 | C++ | g#include <iostream>
using namespace std;
const int INF = 1 << 28;
int main() {
int n;
while (cin >> n, n != 0) {
int page[n+1];
for (int i = 0; i < n; i++) cin >> page[i];
page[n] = INF;
int from_idx = 0;
for (int i = 1; i <= n; i++) {
if (page[i] != page[i-1] + 1) {
if (i-1 == from_idx) {
... | a.cc:1:2: error: stray '#' in program
1 | g#include <iostream>
| ^
a.cc:1:1: error: 'g' does not name a type
1 | g#include <iostream>
| ^
a.cc: In function 'int main()':
a.cc:9:12: error: 'cin' was not declared in this scope
9 | while (cin >> n, n != 0) {
| ^~~
a.cc:17:41: ... |
s302705833 | p00638 | Java | public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
a: while(true){
int N = sc.nextInt();
if(N==0)break;
TreeMap<Integer, Integer> map = new TreeMap<>();
for(int i=0;i<N;i++){
int a = sc.nex... | 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
Main.java:7: erro... |
s731230845 | p00638 | Java | import java.awt.Point;
import java.util.*;
public class Main {
public static int [] t ={0,1,2,3,5,7,8,9};
public static void main(String[] args) throws java.io.IOException{
Scanner scan = new Scanner(System.in);
while(true){
int n = scan.nextInt();
if(n==0)br... | Main.java:32: error: '{' expected
class unlocked DataComparator implements java.util.Comparator{
^
1 error
|
s679475472 | p00638 | Java | import java.util.*;
public class AOJ_1052{
class Island implements Comparable{
public int weight;
public int limit;
public Island(int weight, int limit){
this.weight = weight;
this.limit = limit;
}
public int compareTo(Object other){
Islan... | Main.java:3: error: class AOJ_1052 is public, should be declared in a file named AOJ_1052.java
public class AOJ_1052{
^
1 error
|
s310294943 | p00638 | Java | import java.util.Scanner;
public class AOJ1052 {
void run() {
Scanner sc = new Scanner(System.in);
int n;
while (true) {
n = sc.nextInt();
if (n == 0) break;
int total = 0;
int max = 0;
for (int i = 0; i < n; i++) {
... | Main.java:3: error: class AOJ1052 is public, should be declared in a file named AOJ1052.java
public class AOJ1052 {
^
1 error
|
s029810708 | p00638 | C | #include<vector>
#include<list>
#include<map>
#include<set>
#include<deque>
#include<queue>
#include<stack>
#include<bitset>
#include<algorithm>
#include<functional>
#include<numeric>
#include<utility>
#include<iostream>
#include<sstream>
#include<iomanip>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<cct... | main.c:1:9: fatal error: vector: No such file or directory
1 | #include<vector>
| ^~~~~~~~
compilation terminated.
|
s030537945 | p00638 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
int main()
{
int n;
int a, b;
int i;
int g = 0;
vector<pair<int, int>> v;
while (1) {
scanf("%d", &n);
if (n == 0) break;
for (i = 0; i < n; i++) {
scanf("%d%d", &a, &b);
v.push_back(make_pair(b, a));
... | a.cc:4:2: error: extended character is not valid in an identifier
4 | #include <vector>
| ^
a.cc:4:2: error: invalid preprocessing directive #include\U00003000
4 | #include <vector>
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:9: error: 'vector' was not declared in this scope
14 | ... |
s213660274 | p00638 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
while(1){
int n;
cin>>n;
if(n==0)return;
vector<pair <int,int>>v;
for(int i=0;i<n;i++){
int a,b;
cin>>a>>b;
v.push_back(make_pair(b,a));
}
sort(begin(v),end(v));
int w=0;
for(int i=0;i<n;i++){
w+... | a.cc: In function 'int main()':
a.cc:11:25: error: return-statement with no value, in function returning 'int' [-fpermissive]
11 | if(n==0)return;
| ^~~~~~
|
s884266638 | p00638 | C++ | #include <iostream>
#include <utility>
using namespace std;
#define REP(i,n) for(int i=0; i<n; ++i)
pair<int, int> p[25];
int main() {
while (true) {
int n;
cin >> n;
if (n == 0) break;
REP(i, n) cin >> p[i].second >> p[i].first;
sort(p, p + n);
long long total = 0;
REP(i, n) {
total += p[i].second;... | a.cc: In function 'int main()':
a.cc:13:17: error: 'sort' was not declared in this scope; did you mean 'short'?
13 | sort(p, p + n);
| ^~~~
| short
|
s280493326 | p00638 | C++ | #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(a) (a).begin(),(a),end()
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;
int main(){
int n;
while(cin >> n, n){
vector<pll> a(n);
rep(i,n)cin >> a[i].second >> a[i].first;
sort(all(a));
bool ans = ... | a.cc: In function 'int main()':
a.cc:3:35: error: no matching function for call to 'end()'
3 | #define all(a) (a).begin(),(a),end()
| ~~~^~
a.cc:13:10: note: in expansion of macro 'all'
13 | sort(all(a));
| ^~~
In file included from /usr/include/c++/14/bits... |
s335643737 | p00638 | C++ | #include<iostream>
#include<vector>
using namespace std;
int main(){
int n;
while(cin>>n,n){
vector<pair<int,int> >vec;
for(int i=0;i<n;i++){
int a,b;
cin>>a>>b;
vec.push_back(make_pair(b, a));
}
sort(vec.begin(),vec.end());
int all=0;... | a.cc: In function 'int main()':
a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'short'?
14 | sort(vec.begin(),vec.end());
| ^~~~
| short
|
s607097509 | p00638 | C++ | #include <iostream>
#include <map>
#include <stdio.h>
using namespace std;
int n;//??????
int b;
int c;
int po=0;
int i;
int i2;
int d=-1;
bool dame[100000];
map<int,int>name;
int po;
int main(){
for(i=0;i<100000;i++){
dame[i]=false;
}
for(i2=0;d==-1;i2++){
po=0;
scanf("%d",&n);
if(n==0){
d=i2;
break... | a.cc:15:5: error: redefinition of 'int po'
15 | int po;
| ^~
a.cc:9:5: note: 'int po' previously defined here
9 | int po=0;
| ^~
|
s163786926 | p00638 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<fstream>
#define A '.'
#define S 'S'
#define G 'G'
#define D '#'
using namespace std;
int N,T;
void getInputs(vector< vector<int> > &maze){
cin >> N >> T;
cin.ignore();
for(int i=0;i<N;i++){
int a,b;
v... | a.cc: In function 'int main()':
a.cc:80:12: error: 't' was not declared in this scope
80 | if(t >= pea[i].first){
| ^
|
s827839484 | p00638 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <array>
using namespace std;
bool myComparison(const pair<int,int> &a,const pair<int,int> &b)
{
return a.second<b.second;
}
int main(){
int n=0;
cin>>n;
vector< pair<int,int > > v;
for(int i=0;i<n;i++){
int t1,t2;
cin>>t1>>t2;
v.push_b... | a.cc: In function 'int main()':
a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'short'?
22 | sort(v.begin(),v.end(),myComparison);
| ^~~~
| short
|
s081393594 | p00638 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <array>
using namespace std;
bool myComparison(const pair<int,int> &a,const pair<int,int> &b)
{
return a.second<b.second;
}
int main(){
int n=0;
cin>>n;
vector< pair<int,int > > v;
for(int i=0;i<n;i++){
int t1,t2;
cin>>t1>>t2;
v.push_b... | a.cc: In function 'int main()':
a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'short'?
22 | sort(v.begin(),v.end(),myComparison);
| ^~~~
| short
|
s604256942 | p00638 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <array>
using namespace std;
bool myComparison(const pair<int,int> &a,const pair<int,int> &b)
{
return a.second<b.second;
}
int main(){
int n=0;
cin>>n;
vector< pair<int,int > > v;
for(int i=0;i<n;i++){
int t1,t2;
cin>>t1>>t2;
v.push_b... | a.cc: In function 'int main()':
a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'short'?
22 | sort(v.begin(),v.end(),myComparison);
| ^~~~
| short
|
s449840650 | p00638 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <array>
using namespace std;
bool myComparison(const pair<int,int> &a,const pair<int,int> &b)
{
return a.second<b.second;
}
int main(){
int n=0;
cin>>n;
vector< pair<int,int > > v;
for(int i=0;i<n;i++){
int t1,t2;
cin>>t1>>t2;
v.push_b... | a.cc: In function 'int main()':
a.cc:22:9: error: 'sort' was not declared in this scope; did you mean 'short'?
22 | sort(v.begin(),v.end(),myComparison);
| ^~~~
| short
|
s468346940 | p00638 | C++ | #include <iostream>
#include <vector>
#include <string>
using namespace std;
bool myComparison(const pair<int,int> &a,const pair<int,int> &b)
{
return a.second<b.second;
}
int main(){
int n=0;
cin>>n;
vector< pair<int,int > > v;
for(int i=0;i<n;i++){
int t1,t2;
cin>>t1>>t2;
v.push_back(make_pair(t1,... | a.cc: In function 'int main()':
a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'short'?
21 | sort(v.begin(),v.end(),myComparison);
| ^~~~
| short
|
s225047889 | p00638 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
while(cin>>n,n){
int tre;
int total=0;
int bridge;
int max=0;
for(int i=0;i<n;++i){
cin>>tre>>bridge;
total+=tre;
max=max(max,bridge);
}
if(total<=bridge)
cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:19:18: error: 'max' cannot be used as a function
19 | max=max(max,bridge);
| ~~~^~~~~~~~~~~~
|
s514330638 | p00638 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
struct islands {
int t;
int w;
bool operator>(const islands &left) const {
return w > left.w;
}
};
int main() {
int n, i;
vector<islands> island;
while(1) {
cin >> n;
if(n == 0)
break;
for(i = 0; i <... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from... |
s382220210 | p00638 | C++ | #include <iostream>
#include <cmath>
#include <string>
#include <vector>
#define P pair<int,int>
#define rep(i,n) for(int i = 0;i<n;i++)
#define pb(n) push_back(n)
using namespace std;
int n;
int main() {
while(true){
cin >> n;
if(n == 0) break;
vector<P> V;
rep(i,n){
int d,w;
cin >> w >> d;
V.push_ba... | a.cc: In function 'int main()':
a.cc:20:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
20 | sort(V.begin(),V.end());
| ^~~~
| sqrt
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.