submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s294887536 | p00429 | C++ | #include <iostream>
#include <string>
using namespace std;
// sツづ個静ヲツ督ェツつゥツづァツづ個連ツ堕アツ青板づーツ陛板つキ
// sst ツづ按づァツ return 2
int f(string s)
{
unsigned int count;
for(count = 1; count < s.size(); count++){
if(s.at(count-1) != s.at(count)) break;
}
return count;
}
int main()
{
int n;
string str;
while(1){
cin>>n; ... | a.cc: In function 'int main()':
a.cc:28:33: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'?
28 | sprintf_s(buf, 1024, "%d%c", len, str.at(j));
| ^~~~~~~~~
| sprintf
|
s453008644 | p00429 | C++ | #include <iostream>
#include <string>
using namespace std;
// sツづ個静ヲツ督ェツつゥツづァツづ個連ツ堕アツ青板づーツ陛板つキ
// sst ツづ按づァツ return 2
int f(string s)
{
unsigned int count;
for(count = 1; count < s.size(); count++){
if(s.at(count-1) != s.at(count)) break;
}
return count;
}
int main()
{
int n;
string str;
while(1){
cin>>n; ... | a.cc: In function 'int main()':
a.cc:28:33: error: 'sprintf_s' was not declared in this scope; did you mean 'sprintf'?
28 | sprintf_s(buf, 1024, "%d%c", len, str.at(j));
| ^~~~~~~~~
| sprintf
|
s316915858 | p00429 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int n,r;
string in,ou;
char a,b,ra;
while(1){
cin >> n;
if(n != 0){
cin >> ou;
for(int i = 0; i < n; i++){
r = 1;
in = ou;
ou = "";
a = in.at(0);
for(int j = 1; j < in.length(); j++){
b = in.at(j);
i... | a.cc: In function 'int main()':
a.cc:28:55: error: 'itoa' was not declared in this scope
28 | ou += itoa(r, &ra, 10);
| ^~~~
a.cc:34:55: error: 'itoa' was not declared in this scope
34 | ... |
s550563315 | p00429 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int n,r;
string in,ou;
char a,b,*ra;
ra = new char;
while(1){
cin >> n;
if(n != 0){
cin >> ou;
for(int i = 0; i < n; i++){
r = 1;
in = ou;
ou = "";
a = in.at(0);
for(int j = 1; j < in.length(); j++){
b ... | a.cc: In function 'int main()':
a.cc:30:55: error: 'itoa' was not declared in this scope
30 | ou += itoa(r, ra, 10);
| ^~~~
a.cc:36:55: error: 'itoa' was not declared in this scope
36 | ... |
s505734340 | p00429 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <queue>
using namespace std;
int solve()
{
int n, l, r;
char c;
char buf[1000];
string s;
queue<char> q;
cin >> n;
while (n > 0) {
cin >> s;
for (int i = 0; i < s.size(); i++) q.push(s[i]);
for (int i = 0; i < n; i++) {
... | a.cc: In function 'int solve()':
a.cc:33:29: error: 'strlen' was not declared in this scope
33 | for (int k = 0; k < strlen(buf); k++) q.push(buf[k]);
| ^~~~~~
a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
... |
s918287894 | p00429 | C++ | #define _USE_MATH_DEFINES
#define INF 100000000
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>
using namespace std;
ty... | a.cc: In function 'int main()':
a.cc:49:33: error: 'itoa' was not declared in this scope
49 | itoa(c,buf,10);
| ^~~~
|
s613307613 | p00429 | C++ | #define _USE_MATH_DEFINES
#define INF 100000000
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>
using... | a.cc: In function 'int main()':
a.cc:50:33: error: 'itoa' was not declared in this scope
50 | itoa(c,buf,10);
| ^~~~
|
s250229397 | p00429 | C++ | #include <iostream>
#include <sstream>
#include <cstdlib>
using namespace std;
void addstr(string s,int a,int b) {
stringstream ss;
ss << a << b;
s += ss.str();
}
int main() {
int n,count = 1,p = 0;
string str;
int r[10000],a[10000],x[10000];
int size;
while(cin >> n) {
if(n == 0) break;
cin ... | a.cc: In function 'int main()':
a.cc:29:15: error: incompatible types in assignment of 'int' to 'int [10000]'
29 | r = count;
| ~~^~~~~~~
a.cc:30:15: error: incompatible types in assignment of 'int' to 'int [10000]'
30 | a = x[k-1];
| ~~^~~~~~~~
a.cc:32:... |
s490436734 | p00429 | C++ | #include <iostream>
#include <iterator>
#include <fstream>
#include <sstream>
#include <strstream>
#include <iomanip>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <functional>
#inc... | In file included from /usr/include/c++/14/backward/strstream:50,
from a.cc:5:
/usr/include/c++/14/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated... |
s738873040 | p00429 | C++ | #include <iostream>
#include <iterator>
#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>
#inclu... | a.cc: In function 'int main()':
a.cc:47:49: error: 'itoa' was not declared in this scope
47 | itoa(nn,sum,10);
| ^~~~
a.cc:52:49: error: 'itoa' was not declared in this scope
52 | ... |
s764698004 | p00429 | C++ | #include <iostream>
#include <string>
using namespace std;
string T,F;
void fuego() {string ans;int i,j,k=1;T+='-';F="";for (i=1,j=T.size();i<j;i++) if (T[i]!=T[i-1]) {while (k) ans.insert(0,(k%10+'0')),k/=10;F+=ans+T[i-1];k=1,ans="";} else k++;T=F;}
int main() {int N;while (1) {cin>>N;if (!N) return 0;cin>>T;while (N-... | a.cc: In function 'void fuego()':
a.cc:5:118: error: no matching function for call to 'std::__cxx11::basic_string<char>::insert(int, int)'
5 | void fuego() {string ans;int i,j,k=1;T+='-';F="";for (i=1,j=T.size();i<j;i++) if (T[i]!=T[i-1]) {while (k) ans.insert(0,(k%10+'0')),k/=10;F+=ans+T[i-1];k=1,ans="";} else k++... |
s347654427 | p00429 | C++ | #include<stdio.h>
int main(){
int i
printf("%d%n",2,&i);
return 0;
} | a.cc: In function 'int main()':
a.cc:5:1: error: expected initializer before 'printf'
5 | printf("%d%n",2,&i);
| ^~~~~~
|
s211723588 | p00429 | C++ | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main(void)
{
int N;
while(cin >> N,N){
string str;
cin >> str;
char c;
int co;
while(N > 0){
N--;
string t;
co = 1;
c = str[0];
for(int i = 1; i < str.size(); i++){
if(str[i] == c)
co++;
else{
char s[10... | a.cc: In function 'int main()':
a.cc:29:33: error: 'itoa' was not declared in this scope
29 | itoa(co, s, 10);
| ^~~~
a.cc:38:33: error: 'itoa' was not declared in this scope
38 | itoa(co, s, 10);
| ... |
s611294711 | p00429 | C++ | #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
int main(void)
{
int N;
while(cin >> N,N){
string str;
cin >> str;
char c;
int co;
while(N > 0){
N--;
string t;
co = 1;
c = str[0];
for(int i = 1; i < str.size(); i++){
if(str[i] == c)
co++;
... | a.cc: In function 'int main()':
a.cc:30:33: error: 'itoa' was not declared in this scope
30 | itoa(co, s, 10);
| ^~~~
a.cc:39:33: error: 'itoa' was not declared in this scope
39 | itoa(co, s, 10);
| ... |
s189637918 | p00429 | C++ | #include <cstdio>
#include <stdlib.h>
#include <iostream>
#include <string>
using namespace std;
int main(void)
{
int N;
while(cin >> N,N){
string str;
cin >> str;
char c;
int co;
while(N > 0){
N--;
string t;
co = 1;
c = str[0];
for(int i = 1; i < str.size(); i++){
if(str[i] == c)
co++;
... | a.cc: In function 'int main()':
a.cc:30:33: error: 'itoa' was not declared in this scope
30 | itoa(co, s, 10);
| ^~~~
a.cc:39:33: error: 'itoa' was not declared in this scope
39 | itoa(co, s, 10);
| ... |
s062093410 | p00429 | C++ | #include <cstdio>
#include <stdlib.h>
#include <iostream>
#include <string>
using namespace std;
int main(void)
{
int N;
while(cin >> N,N){
string str;
cin >> str;
char c;
int co;
while(N > 0){
N--;
string t;
co = 1;
c = str[0];
for(int i = 1; i < str.size(); i++){
if(str[i] == c)
co++;
... | a.cc: In function 'int main()':
a.cc:39:33: error: 'itoa' was not declared in this scope
39 | itoa(co, s, 10);
| ^~~~
|
s406641556 | p00429 | C++ | char a[999999],b[999999],*p;
main(i,n,c,s,d,l){
for(;scanf("%d",&n),n;printf("%s\n",a)){
scanf("%s",a);
for(;n;n--){
for(p=b,i=d=s=0,l=strlen(a);i<=l;i++){
c=a[i];
if(!s)s=c;
if(s!=c){
p+=sprintf(p,"%d",d);
*(p++)=s;
d=0;s=c;
}
d++;
... | a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token
2 | main(i,n,c,s,d,l){
| ^
|
s515549477 | p00429 | C++ | #include <iostream>
#include <string>
using namespace std;
string ToString ( int x )
{
string s = "";
while ( x )
{
s += ((x % 10) + '0');
x /= 10;
}
reverse(s.begin(), s.end());
return s;
}
int main ( void )
{
int n;
while ( cin >> n, n )
{
string s1, s2;
cin >> s1;
for (int i = 0; i < n; +... | a.cc: In function 'std::string ToString(int)':
a.cc:16:9: error: 'reverse' was not declared in this scope
16 | reverse(s.begin(), s.end());
| ^~~~~~~
|
s057671522 | p00429 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
while(1){
int a,i,j,b,sum=0,num=0;
string x[21];
cin<<a;
if(a==0) break;
cin<<x[0];
for(i=0;i<a;i++){
for(j=0;j<x.size();j++){
if(x[i][j]==x[i][j+1]){
sum++;
}else{
if(su... | a.cc: In function 'int main()':
a.cc:8:6: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
8 | cin<<a;
| ~~~^~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:8:6: note: candidate: 'operator<<(int... |
s670779050 | p00429 | C++ | #include <iostream>
#include <cstring>
using namespace std;
int main(){
while(1){
int a,i,j,b,sum=0,num=0;
char x[21][101];
cin<<a;
if(a==0) break;
cin<<x[0];
for(i=0;i<a;i++){
for(j=0;j<strlen(x);j++){
if(x[i][j]==x[i][j+1]){
sum++;
}else{
... | a.cc: In function 'int main()':
a.cc:8:6: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
8 | cin<<a;
| ~~~^~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:8:6: note: candidate: 'operator<<(int... |
s193830130 | p00429 | C++ | #include <cstdio>
#include <cstring>
using namespace std;
int main(){
int a,i,j,b,sum=1,num=0;
char x[21][101];
scanf("%d",&a);
if(a==0) break;
scanf("%s",&x[0]);
for(i=0;i<a;i++){
for(j=0;j<strlen(x[i]);j++){
if(x[i][j]==x[i][j+1]){
sum++;
}else{
... | a.cc: In function 'int main()':
a.cc:8:12: error: break statement not within loop or switch
8 | if(a==0) break;
| ^~~~~
|
s033638490 | p00429 | C++ |
#include <cstdio>
#include <cstring>
using namespace std;
int main(){
while(1){
int a,i,j,b,sum=1,num=0;
char x[21][101];
scanf("%d",&a);
if(a==0) break;
scanf("%s",&x[0]);
for(i=0;i<a;i++){
for(j=0;j<strlen(x[i]);j++){
if(x[i][j]==x[i][j+1]){
sum++;
}els... | a.cc: In function 'int main()':
a.cc:42:1: error: 'print' was not declared in this scope; did you mean 'printf'?
42 | print("\n");
| ^~~~~
| printf
|
s249901150 | p00429 | C++ | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main()
{
char in[2][101],key,temp[101];
int n,now,cnt,wrt;
bool turn;
while(cin >> n && n){
cin >> in[0];
turn = 1;
for(int i = 0; i < n; i++){
turn = !turn;
now = 0;
wrt = 0;
while(now < strlen(in[turn])){
key... | a.cc: In function 'int main()':
a.cc:20:37: error: 'strlen' was not declared in this scope
20 | while(now < strlen(in[turn])){
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
... |
s808117218 | p00429 | C++ | #include<cstdio>
#include<string>;
using namespace std;
int n;
int str_n;
char str[10000];
char str_[10000];
void solve()
{
char c=str[0];
int n=1;
int k=0;
str_n=strlen(str);
for(int i=1;i<str_n+1;i++)
{
if(c==str[i]&&i!=str_n)
{
n++;
}
else
{
if(n>=10)
{
str_[k+1]=n%10+'0'... | a.cc:2:17: warning: extra tokens at end of #include directive
2 | #include<string>;
| ^
a.cc: In function 'void solve()':
a.cc:16:23: error: 'strlen' was not declared in this scope
16 | str_n=strlen(str);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defin... |
s199388093 | p00429 | C++ | #include<cstdio>
#include<string>
using namespace std;
int n;
int str_n;
char str[10000];
char str_[10000];
void solve()
{
char c=str[0];
int n=1;
int k=0;
str_n=strlen(str);
for(int i=1;i<str_n+1;i++)
{
if(c==str[i]&&i!=str_n)
{
n++;
}
else
{
if(n>=10)
{
str_[k+1]=n%10+'0';... | a.cc: In function 'void solve()':
a.cc:16:23: error: 'strlen' was not declared in this scope
16 | str_n=strlen(str);
| ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include<string>
+++ |... |
s554668165 | p00429 | C++ | #include <cstdio>
#include <cstring>
#include <string>
#include <iostream>
using namespace std;
int main(){
int n;
while(scanf("%d",&n) && n){
string a;
cin >> a;
for(int i=0;i<n;i++){
string b;
int ro=1;
for(int i=1;i<a.size();i++){
if(a[i-1]==a[i]){
ro++;
}else{
string ru;
whil... | a.cc: In function 'int main()':
a.cc:25:41: error: 'reverse' was not declared in this scope
25 | reverse(ru.begin(),ru.end());
| ^~~~~~~
a.cc:37:41: error: 'reverse' was not declared in this scope
37 | ... |
s651381765 | p00429 | C++ | #include <iostream>
using namespace std;
int main(void){
int n;
char str[100],tmp[100];
cin >> n >> str;
for(int i=0;str[i];i++)
str[i]-=0x30;
for(int i=0;i<n;i++){
int p=0;
for(int j=0;str[j];j++){
int c = 1;
while(str[j]==str[j+1]){
j++;
c++;
}
tmp[p++]=c;
tmp[p++]=str[j];
... | a.cc: In function 'int main()':
a.cc:26:17: error: 'strcpy' was not declared in this scope
26 | strcpy(str,tmp);
| ^~~~~~
a.cc:2:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#inclu... |
s952739722 | p00429 | C++ | def foo(n):
ret = ""
cnt = 1
for i in range(1, len(n)):
if n[i - 1] == n[i]:
cnt += 1
continue
else:
ret += str(cnt) + n[i - 1]
cnt = 1
ret += str(cnt) + n[-1]
return ret
while 1:
n = input()
if n == 0:
break
m =... | a.cc:1:1: error: 'def' does not name a type
1 | def foo(n):
| ^~~
|
s244909356 | p00429 | C++ | #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
int N;
string S;
string::iterator CountSeqStr(string::iterator start, string *s, int *n){
*s = *start;
*n = 0;
string tmp;
for(;tmp = *start, tmp == *s && start != S.end(); ++start){
(*n)++;
}
return --sta... | a.cc: In function 'std::string F()':
a.cc:29:24: error: 'itoa' was not declared in this scope; did you mean 'it'?
29 | retS.append(string(itoa(n, strn, 10)));
| ^~~~
| it
|
s513989300 | p00429 | C++ | #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;
int N;
string S;
string::iterator CountSeqStr(string::iterator start, string *s, int *n){
*s = *start;
*n = 0;
string tmp;
for(;tmp = *start, tmp == *s && start != S.end(); ++start){
(*n)++... | a.cc: In function 'std::string F()':
a.cc:30:24: error: 'itoa' was not declared in this scope; did you mean 'it'?
30 | retS.append(string(itoa(n, strn, 10)));
| ^~~~
| it
|
s791336879 | p00430 | Java | public class Main {
static final Scanner scan = new Scanner(System.in);
public static void main(String[] args) {
int n = scan.nextInt();
while(n!=0){
int[] l = new int[n];
routine(n,-1, 0, l);
n = scan.nextInt();
}
}
private static void routine(int n, int m, int depth, int[] l){
if(n==0){
for(... | Main.java:2: error: cannot find symbol
static final Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:2: error: cannot find symbol
static final Scanner scan = new Scanner(System.in);
^
symbol: class Scanner
location... |
s956612665 | p00430 | Java | public class Main {
int[] a;
public static void main(String []args){
try{
FileWriter fw = new FileWriter("output.txt");
BufferedWriter bw = new BufferedWriter(fw);
while (true) {
Scanner in = new Scanner(System.in);
int num = in.nextInt();
if(num==0)
break;
int[] a=new int[num];
... | Main.java:6: error: cannot find symbol
FileWriter fw = new FileWriter("output.txt");
^
symbol: class FileWriter
location: class Main
Main.java:6: error: cannot find symbol
FileWriter fw = new FileWriter("output.txt");
^
symbol: class FileWriter
location: class Main
Main.java:... |
s299157734 | p00430 | C | #include <stdio.h>
#include <memory.h>
void f(int now,int rest,int list[],int p){
int i;
list[p]=now;
if(rest==0){
for(i=0;i<=p;i++){
if(i>0){
printf(" ");
}
printf("%d",list[i]);
}
for(i=rest;i>0;i--){
f(i,rest-i,list,p+1);
}
}
int main(void){
int n,i,list[301];
while(1){
scanf("%d",&n);
if(n==0){
break;
}
memset(list... | main.c: In function 'f':
main.c:30:1: error: expected declaration or statement at end of input
30 | }
| ^
|
s931625499 | p00430 | C | int main()
{
int n;
while (scanf("%d", &n), n)
{
int b[31];
memset(b, 0, sizeof(b));
b[0] = n;
while (true)
{
int t = find(b, b+n, 0) - b;
for (int i = 0; i < t-1; ++i)
printf("%d ", b[i]);
printf("%d\n", b[t-1]);
if (t == n)
break;
int u;
u = t-1;
while (b[u] == 1)
--u;
... | main.c: In function 'main':
main.c:4:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | while (scanf("%d", &n), n)
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main()
main.... |
s697076920 | p00430 | C | int block[31];
void recur(int t, int b)
{
if (b == 0)
{
int i;
for (i = 0; block[i + 1]; ++i)
printf("%d ", block[i]);
printf("%d\n", block[i]);
return;
}
for (int i = min(b, t ? block[t - 1] : 99); i > 0; --i)
{
block[t] = i;
recur(t + 1, b - i);
block[t] = 0;
}
}
int main()
{
int n;
while (s... | main.c: In function 'recur':
main.c:8:25: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
8 | printf("%d ", block[i]);
| ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.... |
s219624812 | p00430 | C | int block[31], i;
void recur(int t, int b)
{
if (b == 0)
{
int i;
for (i = 0; block[i + 1]; ++i)
printf("%d ", block[i]);
printf("%d\n", block[i]);
return;
}
for (i = min(b, t ? block[t - 1] : 99); i > 0; --i)
{
block[t] = i;
recur(t + 1, b - i);
block[t] = 0;
}
}
int main()
{
int n;
while (sc... | main.c: In function 'recur':
main.c:8:25: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
8 | printf("%d ", block[i]);
| ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.... |
s933082404 | p00430 | C | #include <cstdio>
#include <algorithm>
int block[31];
void recur(int t, int b)
{
if (b == 0)
{
int i;
for (i = 0; block[i + 1]; ++i)
printf("%d ", block[i]);
printf("%d\n", block[i]);
return;
}
for (int i = min(b, t ? block[t - 1] : 99); i > 0; --i)
{
block[t] = i;
recur(t + 1, b - i);
block[t] =... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s624700704 | p00430 | C | t[],j;f(n,m,i){if(n)for(m>n?m=n:0;m;m--)f(n-m,t[i]=m,i+1);elsefor(j=3;j<i;)printf(j-i?"%d ":"%d\n",t[j++]);}main(n){for(;scanf("%d",&n)*n;)f(n,n,3);} | main.c:1:1: warning: data definition has no type or storage class
1 | t[],j;f(n,m,i){if(n)for(m>n?m=n:0;m;m--)f(n-m,t[i]=m,i+1);elsefor(j=3;j<i;)printf(j-i?"%d ":"%d\n",t[j++]);}main(n){for(;scanf("%d",&n)*n;)f(n,n,3);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
main.... |
s946378164 | p00430 | C | t[99],j;f(n,m,i){if(n)for(m>n?m=n:0;m;m--)f(n-m,t[i]=m,i+1);elsefor(j=3;j<i;)printf(j-i?"%d ":"%d\n",t[j++]);}main(n){for(;scanf("%d",&n)*n;)f(n,n,3);} | main.c:1:1: warning: data definition has no type or storage class
1 | t[99],j;f(n,m,i){if(n)for(m>n?m=n:0;m;m--)f(n-m,t[i]=m,i+1);elsefor(j=3;j<i;)printf(j-i?"%d ":"%d\n",t[j++]);}main(n){for(;scanf("%d",&n)*n;)f(n,n,3);}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
mai... |
s056617120 | p00430 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#define rep(i,n) for(int (i)=0;(i) < (n);(i)++)
using namespace std;
void reset(int a[]){
rep(i,50){
a[i]=0;
}
}
void show(FILE *fp,int array[]){
int temp=0;
while(array[temp+1]!=0){
fprintf(outf,"%d ",array[temp]);
temp++... | a.cc: In function 'void show(FILE*, int*)':
a.cc:15:17: error: 'outf' was not declared in this scope
15 | fprintf(outf,"%d ",array[temp]);
| ^~~~
a.cc:18:13: error: 'outf' was not declared in this scope
18 | fprintf(outf,"%d\n",array[temp]);
| ^~~~
|
s265264376 | p00430 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#define rep(i,n) for(int (i)=0;(i) < (n);(i)++)
using namespace std;
void reset(int a[]){
rep(i,50){
a[i]=0;
}
}
void show(FILE *fp,int array[]){
int temp=0;
while(array[temp+1]!=0){
fprintf(outf,"%d ",array[temp]);
temp++... | a.cc: In function 'void show(FILE*, int*)':
a.cc:15:17: error: 'outf' was not declared in this scope
15 | fprintf(outf,"%d ",array[temp]);
| ^~~~
a.cc:18:13: error: 'outf' was not declared in this scope
18 | fprintf(outf,"%d\n",array[temp]);
| ^~~~
|
s498839508 | p00430 | C++ | #include <iostream>
#include <cstdio>
#include <cstdlib>
#define rep(i,n) for(int (i)=0;(i) < (n);(i)++)
using namespace std;
void reset(int a[]){
rep(i,100){
a[i]=0;
}
}
void show(int array[]){
int temp=0;
while(array[temp+1]!=0||last<50){
printf("%d ",array[temp]);
temp++;
... | a.cc: In function 'void show(int*)':
a.cc:14:29: error: 'last' was not declared in this scope
14 | while(array[temp+1]!=0||last<50){
| ^~~~
|
s845035093 | p00430 | C++ | #include <iostream>
#include <vector>
using namespace std;
void saiki(vector<int> z,int ma,int nk){
if(nk==0) {
for(int i=0;i<z.size();i++) cout<<z[i]<<" ";
cout<<endl;
}
else if(ma*nk!=0){
for(int i=min(ma,nk);i>0;i--){
z.push_back(i);
saiki(z,i,nk-i);
z.pop_back();
}
}
}
int main() {
int n;
while(ci... | a.cc: In function 'int main()':
a.cc:28:4: error: expected '(' before 'n'
28 | if n==0 break;
| ^
| (
a.cc: At global scope:
a.cc:40:9: error: expected unqualified-id before 'return'
40 | return 0;
| ^~~~~~
a.cc:41:1: error: expected declaration before '}' token
41 | }
... |
s471004816 | p00430 | C++ | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(void){
int num_data;
int *data;
int search_num;
int i;
int range_min, range_max, comp_num_array;
int num_of_comp=0;
while(1){
scanf("%d", &num_data);
if(num_data == 0)
return 0;
data = malloc(sizeof(int) * num_data);
for(i=0 ; i <... | a.cc: In function 'int main()':
a.cc:18:30: error: invalid conversion from 'void*' to 'int*' [-fpermissive]
18 | data = malloc(sizeof(int) * num_data);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
| |
| void*
|
s440612548 | p00430 | C++ | g#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <fstream>
#include <complex>
#incl... | a.cc:1:2: error: stray '#' in program
1 | g#include <cstdio>
| ^
a.cc:1:1: error: 'g' does not name a type
1 | g#include <cstdio>
| ^
In file included from /usr/include/c++/14/cmath:45,
from a.cc:3:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cx... |
s116555371 | p00430 | C++ | #include <stdio.h>
#include <windows.h>
int box[30] = { 0 };
void print(){
int j=0;
while(box[j]>=1 && box[j]<=100){
printf("%d ",box[j]);
j++;
}
puts("");
}
void func(int m){
int now,i,j;
bool flg=1;
while(flg){
flg=0;
for(i=1;i<30;i++){
if(box[i-1]<box[i]){
box[i+1]++;
box[i]--;
}
... | a.cc:2:10: fatal error: windows.h: No such file or directory
2 | #include <windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s302250823 | p00430 | C++ | #include<cstdio>
#include<vector>
using namespace std;
int main(void){
vector<vector<int> > kek[31];
vector<int> hn;
vector<int> u;
while(1){
int n;
scanf("%d",&n);
if(n==0){break;}
for(int i=0;i<31;i++){
kik[i].clear();
}
for(int i=1;i<=n;i++){
hn.clear();
hn.push_back(i);
... | a.cc: In function 'int main()':
a.cc:16:25: error: 'kik' was not declared in this scope; did you mean 'kek'?
16 | kik[i].clear();
| ^~~
| kek
|
s790008814 | p00430 | C++ | #include <stdio.h>
#include <stdlib.h>
#include <list>
using namespace std;
list<string> ans;
int main(void)
{
list<string> pat[31];
list<string>::iterator it;
int n;
char str[100];
pat[0].push_back("");
pat[1].push_back("1");
for (int i = 2; i <= 30; i++){
for (int j = 0; j < i; j++){
sprintf(str,... | a.cc:7:6: error: 'string' was not declared in this scope
7 | list<string> ans;
| ^~~~~~
a.cc:4:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
3 | #include <list>
+++ |+#include <string>
4 |
a.cc:7:12: error: template argument 1 is... |
s658259318 | p00430 | C++ | #include <stdio.h>
#include <stdlib.h>
#include <list>
using namespace std;
list<string> ans;
int main(void)
{
list<string> pat[31];
list<string>::iterator it;
int n;
char str[100];
pat[0].push_back("");
pat[1].push_back("1");
for (int i = 2; i <= 30; i++){
for (int j = 0; j < i; j++){
sprintf(str, ... | a.cc:7:6: error: 'string' was not declared in this scope
7 | list<string> ans;
| ^~~~~~
a.cc:4:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
3 | #include <list>
+++ |+#include <string>
4 |
a.cc:7:12: error: template argument 1 is... |
s115951752 | p00430 | C++ | #include <cstdio>
#include <string>
#include <algorithm>
int main()
{
int n;
while (scanf("%d", &n), n)
{
int b[31];
memset(b, 0, sizeof(b));
b[0] = n;
while (true)
{
int t = find(b, b+n, 0) - b;
for (int i = 0; i < t-1; ++i)
printf("%d ", b[i]);
printf("%d\n", b[t-1]);
if (t == n)
bre... | a.cc: In function 'int main()':
a.cc:10:17: error: 'memset' was not declared in this scope
10 | memset(b, 0, sizeof(b));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++... |
s402964029 | p00430 | C++ | #include <cstdio>
#include <cstring>
#include <algorithm>
int main()
{
int n;
while (scanf("%d", &n), n)
{
int b[31];
memset(b, 0, sizeof(b));
b[0] = n;
while (true)
{
int t = find(b, b+n, 0) - b;
for (int i = 0; i < t-1; ++i)
printf("%d ", b[i]);
printf("%d\n", b[t-1]);
if (t == n)
br... | a.cc: In function 'int main()':
a.cc:14:33: error: 'find' was not declared in this scope; did you mean 'std::find'?
14 | int t = find(b, b+n, 0) - b;
| ^~~~
| std::find
In file included from /usr/include/c++/14/algori... |
s138183565 | p00430 | C++ | #include <cstdio>
#include <algorithm>
int block[31];
void recur(int t, int b)
{
if (b == 0)
{
int i;
for (i = 0; block[i + 1]; ++i)
printf("%d ", block[i]);
printf("%d\n", block[i]);
return;
}
for (int i = min(b, t ? block[t - 1] : 99); i > 0; --i)
{
block[t] = i;
recur(t + 1, b - i);
block[t] =... | a.cc: In function 'void recur(int, int)':
a.cc:15:22: error: 'min' was not declared in this scope; did you mean 'std::min'?
15 | for (int i = min(b, t ? block[t - 1] : 99); i > 0; --i)
| ^~~
| std::min
In file included from /usr/include/c++/14/algorithm:6... |
s367837833 | p00430 | C++ | #include <iostream>
#include <vector>
#include <vector>
using namespace std;
int main(void)
{
int n;
while (cin >> n, n){
vector <int> v(30);
fill(v.begin(), v.end(), 0);
v[0] = n;
cout << v[0] << endl;
while ((count(v.begin(), v.end(), 1)) != n){
int s = 0;
for (int i = 0; i < v.size() && 0 < v[i]; ... | a.cc: In function 'int main()':
a.cc:14:25: error: 'count' was not declared in this scope
14 | while ((count(v.begin(), v.end(), 1)) != n){
| ^~~~~
|
s778022813 | p00430 | C++ | t[],j;f(n,m,i){if(n)for(m>n?m=n:0;m;m--)f(n-m,t[i]=m,i+1);else for(j=3;j<i;)printf(j-i?"%d ":"%d\n",t[j++]);}main(n){for(;scanf("%d",&n)*n;)f(n,n,3);} | a.cc:1:1: error: 't' does not name a type
1 | t[],j;f(n,m,i){if(n)for(m>n?m=n:0;m;m--)f(n-m,t[i]=m,i+1);else for(j=3;j<i;)printf(j-i?"%d ":"%d\n",t[j++]);}main(n){for(;scanf("%d",&n)*n;)f(n,n,3);}
| ^
a.cc:1:8: error: expected constructor, destructor, or type conversion before '(' token
1 | t[],j;f(n,m,i)... |
s790789838 | p00430 | C++ | #include<iostream>
#include<string>
#include<boost/lexical_cast.hpp>
using namespace std;
int main(){
while(1){
int n;
cin >> n;
if(n == 0) break;
string s;
cin >> s;
for(int i = 0;i < n;i++){
string ans;
for(int j = 0;j < s.length();j++){
size_t k = j;
while(s[k] == s[j] && k < s.length()) ... | a.cc:3:9: fatal error: boost/lexical_cast.hpp: No such file or directory
3 | #include<boost/lexical_cast.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s353059734 | p00430 | C++ | #include <cstdio>
int saikii(int *zi,int zisu,int zan);
int main(void){
int n=0;
//while(1){
scanf("%d",&n);
if(n==0)break;
int wat[20]={0};
saikii(wat,0,n);
//}
return 0;
}
int saikii(int *zi,int zisu,int zan){
int i=0;
printf("%d\x0020",zan);
for(i=zisu-1;i>-1;i--){
printf("%d\x00... | a.cc: In function 'int main()':
a.cc:9:13: error: break statement not within loop or switch
9 | if(n==0)break;
| ^~~~~
|
s072980835 | p00430 | C++ | #include <cstdio>
int saikii(int *zi,int zisu,int zan);
int main(void){
int n=0;
/*while(1){*/
scanf("%d",&n);
if(n==0)break;
int wat[20]={0};
saikii(wat,0,n);
/*}*/
return 0;
}
int saikii(int *zi,int zisu,int zan){
int i=0;
printf("%d\x0020",zan);
for(i=zisu-1;i>-1;i--){
printf("%d... | a.cc: In function 'int main()':
a.cc:9:13: error: break statement not within loop or switch
9 | if(n==0)break;
| ^~~~~
|
s418638834 | p00430 | C++ | #include <cstdio>
int saikii(int *zi,int zisu,int zan);
int main(void){
int n=0;
scanf("%d",&n);
if(n==0)break;
int wat[20]={0};
saikii(wat,0,n);
return 0;
}
int saikii(int *zi,int zisu,int zan){
int i=0;
printf("%d\x0020",zan);
for(i=zisu-1;i>-1;i--){
printf("%d\x0020",zi[i]);
... | a.cc: In function 'int main()':
a.cc:9:13: error: break statement not within loop or switch
9 | if(n==0)break;
| ^~~~~
|
s212523282 | p00430 | C++ | #include<iostream>
int res[50];
void calc(int a, int b){
if (a == 0){
for (int i = 1; i < b; i++)std::cout << res[i] << " ";
std::cout << std::endl;
return;
}
for (int i = a; i >= 1; i--){
if (res[b - 1] >= i){
res[b] = i;
calc(a - i, b + 1);
}
}
return;
}
int main(){
int n;
while (std::cin ... | a.cc: In function 'int main()':
a.cc:25:17: error: 'memset' was not declared in this scope
25 | memset(res, 0, sizeof(res));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+... |
s952342186 | p00431 | Java | import java.util.*;
import java.io.*;
public class Main{
public static void main(String[] args){
ArrayList<Integer> result=new ArrayList<Integer>();
try{
BufferedReader fin=new BufferedReader(new FileReader("input.txt"));
while(true){
String sc=fin.readLine()... | Main.java:52: error: class Reflexive is public, should be declared in a file named Reflexive.java
public class Reflexive{
^
1 error
|
s447043137 | p00431 | Java | import java.util.*;
import java.io.*;
class StringwithRing{
public static void main(String[] args){
ArrayList<Integer> result=new ArrayList<Integer>();
try{
BufferedReader fin=new BufferedReader(new FileReader("input.txt"));
while(true){
String sc=fin.readLin... | Main.java:121: error: reached end of file while parsing
}
^
1 error
|
s479350328 | p00431 | Java | import java.util.*;
import java.lang.*;
import java.io.*;
public class Main{
public static void main (String[] args) throws java.lang.Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
while(true){
Ring.ringList = ne... | Main.java:25: error: incompatible types: Ring cannot be converted to int
for(int key:Ring.getSeachRing()){
^
Main.java:106: error: for-each not applicable to expression type
for(Ring ring:ringList){
^
required: array or java.la... |
s596666923 | p00431 | C | #include<stdio.h>
int n;
int c[100][2];
int chain(int e,int l,int done[]){ /*done???????????°????????¨??¶??????????????????e??????????????????l???*/
int i;
int prol,nowl;
prol = nowl = l;
for(i=0;i<n;i++){
if(c[i][0]==e && done[c[i][1]-1]==0){
prol = chain(c[i][1],nowl+1);
done[c[i][1]-1] = 1;
... | main.c: In function 'chain':
main.c:11:14: error: too few arguments to function 'chain'
11 | prol = chain(c[i][1],nowl+1);
| ^~~~~
main.c:5:5: note: declared here
5 | int chain(int e,int l,int done[]){ /*done???????????°????????¨??¶??????????????????e??????????????????l???*/
| ... |
s004313537 | p00431 | C | #include<stdio.h>
int n;
int c[100][2];
int chain(int e,int l,int done[]){ /*done???????????°????????¨??¶??????????????????e??????????????????l???*/
int i;
int prol,nowl;
prol = nowl = l;
for(i=0;i<n;i++){
if(c[i][0]==e && done[c[i][1]-1]==0){
prol = chain(c[i][1],nowl+1);
done[c[i][1]-1] = 1;
... | main.c: In function 'chain':
main.c:11:14: error: too few arguments to function 'chain'
11 | prol = chain(c[i][1],nowl+1);
| ^~~~~
main.c:5:5: note: declared here
5 | int chain(int e,int l,int done[]){ /*done???????????°????????¨??¶??????????????????e??????????????????l???*/
| ... |
s277687707 | p00431 | C | #include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int n,G[100][100];
int D[100];
int size(int m)
{
int r=1;
for(int i=0;i<100;i++){
if(G[m][i]&&!D[i]){
D[i]=1;
r=max(r,1+size(i));
D[i]=0;
}
}
return r;
}
int main()
{
wh... | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s216137292 | p00431 | C | #include<stdio.h>
#include<string.h>
#define max(x,y) ((x) > (y) ? (x) : (y))
#define min(x,y) ((x) < (y) ? (x) : (y))
int neib[101][200];
int used[101];
int onceused[101];
int dfs(int x){
int i;
used[x] = 1;
onceused[x] = 1;
int res = 1;
for(i = 1;i <= neib[x][0];i++){
if(used[neib[x][i]] == 0){
... | main.c: In function 'main':
main.c:30:5: error: 'rings' undeclared (first use in this function)
30 | rings[0] = 0;
| ^~~~~
main.c:30:5: note: each undeclared identifier is reported only once for each function it appears in
|
s171002810 | p00431 | C++ |
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <vector>
#define rep(i,n) for(int (i)=0;(i) < (n);(i)++)
#define MAX 110
using namespace std;
vector<int> G[MAX];
bool flag[MAX];
int dfs(int now){
flag[now]=1;
int ret = 1;
rep(i,G[now].size()){
if(flag[G[now][i]]==0)
r... | a.cc: In function 'int main()':
a.cc:41:13: error: 'sort' was not declared in this scope; did you mean 'short'?
41 | sort(G[i].begin(),G[i].end());
| ^~~~
| short
a.cc:42:24: error: 'unique' was not declared in this scope
42 | G[i].erase(unique(G[i].begi... |
s498128236 | p00431 | C++ | import Control.Monad (replicateM)
import Data.Array (Array,array,(!),bounds)
main = do
n <- readLn
if n == 0 then return () else do
ps <- replicateM n (getLine >>= return . (\[a,b]->(a,b)) . map read . words)
print $ maxLength $ strings ps
main
type Strings = Array Int [Int]
strings :... | a.cc:7:51: error: stray '\' in program
7 | ps <- replicateM n (getLine >>= return . (\[a,b]->(a,b)) . map read . words)
| ^
a.cc:16:24: warning: multi-character literal with 9 characters exceeds 'int' size of 4 bytes
16 | otherside a = [b|(a',b)... |
s051898877 | p00431 | C++ | #include <stdio.h>
#define N 101
int find_length(int a, int cur_length);
int conn[N][N];
int used[N];
int main()
{
int i, j;
int a, b;
int n;
int max_length, length;
while(1)
{
for(j = 0; j < N; j++)
{
for(i = 0; i < N; i++)
{
conn[j][i] = 0;
}
}
scanf("%d", &n)... | /usr/bin/ld: /tmp/ccNi3rcs.o: in function `main':
a.cc:(.text+0x1a2): undefined reference to `find_length(int, int)'
collect2: error: ld returned 1 exit status
|
s399385765 | p00431 | C++ | #include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
vector<vector<int> > G;
vector<bool> used;
int rec(int pos)
{
used[pos] = true; int ret = 1;
for(int i = 0; i < G[pos].size(); i++)
{
if(!used[G[pos][i]])
{
ret = max(ret, rec(G[pos][i], used... | a.cc: In function 'int rec(int)':
a.cc:19:31: error: too many arguments to function 'int rec(int)'
19 | ret = max(ret, rec(G[pos][i], used) + 1);
| ~~~^~~~~~~~~~~~~~~~~
a.cc:11:5: note: declared here
11 | int rec(int pos)
| ^~~
a.cc: In function 'int main()':... |
s465486624 | p00431 | C++ | #include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
vector<vector<int> > G;
vector<bool> used;
int rec(int pos)
{
used[pos] = true; int ret = 1;
for(int i = 0; i < G[pos].size(); i++)
{
if(!used[G[pos][i]])
{
ret = max(ret, rec(G[pos][i]) + 1)... | a.cc: In function 'int main()':
a.cc:55:26: error: no matching function for call to 'max(int&)'
55 | ret = max(ret));
| ~~~^~~~~
In file included from /usr/include/c++/14/vector:62,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidat... |
s161600259 | p00431 | C++ | #include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
vector<vector<int> > G;
vector<bool> used;
vector<int> rings;
char rec(char pos)
{
used[pos] = true; char ret = 1;
for(char i = 0; i < rings[pos]; i++)
{
if(!used[G[pos][i]])
{
ret = max(ret... | a.cc: In function 'char rec(char)':
a.cc:21:22: error: no matching function for call to 'max(char&, int)'
21 | ret = max(ret, rec(G[pos][i]) + 1);
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:62,
from a.cc:1:
/usr/include/c++/14/... |
s898836794 | p00431 | C++ | #include <stdio.h>
#include <algorithm>
using namespace std;
int N, A, B, v[100], r[100], G[100][199];
int rec(int pos) {
u[pos] = 1; int ret = 0;
for(int i = 0; i < rings[pos]; i++) {
if(!u[G[pos][i]]) ret = max(ret, rec(G[pos][i]));
}
u[pos] = 0;
return ret + 1;
}
int main() {
while(scanf("%d%d", &N), N) {
... | a.cc: In function 'int rec(int)':
a.cc:6:9: error: 'u' was not declared in this scope
6 | u[pos] = 1; int ret = 0;
| ^
a.cc:7:28: error: 'rings' was not declared in this scope
7 | for(int i = 0; i < rings[pos]; i++) {
| ^~~~~
|
s980248078 | p00431 | C++ | #include <stdio.h>
#include <algorithm>
using namespace std;
int N, A, B, v[100], r[100], G[100][199];
int rec(int pos) {
v[pos] = 1; int ret = 0;
for(int i = 0; i < rings[pos]; i++) {
if(!v[G[pos][i]]) ret = max(ret, rec(G[pos][i]));
}
v[pos] = 0;
return ret + 1;
}
int main() {
while(scanf("%d%d", &N), N) {
... | a.cc: In function 'int rec(int)':
a.cc:7:28: error: 'rings' was not declared in this scope
7 | for(int i = 0; i < rings[pos]; i++) {
| ^~~~~
|
s948955424 | p00431 | C++ | #include <stdio.h>
int N, A, B, v[111], r[111], G[111][222];
int rec(int pos) {
int ret = 0; v[pos] = 1;
for (int i = 0; i < r[pos]; i++) {
if (!v[G[pos][i]]) {
int w = rec(G[pos][i]);
ret = ret > w ? ret : w;
}
}
v[pos] = 0;
return ret + 1;
}
int main() {
while (scanf("%d", &N), N) {
for (int i = 0; ... | a.cc: In function 'int main()':
a.cc:22:53: error: 'max' was not declared in this scope
22 | for (int i = 0; i < 100; i++) ret = max(ret, rec(i));
| ^~~
|
s150734900 | p00431 | C++ | #include <stdio.h>
int N, A, B, v[111], r[111], G[111][222];
int rec(int pos) {
int ret = 0; v[pos] = 1;
for (int i = 0; i < r[pos]; i++) {
if (!v[G[pos][i]]) {
int w = rec(G[pos][i]);
ret = ret > w ? ret : w;
}
}
v[pos] = 0;
return ret + 1;
}
int main() {
while (scanf("%d", &N), N) {
for (int i = 0; ... | a.cc: In function 'int main()':
a.cc:24:48: error: expected ';' before ')' token
24 | ret = ret > w ? ret : w);
| ^
| ;
|
s601293013 | p00431 | C++ | 7
1 3
3 4
1 4
2 7
5 7
6 7
1 7
6
1 2
2 3
3 4
4 5
1 5
2 6
7
1 3
2 4
3 5
4 6
6 7
2 6
4 7
0 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 7
| ^
|
s847582812 | p00431 | C++ | #include<stdio.h>
int n;
int done[100];
int c[100][2];
main(){
int i;
int ans,preans;
while(scanf("%d",&n)!=0){
for(i=0;i<n;i++){
scanf("%d %d",&c[i][0],&c[i][1]);
}
for(i=0;i<100;i++){
done[i]=0;
}
ans = 0
for(i=1;i<=100;i++){
preans = chain(i,0);
if(preans>ans){
... | a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
6 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:16:12: error: expected ';' before 'for'
16 | ans = 0
| ^
| ;
17 | for(i=1;i<=100;i++){
| ~~~
a.cc:17:23: ... |
s295920033 | p00431 | C++ | #include<stdio.h>
int n;
int done[100];
int c[100][2];
main(){
int i;
int ans,preans;
while(scanf("%d",&n)!=0){
for(i=0;i<n;i++){
scanf("%d %d",&c[i][0],&c[i][1]);
}
for(i=0;i<100;i++){
done[i]=0;
}
ans = 0;
for(i=1;i<=100;i++){
preans = chain(i,0);
if(preans>ans){... | a.cc:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
6 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:18:16: error: 'chain' was not declared in this scope
18 | preans = chain(i,0);
| ^~~~~
|
s300874053 | p00431 | C++ | #include<cstdio>
#include<stack>
#include<vector>
using namespace std;
vector<int> vec[1001];
bool ch[101]={};
stack<int> st;
void DFS(int i,int val){
if(val > maxx)maxx = val;
//printf("%d ",i);
for (int k=0; k<vec[i].size(); k++) {
if(!ch[vec[i][k]]){
ch[vec[i][k]] = true;
... | a.cc: In function 'void DFS(int, int)':
a.cc:14:14: error: 'maxx' was not declared in this scope
14 | if(val > maxx)maxx = val;
| ^~~~
a.cc: In function 'int main()':
a.cc:41:9: error: request for member 'clear' in 'vec', which is of non-class type 'std::vector<int> [1001]'
41 | vec.cle... |
s709594824 | p00431 | C++ | from collections import defaultdict
class GraphChain():
def __init__(self):
self.graph = defaultdict(set)
self.passed = defaultdict(bool)
self.route = defaultdict(bool)
self.ans = 0
def dfs(self, left, count):
'''
depth first search
'''
for i in range(len(self.graph[left])):
... | a.cc:12:5: error: empty character constant
12 | '''
| ^~
a.cc:12:7: warning: missing terminating ' character
12 | '''
| ^
a.cc:12:7: error: missing terminating ' character
a.cc:14:5: error: empty character constant
14 | '''
| ^~
a.cc:14:7: warning: missing terminatin... |
s720311399 | p00431 | C++ | wad
| a.cc:1:1: error: 'wad' does not name a type
1 | wad
| ^~~
|
s770630959 | p00431 | C++ | #include <iostream>
#include <vector>
#include <cstdio>
using namespace std;
int solve(int idx, const vector<vector<int> >& path, vector<int>& visited, int cnt)
{
if (visited[idx])
return cnt;
int ans = cnt;
visited[idx] = 1;
for (int i = 0; i < 100; ++i) {
if (!visited[i] && path[idx][i])
ans = max(ans, s... | a.cc: In function 'int main()':
a.cc:40:55: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>'
40 | ans = max(ans, solve(i, path, vector<int>(100, 0), 1));
| ^~~~~~~~~~~~... |
s537253142 | p00431 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
vector<int> G[101];
bool passed[101];
int maxPath=0;
void dfs(int s,int depth){
maxPath=max(maxPath,depth);
if(maxPath==100)
return;
for(int i = 0; i<G[s].size(); i++){
if(!passed[G[s][i]]){
passed[G[s][i]]=true;
dfs(G[s][i]... | a.cc: In function 'int main()':
a.cc:28:16: error: expected ';' before 'while'
28 | int n;n
| ^
| ;
29 | while(cin>>n&&n!=0){
| ~~~~~
|
s766269973 | p00431 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <set>
using namespace std;
vector<int> G[101];
bool passed[101];
int maxPath=0;
int maxNode;
bool isAppeared[101];
void dfs(int s,int depth){
maxPath=max(maxPath,depth);
if(maxPath==maxNode)
return;
for(int i = 0; i<G[s].size(); i++){
if(!pass... | a.cc: In function 'int main()':
a.cc:49:25: error: 's' was not declared in this scope
49 | maxNode=s.size();
| ^
|
s742156780 | p00431 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <cstdio>
using namespace std;
vector<int> G[101];
bool passed[101];
int maxPath=0;
int maxNode;
void dfs(int s,int depth){
maxPath=max(maxPath,depth);
if(maxPath==maxNode)
return;
for(int i = 0; i<G[s].size(); i++){
int to=G[s][... | a.cc: In function 'int main()':
a.cc:33:17: error: 'memset' was not declared in this scope
33 | memset(passed,0,sizeof(passed));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <cstdio>
... |
s254983683 | p00431 | C++ | #include<iostream>
#include<list>
using namespace std;
class Chain
{
public:
int tail;
int length;
Chain(int b)
{
tail = b;
length = 2;
};
}
int main(){
while(1)
{
int num;
cin>>num;
if(num==0)
{
break;
... | a.cc:16:2: error: expected ';' after class definition
16 | }
| ^
| ;
a.cc: In function 'int main()':
a.cc:70:17: error: 'macLength' was not declared in this scope; did you mean 'maxLength'?
70 | macLength = (*it).length;
| ^~~~~~~~~
| maxLe... |
s193871305 | p00431 | C++ | #include<iostream>
#include<list>
using namespace std;
class Chain
{
public:
int tail;
int length;
Chain(int b)
{
tail = b;
length = 2;
};
};
int main(){
while(1)
{
int num;
cin>>num;
if(num==0)
{
break;
... | a.cc: In function 'int main()':
a.cc:70:17: error: 'macLength' was not declared in this scope; did you mean 'maxLength'?
70 | macLength = (*it).length;
| ^~~~~~~~~
| maxLength
a.cc:73:15: error: 'macLength' was not declared in this scope; did you mean 'maxL... |
s668291646 | p00431 | C++ | #include<iostream>
#include<list>
using namespace std;
class Chain
{
public:
int tail;
int length;
Chain(int b)
{
tail = b;
length = 2;
};
};
int main(){
ifstream ifs("input.txt");
ofstream ofs("output.txt");
while(1)
{
int num;
if... | a.cc: In function 'int main()':
a.cc:20:17: error: variable 'std::ifstream ifs' has initializer but incomplete type
20 | ifstream ifs("input.txt");
| ^
a.cc:3:1: note: 'std::ifstream' is defined in header '<fstream>'; this is probably fixable by adding '#include <fstream>'
2 | #include<... |
s570790914 | p00431 | C++ | #include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
int n,G[100][100],L[100],D[100];
int solve(int m)
{
int r=0;
D[m]=1;
for(int i=0;i<L[m];i++){
int k=G[m][i];
if(!D[k]){
r=max(r,solve(k));
}
}
D[m]=0
return r+1;
}
int main()
{
... | a.cc: In function 'int solve(int)':
a.cc:18:11: error: expected ';' before 'return'
18 | D[m]=0
| ^
| ;
19 | return r+1;
| ~~~~~~
a.cc:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
20 | }
| ^
|
s521820737 | p00431 | C++ | #include<vector>
#include<algorithm>
#include<iostream>
#include<cstdio>
using namespace std;
vector<int> a[100];
bool b[100];
int fi(int p){
int i;
int mx=0;
for(i=0;i<(int)a[p].size();++i){
if(b[a[p][i]])
continue;
b[a[p][i]]=true;
mx=max(mx,fi(a[p][i])+1);
b[a[p][i]]=false;
}
return mx;
}
int main(){... | a.cc: In function 'int main()':
a.cc:34:24: error: expected unqualified-id before numeric constant
34 | int mn,1<<30,mx=0;
| ^
a.cc:36:31: error: no matching function for call to 'min(int&, std::vector<int>::size_type)'
36 | mn=min(mn,a[i].size(... |
s109703936 | p00431 | C++ | #include <stdio.h>
#include <stdbool.h>
#define MAX_VERTEX_NUM 100
typedef struct {
char linked_num;
char linked[MAX_VERTEX_NUM-1];
} vertex;
vertex vertex_list[MAX_VERTEX_NUM];
bool has_arrived[MAX_VERTEX_NUM];
char count_max;
void vertex_init() {
int i;
for (i=0;i < MAX_VERTEX_NUM;i++) {
v... | a.cc: In function 'int main()':
a.cc:62:21: error: return-statement with no value, in function returning 'int' [-fpermissive]
62 | if (n == 0) return;
| ^~~~~~
|
s243428910 | p00431 | C++ | #include<iostream>
#include<set>
#include<bitset>
#include<algorithm>
using namespace std;
set<int> vertex;
vector< vector<int> > edge;
int dfs(int v, bitset<101> visited) {
int result = visited.count() + 1;
visited.set(v);
for(vector<int>::iterator i=edge[v].begin(); i!=edge[v].end(); i++) {
if(v... | a.cc:8:1: error: 'vector' does not name a type
8 | vector< vector<int> > edge;
| ^~~~~~
a.cc: In function 'int dfs(int, std::bitset<101>)':
a.cc:13:9: error: 'vector' was not declared in this scope
13 | for(vector<int>::iterator i=edge[v].begin(); i!=edge[v].end(); i++) {
| ^~~~~~
a.cc:5:... |
s139062133 | p00432 | Java | import java.util.Arrays;
import java.util.Scanner;
public class Sheets{
public static void main(String[] args){
// TODO ?????????????????????????????????????????????
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int kindOfProblem = sc.nextInt();
Sheet s = new Sheet(10001);
for(int i = 0;... | Main.java:5: error: class Sheets is public, should be declared in a file named Sheets.java
public class Sheets{
^
1 error
|
s332004018 | p00432 | Java | import java.util.Scanner;
public class Sheet {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int numOfSheet = in.nextInt();
int probNum = in.nextInt();
int[][] matrix;
while(!(numOfSheet==0 && probNum==0)) {
int maxX = 0, maxY = 0;
int[][] data = new int[nu... | Main.java:3: error: class Sheet is public, should be declared in a file named Sheet.java
public class Sheet {
^
1 error
|
s188613325 | p00432 | Java | package d2018;
import java.io.*;
import java.util.*;
// Volume5-0509 Sheets
public class Main5_0509 {
class Rect {
int x0;
int y0;
int x1;
int y1;
}
class Range {
Range(int x, int f) {
this.x = x;
this.f = f;
}
int x;
... | Main.java:9: error: class Main5_0509 is public, should be declared in a file named Main5_0509.java
public class Main5_0509 {
^
1 error
|
s444678731 | p00432 | C | #include<stdio.h>
main(){
int n,r;
int i,j,k;
int Mx,My;
int p[10000][4];
while(scanf("%d %d",&n,&r)!=EOF){
Mx = My = 100;
for(k=0,k<n,k++){
scanf("%d %d %d %d",&p[k][0],&p[k][1],&p[k][2],&p[k][3]);
if(p[k][2]>Mx){
Mx = p[k][2];
}
if(p[k][3]>My){
My = p[k][3];
... | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(){
| ^~~~
main.c: In function 'main':
main.c:9:20: error: expected ';' before ')' token
9 | for(k=0,k<n,k++){
| ^
| ;
main.c:9:20: error: expected expression before ')' token
ma... |
s567139295 | p00432 | C | #include<stdio.h>
main(){
int n,r;
int i,j,k;
int Mx,My;
int p[10000][4];
while(scanf("%d %d",&n,&r)!=EOF){
Mx = My = 100;
for(k=0,k<n,k++){
scanf("%d %d %d %d",&p[k][0],&p[k][1],&p[k][2],&p[k][3]);
if(p[k][2]>Mx){
Mx = p[k][2];
}
if(p[k][3]>My){
My = p[k][3];
... | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(){
| ^~~~
main.c: In function 'main':
main.c:9:20: error: expected ';' before ')' token
9 | for(k=0,k<n,k++){
| ^
| ;
main.c:9:20: error: expected expression before ')' token
ma... |
s595291332 | p00432 | C | #include<stdio.h>
#include<string.h>
bool m[10005][10005];
int main(){
int i,j,x1,y1,x2,y2,n,r;
int sx,sy,bx,by,a,b;
FILE *fp;
//fp=fopen("test.txt","r");
fp=stdin;
while(1){
fscanf(fp,"%d%d",&n,&r);
if(n==0 && r==0)break;
sx=sy=10000;
bx=by=0;
memset(m,0,sizeof(m));
while(n--){
fscanf(fp,"%d%d%d%d... | main.c:3:1: error: unknown type name 'bool'
3 | bool m[10005][10005];
| ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
2 | #include<string.h>
+++ |+#include <stdbool.h>
3 | bool m[10005][10005];
main.c: In function 'main':
... |
s477655951 | p00432 | C | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
using namespace std;
typedef struct {
int sx, sy;
int ex, ey;
} RECT;
int area;
int length;
RECT calc[10000];
RECT before[10000];
RECT grid[10000];
int bsize;
bool comp(const RECT& rLeft, const RECT& rRight){
return (rLeft.sx <... | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.