submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s352843833
p00083
C++
#include<stdio.h> void era_transform(int year, int month, int day); int main(void) { int year, month, day; while(scanf("%d %d %d", &year, &month, &day) != EOF) { era_transform(year, month, day); } return 0; } void era_transform(int year, int month, int day) { int date_number = year * 10000 + month * 100 + day;...
a.cc:30:1: error: extended character   is not valid in an identifier 30 |    printf("heisei %d %d %d\n", year - 1988, month, day); | ^ a.cc:30:1: error: extended character   is not valid in an identifier a.cc:30:1: error: extended character   is not valid in an identifier a.cc: In function 'void era_transform(...
s711397881
p00083
C++
#include<stdio.h> void era_transform(int year, int month, int day); int main(void) { int year, month, day; while(scanf("%d %d %d", &year, &month, &day) != EOF) { era_transform(year, month, day); } return 0; } void era_transform(int year, int month, int day) { int date_number = year * 10000 + month * 100 + day;...
a.cc:30:1: error: extended character   is not valid in an identifier 30 |    printf("heisei %d %d %d\n", year - 1988, month, day); | ^ a.cc:30:1: error: extended character   is not valid in an identifier a.cc:30:1: error: extended character   is not valid in an identifier a.cc: In function 'void era_transform(...
s917774208
p00083
C++
#include<stdio.h> void era_transform(int year, int month, int day); int main(void) { int year, month, day; while (scanf("%d %d %d", &year, &month, &day) != EOF { era_transform(year, month, day); } return 0; } void era_transform(int year, int month, int day) { int date_number = year * ...
a.cc: In function 'int main()': a.cc:8:58: error: expected ')' before '{' token 8 | while (scanf("%d %d %d", &year, &month, &day) != EOF { | ~ ^
s684508443
p00083
C++
#include<stdio.h> void era_transform(int year, int month, int day); int main(void) { int year, month, day; while (scanf("%d %d %d", &year, &month, &day) != EOF { era_transform(year, month, day); } return 0; } void era_transform(int year, int month, int day) { int date_number = year * ...
a.cc: In function 'int main()': a.cc:8:58: error: expected ')' before '{' token 8 | while (scanf("%d %d %d", &year, &month, &day) != EOF { | ~ ^
s424899571
p00083
C++
#include<stdio.h> int main(){ int x,y,z; int n1=0,m1=0; while(scanf("%d %d %d"<&x,&y,&z)!=EOF){ n1=10000*x+100y+z; if(n1>=19890108)printf("heisei "); else if(n1>=19261225)printf("showa "); else if(n1>=19120730)printf("taisho "); else if(n1>=18680908)printf("meiji "); else if(n1<18680908)printf("pre-meiji"); if(n1>=1...
a.cc: In function 'int main()': a.cc:7:23: error: comparison between distinct pointer types 'const char*' and 'int*' lacks a cast 7 | while(scanf("%d %d %d"<&x,&y,&z)!=EOF){ | ~~~~~~~~~~^~~ a.cc:7:23: error: cannot convert 'bool' to 'const char*' 7 | while(scanf("%d %d %d"<&x,&y,&z)!=EOF){ ...
s580977798
p00083
C++
#include <stdio.h> int main(void) { int y, m, d; while(1){ scanf("%d %d %d", &y, &m, &d); if((y <= 1868)||(y == 1868 && m <= 9)||(y == 1868 && m == 9 && d < 8){ printf("pre-meiji %d %d %d\n", y+1-1868, m, d); }else if((y <= 1912)||(y == 1912 && m <= 7)||(y == 1912 &...
a.cc: In function 'int main()': a.cc:9:78: error: expected ')' before '{' token 9 | if((y <= 1868)||(y == 1868 && m <= 9)||(y == 1868 && m == 9 && d < 8){ | ~ ^ | ...
s672716813
p00083
C++
#include <stdio.h> int main(void) { int y, m, d; while(1){ scanf("%d %d %d", &y, &m, &d); if((y <= 1868)||(y == 1868 && m <= 9)||(y == 1868 && m == 9 && d < 8)){ printf("pre-meiji"); }else if((y <= 1912)||(y == 1912 && m <= 7)||(y == 1912 && m == 7 && d < 30){ ...
a.cc: In function 'int main()': a.cc:11:85: error: expected ')' before '{' token 11 | }else if((y <= 1912)||(y == 1912 && m <= 7)||(y == 1912 && m == 7 && d < 30){ | ~ ^ | ...
s542041666
p00083
C++
#include <stdio.h> #include <stdbool.h> int judge(int32_t ye, int32_t mo, int32_t da) { int32_t sum = 10000 * ye + 100 * mo + da; if (sum < 18680908) { printf("pre-meiji\n"); } else if (sum < 19120730) { printf("meiji %d %d %d\n", x - 1867, y, z); } else if (sum < 19261225) { ...
a.cc:4:11: error: 'int32_t' was not declared in this scope 4 | int judge(int32_t ye, int32_t mo, int32_t da) | ^~~~~~~ a.cc:3:1: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 2 | #include <stdbool.h> +++ |+#include <cstdint> 3 | ...
s476677132
p00083
C++
#include <stdio.h> #include <stdbool.h> int judge(int32_t ye, int32_t mo, int32_t da) { int32_t sum = 10000 * ye + 100 * mo + da; if (sum < 18680908) { printf("pre-meiji\n"); } else if (sum < 19120730) { printf("meiji %d %d %d\n", x - 1867, y, z); } else if (sum < 19261225) { ...
a.cc:4:11: error: 'int32_t' was not declared in this scope 4 | int judge(int32_t ye, int32_t mo, int32_t da) | ^~~~~~~ a.cc:3:1: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 2 | #include <stdbool.h> +++ |+#include <cstdint> 3 | ...
s813886896
p00083
C++
#include <stdio.h> #include <stdbool.h> void judge(int32_t ye, int32_t mo, int32_t da) { int32_t sum = 10000 * ye + 100 * mo + da; if (sum < 18680908) { printf("pre-meiji\n"); } else if (sum < 19120730) { printf("meiji %d %d %d\n", x - 1867, y, z); } else if (sum < 19261225) { ...
a.cc:4:6: error: variable or field 'judge' declared void 4 | void judge(int32_t ye, int32_t mo, int32_t da) | ^~~~~ a.cc:4:12: error: 'int32_t' was not declared in this scope 4 | void judge(int32_t ye, int32_t mo, int32_t da) | ^~~~~~~ a.cc:3:1: note: 'int32_t' is defined in header '...
s833467474
p00083
C++
#include <stdio.h> #include <stdbool.h> void judge(int32_t ye, int32_t mo, int32_t da) { int32_t sum = 10000 * ye + 100 * mo + da; if (sum < 18680908) { printf("pre-meiji\n"); } else if (sum < 19120730) { printf("meiji %d %d %d\n", x - 1867, y, z); } else if (sum < 19261225) { ...
a.cc:4:6: error: variable or field 'judge' declared void 4 | void judge(int32_t ye, int32_t mo, int32_t da) | ^~~~~ a.cc:4:12: error: 'int32_t' was not declared in this scope 4 | void judge(int32_t ye, int32_t mo, int32_t da) | ^~~~~~~ a.cc:3:1: note: 'int32_t' is defined in header '...
s638109811
p00083
C++
#include <stdio.h> #include <stdbool.h> void judge(int ye, int mo, int da) { int sum = 10000 * ye + 100 * mo + da; if (sum < 18680908) { printf("pre-meiji\n"); } else if (sum < 19120730) { printf("meiji %d %d %d\n", x - 1867, y, z); } else if (sum < 19261225) { printf("taisho %...
a.cc: In function 'void judge(int, int, int)': a.cc:10:36: error: 'x' was not declared in this scope 10 | printf("meiji %d %d %d\n", x - 1867, y, z); | ^ a.cc:10:46: error: 'y' was not declared in this scope; did you mean 'ye'? 10 | printf("meiji %d %d %d\n...
s518875686
p00083
C++
#include <stdio.h> #include <stdbool.h> void judge(int ye, int mo, int da) { int sum = 10000 * ye + 100 * mo + da; if (sum < 18680908) { printf("pre-meiji\n"); } else if (sum < 19120730) { printf("meiji %d %d %d\n", ye - 1867, mo, da); } else if (sum < 19261225) { printf("taish...
a.cc:21:1: error: '::main' must return 'int' 21 | void main(void) | ^~~~
s693709154
p00083
C++
#include <stdio.h> const int year[4] = {1868, 1912, 1926, 1989}; const int month[4] = {9, 7, 12, 1}; const int day[4] = {8, 30, 25, 8}; const char gengou[5] = {'p', 'm', 't', 's', 'h'};//??????pre-meiji, meiji, taisyou, syowa, heisei??¨?????? char gengouka (int inputyear, int inputmonth, int inputday) { int i; ...
a.cc: In function 'int main()': a.cc:46:1: error: expected primary-expression before '?' token 46 | ????????????while(scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF){ | ^ a.cc:46:2: error: expected primary-expression before '?' token 46 | ????????????while(scanf("%d %d %d", &inputyear, &inputm...
s032767429
p00083
C++
#include <stdio.h> const int year[4] = {1868, 1912, 1926, 1989}; const int month[4] = {9, 7, 12, 1}; const int day[4] = {8, 30, 25, 8}; const char gengou[5] = {'p', 'm', 't', 's', 'h'};//??????pre-meiji, meiji, taisyou, syowa, heisei??¨?????? char gengouka (int inputyear, int inputmonth, int inputday) { int i; ...
a.cc: In function 'int main()': a.cc:46:1: error: expected primary-expression before '?' token 46 | ????????????while (scanf("%d %d %d", &inputyear, &inputmonth, &inputday) != EOF) { | ^ a.cc:46:2: error: expected primary-expression before '?' token 46 | ????????????while (scanf("%d %d %d", &inputyear, &inp...
s961769756
p00083
C++
#include <stdio.h> int32_t year, month, day, sum; int print(void); int main(void) { while(scanf("%d %d %d", &year, &month, &day) != EOF) { sum = 10000 * year+ 100 * month + day; print(); } return 0; } int print(void) { if (sum < 18680907) { printf("pre-meiji\n"); } else if (sum ...
a.cc:3:1: error: 'int32_t' does not name a type 3 | int32_t year, month, day, sum; | ^~~~~~~ a.cc:2:1: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' 1 | #include <stdio.h> +++ |+#include <cstdint> 2 | a.cc: In function 'int main()': a.cc:9...
s117390495
p00083
C++
#include <stdio.h> int Y, M, D; bool is_leap(int y) { return i % 400 == 0 || (i % 4 == 0 && i % 100 != 0); } int count(int y, int m, int d) { int ret = 0; for(int i = 1; i < y; i++) { if(is_leap(i)) ret += 366; else ret += 365; } for(int i = 1; i < m; i++) { if(i == 2) ret += (is_leap(y) ? 29 : 28); else i...
a.cc: In function 'bool is_leap(int)': a.cc:4:16: error: 'i' was not declared in this scope 4 | return i % 400 == 0 || (i % 4 == 0 && i % 100 != 0); | ^
s966685601
p00083
C++
<?php while(fscanf(STDIN, "%d%d%d", $a, $b, $c)){ if(($a >= 1989 && $b >= 1 && $c >= 8) || ($a >= 1989 && $b >= 2) || ($a >= 1990)) { $a -= 1988; print("heisei $a $b $c\n"); } else{ ...
a.cc:1:1: error: expected unqualified-id before '<' token 1 | <?php | ^ a.cc:34:17: error: expected unqualified-id before '?' token 34 | ?> | ^
s155798758
p00083
C++
<?php while(fscanf(STDIN, "%d%d%d", $a, $b, $c)){ if(($a >= 1989 && $b >= 1 && $c >= 8) || ($a >= 1989 && $b >= 2) || ($a >= 1990)) { $a -= 1988; print("heisei $a $b $c\n"); } else{ ...
a.cc:1:9: error: expected unqualified-id before '<' token 1 | <?php | ^ a.cc:34:17: error: expected unqualified-id before '?' token 34 | ?> | ^
s739708305
p00083
C++
int y,m,d,now; while(cin>>y>>m>>d) { now = y*10000+m*100+d; if(now<m_lb){cout << "pre-meiji"<<endl;continue;} if(now<t_lb){cout << "meiji "<<y-1867 << " " <<m<<" "<< d<<endl; continue;} if(now<s_lb){cout << "taisho "<<y-1911 << " " <<m<<" "<< d<<endl; continue;} if(no...
a.cc:2:5: error: expected unqualified-id before 'while' 2 | while(cin>>y>>m>>d) | ^~~~~ a.cc:13:5: error: expected unqualified-id before 'return' 13 | return 0; | ^~~~~~ a.cc:14:1: error: expected declaration before '}' token 14 | } | ^
s792782974
p00083
C++
g#include <iostream> #include <string> using namespace std; struct Date { int year, month, day; Date(int year=0, int month=1, int day=1) : year(year), month(month), day(day) {} bool operator<(const Date &o) const { if (year == o.year) { if (month == o.month) { return da...
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> | ^ In file included from /usr/include/c++/14/bits/char_traits.h:42, from /usr/include/c++/14/string:42, from a.cc:2: /usr/include/...
s989860067
p00084
Java
public class Main{ Scanner sc = new Scanner(System.in); public static void main(String[] args) { new Main(); } public Main() { new Base().doIt(); } class Base{ String[] STR(String a){ String[] sp1 = a.split("[, .]"); return sp1; } /* class Data{ int x; double y; public Data...
Main.java:2: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:2: error: cannot find symbol Scanner sc = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s291542337
p00084
Java
import java.util.*; public class Main{ Scanner in = new Scanner(System.in); void solve(){ List<String> list = Arrays.asList(in.nextLine().replaceAll(",|\\."," ").split("[ ]+")); System.out.println(String.join(" ", list.stream().filter(s -> 2 < s.length() && s.length() < 7).collect(Collectors.t...
Main.java:8: error: cannot find symbol System.out.println(String.join(" ", list.stream().filter(s -> 2 < s.length() && s.length() < 7).collect(Collectors.toList()))); ^ symbol: variable Collectors...
s225641991
p00084
Java
import java.util.Scanner; public static void main(String[] args) { try(Scanner sc = new Scanner(System.in)) { while(sc.hasNextLine()){ String line=sc.nextLine(); String[] tokens = line.split(“[,. ]“); ArrayList<String> list = new ArrayList<>(); for(String t: t...
Main.java:6: error: illegal character: '\u201c' String[] tokens = line.split(?[,. ]?); ^ Main.java:6: error: illegal character: '\u201c' String[] tokens = line.split(?[,. ]?); ^ Main.java:13: error: illegal c...
s281056602
p00084
Java
mport java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] ary = sc.nextLine().split("[ ,\\.]"); int i =0; for(String o : ary) { if(i==0) i=1; else System.out.print(" "); System.out.prin...
Main.java:1: error: class, interface, enum, or record expected mport java.util.*; ^ 1 error
s268006850
p00084
Java
mport java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] ary = sc.nextLine().split("[ ,\\.]"); int i=0,j; for(String o : ary) { j=o.length(); if(j>2&&j<7){ if(i==0) i=1; else Syst...
Main.java:1: error: class, interface, enum, or record expected mport java.util.*; ^ 1 error
s766095971
p00084
Java
mport java.io.*; public class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tmp = br.readLine(); int cnt = 0; String[] ans = new String[1024]; char[] s = tmp.toCharArray(); f...
Main.java:1: error: class, interface, enum, or record expected mport java.io.*; ^ 1 error
s544432608
p00084
C
import java.util.Scanner; public class J0084{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ String word = sc.next(); int n = word.length(); //System.out.println("n=" + n); if(word.charAt(n-1) == ',' || word.charAt(n-1) == '.') { n--; ...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.Scanner; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.Scanner; | ^ main.c:3:1: error: unknown type name 'public' 3 | public class J0084{ | ^~...
s904304798
p00084
C
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ String word = sc.next(); int n = word.length(); //System.out.println("n=" + n); if(word.charAt(n-1) == ',' || word.charAt(n-1) == '.') { n--; ...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.Scanner; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.Scanner; | ^ main.c:3:1: error: unknown type name 'public' 3 | public class Main{ | ^~~...
s014308920
p00084
C
include<stdio.h> #include<string.h> void aaa(int m,int i,char *a){ int g; if(3<=m&&6>=m){ for(g=i-m;g<i;g++) printf("%c",a[g]); putchar(' '); } } int main(){ char a[2000]; int h,i,m=0; gets(a); h=strlen(a); for(i=0;i<h;i++){ if(a[i]=='.'||a[i]==','||a[i]==' '){ if(m>0){ aaa(m,...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ...
s551447448
p00084
C
#include<stdio.h> #include<string.h> void aaa(int m,int i,char *a){ int g; if(3<=m&&6>=m){ for(g=i-m;g<i;g++) printf("%c",a[g]); putchar(' '); } } int main(){ char a[2000]; int h,i,m=0; gets(a); h=strlen(a); for(i=0;i<h;i++){ if(a[i]=='.'||a[i]==','||a[i]==' '){ if(m>0){ aaa(m...
main.c: In function 'main': main.c:14:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration] 14 | gets(a); | ^~~~ | fgets
s024454639
p00084
C
include<stdio.h> #include<string.h> int main(){ char str[1100]; int l,i,j,k,flg; fgets(str,1050,stdin); l=strlen(str); str[l-1]=' '; flg=0; for(i=0;;i++){ loop: if(i>=l-1)break; for(j=i;j<l;j++){ if(str[j]==' '||str[j]=='.'||str[j]==','){ if(j-i>=2&&j-i<=5){ if(flg==1)printf(" "); f...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ...
s563324783
p00084
C
#include <stdio.h> #include <string.h> #include <conio.h> int getNextWord(int added, char* src, char* word) { int i; for( i = 0; src[i] != ' ' && src[i] != '.' && src[i] != ',' && src[i] != '\0'; i++ ) { word[i] = src[i]; } word[i] = '\0'; for(; src[i] == ' ' || src[i] == '.' || src[i] == ',' || src[i] == '\...
main.c:3:10: fatal error: conio.h: No such file or directory 3 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s607702003
p00084
C++
#include<stdio.h> #include<iostream> #include<string> using namespace std; int main(){ string st; bool f=false; while(cin>>st){ int t=st.size(); if(t<=6&&t>=3){ if(f==true)cout<<" "; cout<<st;f=false; } return 0; }
a.cc: In function 'int main()': a.cc:16:2: error: expected '}' at end of input 16 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s997842212
p00084
C++
import java.io.*; class Main { public static void main(String args[]) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try { String buf = br.readLine(); boolean First = true; for (int i=0;i<buf.length();i++) { String str = ""; while (NotStop(buf.charAt(i))) { str ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:15: error: expected ':' before 'static' 4 | public static void main(String args[]) { | ^~~~~~~ | : a.cc:4:3...
s212818977
p00084
C++
import sys line = raw_input() word_list = line.translate(None, '.,').split() ans = [] for word in word_list: if len(word) >= 3 and len(word) <= 6: ans.append(word) for i, w in enumerate(ans): if i != 0: sys.stdout.write(" ") sys.stdout.write(w) sys.stdout.write("\n")
a.cc:4:34: warning: multi-character character constant [-Wmultichar] 4 | word_list = line.translate(None, '.,').split() | ^~~~ a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s049680149
p00084
C++
#include<bits/stdc++.h> #define rep(i,n)for(ll i=0;i<n;i++) using namespace std; typedef long long ll; char s[2000]; vector<string>ans; int main() { gets_s(s); char*split; split = strtok(s, " ,."); do { if (3 <= strlen(split) && strlen(split) <= 6) ans.push_back(string(split)); } while (split = strtok(NULL,...
a.cc: In function 'int main()': a.cc:10:9: error: 'gets_s' was not declared in this scope; did you mean 'getsid'? 10 | gets_s(s); | ^~~~~~ | getsid
s187698753
p00084
C++
#include <iostream> #include <vector> #include <string> #include <sstream> using namespace std; vector<string> split(const string& input, char delimiter) { istringstream stream(input); string field; vector<string> result; while (getline(stream, field, delimiter)) { result.push_back(field); } return re...
a.cc: In function 'int main()': a.cc:24:3: error: 'replace' was not declared in this scope 24 | replace(str.begin(), str.end(), '.', ' '); | ^~~~~~~
s199313359
p00084
C++
#include <iostream> #include <vector> #include <string> #include <sstream> #include <algorithm> using namespace std; vector<string> split(const string& input, char delimiter) { istringstream stream(input); string field; vector<string> result; while (getline(stream, field, delimiter)) { result.push_back(fi...
a.cc: In function 'int main()': a.cc:25:10: error: no matching function for call to 'replace(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, int, char)' 25 | replace(str.begin(), str.end(), '.' | ',', ' '); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file in...
s374898284
p00084
C++
#include <vector> #include <string> #include <sstream> #include <algorithm> using namespace std; /* vector<string> split(const string& input, char delimiter) { istringstream stream(input); string field; vector<string> result; while (getline(stream, field, delimiter)) { result.push_back(field); } return...
a.cc: In function 'int main()': a.cc:23:11: error: 'cin' was not declared in this scope 23 | getline(cin, str); | ^~~ a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 4 | #include <algorithm> +++ |+#include <iostream> 5...
s596186299
p00084
C++
#include <vector> #include <string> #include <sstream> #include <algorithm> using namespace std; /* vector<string> split(const string& input, char delimiter) { istringstream stream(input); string field; vector<string> result; while (getline(stream, field, delimiter)) { result.push_back(field); } return...
a.cc: In function 'int main()': a.cc:23:11: error: 'cin' was not declared in this scope 23 | getline(cin, str); | ^~~ a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 4 | #include <algorithm> +++ |+#include <iostream> 5...
s647184366
p00084
C++
#include <iostream> #include <vector> #include <string> #include <sstream> #include <algorithm> using namespace std; /* vector<string> split(const string& input, char delimiter) { istringstream stream(input); string field; vector<string> result; while (getline(stream, field, delimiter)) { result.push_back(...
a.cc: In function 'int main()': a.cc:42:6: error: expected ';' before 'while' 42 | i=0 | ^ | ; 43 | while (ss >> word) { | ~~~~~
s559877116
p00084
C++
#include <iostream> #include <vector> #include <string> #include <sstream> #include <algorithm> using namespace std; /* vector<string> split(const string& input, char delimiter) { istringstream stream(input); string field; vector<string> result; while (getline(stream, field, delimiter)) { result.push_back(...
a.cc: In function 'int main()': a.cc:42:6: error: expected ';' before 'while' 42 | i=0 | ^ | ; 43 | while (ss >> word) { | ~~~~~
s206372088
p00084
C++
#include <iostream> #include <vector> #include <string> #include <sstream> #include <algorithm> using namespace std; /* vector<string> split(const string& input, char delimiter) { istringstream stream(input); string field; vector<string> result; while (getline(stream, field, delimiter)) { result.push_back(...
a.cc: In function 'int main()': a.cc:42:6: error: expected ';' before 'while' 42 | i=0 | ^ | ; 43 | while (ss >> word) { | ~~~~~
s433237316
p00084
C++
#include<iostream> int main(){ std::string l[1000]; int c=0,k; while(std::cin>>l[c]) { if((l[c].find(","))+(l[c].find("."))!=-2) l[c].replace(l[c].length()-1,1,""); if( (l[c].length()>2)&&(l[c].length()<7)) c++; } for(k=0;k<c;k++) { std::cout<<l[k]; if(k!=c-1) std::cout<<" "; std...
a.cc: In function 'int main()': a.cc:15:2: error: expected '}' at end of input 15 | } | ^ a.cc:2:11: note: to match this '{' 2 | int main(){ | ^
s432298516
p00084
C++
#include<iostream> #include<string> #include<algorithm> #include<functional> #include<cctype> using namespace std; struct IsAlpha:unary_function<char, bool> {bool operator()(char c)const{return isalpha(c)||c=='\'';}}; int main() { string s; getline(cin, s); string::iterator i1=s.begin(),i2; ostream_iterator<char>o(...
a.cc:7:16: warning: 'template<class _Arg, class _Result> struct std::unary_function' is deprecated [-Wdeprecated-declarations] 7 | struct IsAlpha:unary_function<char, bool> | ^~~~~~~~~~~~~~ In file included from /usr/include/c++/14/string:49, from /usr/include/c++/14/bits/local...
s619702652
p00084
C++
#include<iostream> #include<string> #include<ctype> #include<vector> using namespace std; int main(){ int x,now; string s; vector<string> box; getline(cin,s); now=0; for(int i=0;i<s.size();i++){ if(s[i]!=' '&&s[i]!='.'&&s[i]!=','){ now++; } else{ if(now>=3&&now<=6) box.push_back(s.substr(i-...
a.cc:3:9: fatal error: ctype: No such file or directory 3 | #include<ctype> | ^~~~~~~ compilation terminated.
s833510372
p00084
C++
#include<cstdio> #include<vector> using namespace std; int main(){ char str[1200]; int pos = 0; vector<string> ans; fgets(str,1200,stdin); while(1){ string word; while(str[pos] != '.' && str[pos] != ' ' && str[pos] != ',' && str[pos] != '\n')word.push_back(str[pos++]); if(str[pos] == '\n')...
a.cc: In function 'int main()': a.cc:8:10: error: 'string' was not declared in this scope 8 | vector<string> ans; | ^~~~~~ a.cc:3:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>' 2 | #include<vector> +++ |+#include <string> 3 |...
s897370979
p00084
C++
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <ctime> #include <iostream> #include <algorithm> #include <sstream> #include <string> #include <vector> #include <queue> #include <stack> #include <map> #include <set> #include <utility> #include <cctype> using namespace std; #define rep...
a.cc: In function 'int main()': a.cc:29:10: error: 'gets' was not declared in this scope; did you mean 'getw'? 29 | while (gets(buf)) { | ^~~~ | getw
s727727524
p00084
C++
vinclude <vector> #include <map> #include <set> #include <stack> #include <queue> #include <algorithm> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <string> #include <cstring> #include <complex> #include <ctime> #include <cst...
a.cc:1:1: error: 'vinclude' does not name a type 1 | vinclude <vector> | ^~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/bits/stl_tree.h:63, from /usr/include/c++/14/map:62, from a.cc:2: /usr/include/c++/14/...
s504372035
p00084
C++
#include<iostream> #include<cstdio> #include<algorithm> #include<string> #include<cstring> using namespace std; int main(){ string str; getline(cin,str); str += " "; string word[1024]; int j = 0; for(int i = 0; i < str.size(); i++){ if(str[i] == '.' || str[i] == ',' || str[i] == ' ')j++; ...
a.cc:27:10: warning: missing terminating ' character 27 | Win today's preliminary contest and be qualified to visit University of Aizu. | ^ a.cc:27:10: error: missing terminating ' character 27 | Win today's preliminary contest and be qualified to visit University of Aizu. | ^~~~~~~~...
s198943699
p00084
C++
#include <iostream> #include <string> using namespace std; int main(){ string in, out; bool flg = false; getline(cin, in); replace(in.begin(), in.end(), ',', ' '); replace(in.begin(), in.end(), '.', ' '); cout<<in.size()<<endl; cout<<in<<endl; for(int i=0; i<in.size(); i++){ if(in[i] == ' ' || in[i] == ...
a.cc: In function 'int main()': a.cc:11:9: error: 'replace' was not declared in this scope 11 | replace(in.begin(), in.end(), ',', ' '); | ^~~~~~~
s914297859
p00084
C++
#include <iostream> #include <sstring> #include <string> using namespace std; int main(){ string in, out; bool flg = false; getline(cin, in); replace(in.begin(), in.end(), ',', ' '); replace(in.begin(), in.end(), '.', ' '); cout<<in.size()<<endl; cout<<in<<endl; for(int i=0; i<in.size(); i++){ if(in[i] ...
a.cc:2:10: fatal error: sstring: No such file or directory 2 | #include <sstring> | ^~~~~~~~~ compilation terminated.
s840382590
p00084
C++
import java.io.*; public class aoj0084 { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tmp = br.readLine(); int cnt = 0; String[] ans = new String[1024]; char[] s = tmp.toCharArray(); ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: expected unqualified-id before 'public' 2 | public class aoj0084 { | ^~~~~~
s305095060
p00084
C++
import java.io.*; public class Main { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String tmp = br.readLine(); int cnt = 0; String[] ans = new String[1024]; char[] s = tmp.toCharArray(); ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: expected unqualified-id before 'public' 2 | public class Main { | ^~~~~~
s441141057
p00084
C++
#include<iostream> int main(){ char s[1024+1]; std::cin >> s; char k[6+1]; int l=0; while(){ if(*s == '.' || *s == ',' || *s == ' ' || *s == '\0'){ if(l>=3 && l<=6){ k[l] = '\0'; std::cout << k << " "; } l=0; if(*s=='\0') break; } k[l] = *s; ++l; } }
a.cc: In function 'int main()': a.cc:8:15: error: expected primary-expression before ')' token 8 | while(){ | ^
s136816717
p00084
C++
#include<iostream> int main(){ char s[1024+1]; char k[6+1]; int l=0; std::cin >> s; while(1){ if(*s == '.' || *s == ',' || *s == ' ' || *s == '\0'){ if(l>=3 && l<=6){ k[l] = '\0'; std::cout << k << " "; } l=0; if(*s=='\0') break; } k[l] = *s; ++l; ++s; } }
a.cc: In function 'int main()': a.cc:22:19: error: lvalue required as increment operand 22 | ++s; | ^
s404252406
p00084
C++
/* 0084:Search Engine */ #include <iostream> #include <conio> #include <string> using namespace std; bool IsBreakChar(char c); int main(void) { string str; bool IsFirst = true; getline(cin, str); int strln = (int)str.length(); string word; for(int i = 0; i < strln; i++) { /*str[i]の文字列は区切り文字か?*/ if( Is...
a.cc:5:17: fatal error: conio: No such file or directory 5 | #include <conio> | ^~~~~~~ compilation terminated.
s563497946
p00084
C++
#include <iostream> #include <string> using namespace std; int main(){ string s; getline(cin,s); char *q,*p,*c=new char[sizeof(s)+1]; int f=0,n; strncpy_s(c,s.size()+1,s.c_str(),s.size()+1); p=strtok_s(c," .,",&q); while(p!=NULL){ n=string(p).size(); if(3<=n&&n<=6){ cout<<((f==1)?" ":"\0")<<p; f=1; }...
a.cc: In function 'int main()': a.cc:9:9: error: 'strncpy_s' was not declared in this scope 9 | strncpy_s(c,s.size()+1,s.c_str(),s.size()+1); | ^~~~~~~~~ a.cc:10:11: error: 'strtok_s' was not declared in this scope; did you mean 'strtol_l'? 10 | p=strtok_s(c," .,",&q); | ...
s063611227
p00084
C++
#include <iostream> #include <string> using namespace std; int main(){ string s; getline(cin,s); char *q,*p,*c=new char[sizeof(s)+1]; int f=0,n; strncpy(c,s.c_str(),s.size()+1); p=strtok(c," .,"); while(p!=NULL){ n=string(p).size(); if(3<=n&&n<=6){ cout<<((f==1)?" ":"\0")<<p; f=1; } p=strtok(NULL,"...
a.cc: In function 'int main()': a.cc:9:9: error: 'strncpy' was not declared in this scope 9 | strncpy(c,s.c_str(),s.size()+1); | ^~~~~~~ a.cc:2:1: note: 'strncpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#incl...
s799942052
p00084
C++
#include <iostream> #include <string> using namespace std; int main(){ string s; int i; getline(cin, s); for(i=0;i<s.size();i++) if(s[i]==','||s[i]=='.')s[i]=' '; stringstream ss; ss<<s; int f=0,n; while(ss>>s){ n=s.size(); if(n>=3&&n<=6){ cout<<((f==1)?" ":"")<<s; f=1; } } cout<<endl; }
a.cc: In function 'int main()': a.cc:10:22: error: aggregate 'std::stringstream ss' has incomplete type and cannot be defined 10 | stringstream ss; | ^~
s195205555
p00085
C
#include<stdio.h> int a[1010],m,n,i,b,c; int main(){ scanf("%d%d",&n,&m); while(n!=0 && m!=0){ for(i=1;i<=n;i++)a[i]=1; b=i=n; while(a>1){ c=0; while(c<m){ i++;if(i>n)i=1; c+=b[i]; } a[i]=0;b--; } ...
main.c: In function 'main': main.c:10:16: warning: comparison between pointer and integer 10 | while(a>1){ | ^ main.c:14:21: error: subscripted value is neither array nor pointer nor vector 14 | c+=b[i]; | ^
s363860520
p00085
C
#include<stdio.h> int main(void) { int n,m,i,j,count; int num[1001]; while(scanf("%d%d",&n,&m),n+m){ count=0; for(i=0;i<1001;i++){ num[i]=0; } for(i=0;i<n+1;i++){ num[i]=i; } for(i=m;n-count>m;i+=m-1){ if(i>=n-coun...
main.c: In function 'main': main.c:46:1: error: expected declaration or statement at end of input 46 | } | ^
s013505253
p00085
C
void potato(int n,int m){ int i; int x[n]; //x[0]をn人目とする //x[i]:iの右隣の数字を格納 for(i=0;i<n;i++){ if(i==n-1)x[i]=0; else x[i]=i+1; } int prev,now=0; int count=0; while(count<=m*(n-1)){ prev=now; now=x[now]; count++; if(count%m==0)x[...
main.c: In function 'potato': main.c:20:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 20 | printf("%d\n",now); | ^~~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf' +++ |+#include <stdio.h> 1 | main.c:20:5: warning: incompatib...
s998897177
p00085
C
#include <iostream> int main(int argc,char* argv[]){ bool peeple[1001]; while(true){ int pop,space; std::cin >> pop >> space; if(pop == 0 && space == 0){break;} for(int i = 1; i <= pop; i++){ peeple[i] = false; } int cur_pop = pop; int cur_num = 1; while(cur_pop != 1){ ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s326766100
p00085
C
#include <stdio.h> #define MAX 1000 int main(void){ int n,m,num[MAX],i,cnt,j; while(1){ cnt = 0; for(i = 0; i < MAX ; i++) num[i] = 0; scanf("%d %d", &n ,&m); if(n == 0 && m == 0) break; for(i = 0 ; i < n ; i++) num[i] = i+1; j = 1; while(1){ if(cnt == n - 1) break;...
main.c: In function 'main': main.c:24:23: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration] 24 | if(num[i] != 0) print("%d\n" ,num[i]); | ^~~~~ | printf
s792417420
p00085
C++
import std.stdio,std.string,std.conv; int main() { string s; int a[1001]; while((s = readln.chomp).length != 0) { string[] _s = s.split(" "); int n = _s[0].to!int; int m = _s[1].to!int; if(n == 0 && m == 0) { break; } foreach(i;0..n) { a[i] = 1; } int count = 0; int delete_count = 0;...
a.cc:18:27: error: too many decimal points in number 18 | foreach(i;0..n) | ^~~~ a.cc:51:27: error: too many decimal points in number 51 | foreach(i;0..n) | ^~~~ a.cc:1:1: error: 'import' does not name a type 1 | i...
s276597095
p00085
C++
#include<stdio.h> int main() { bool num[1001]={}; int N,M; int ii=0; int cou=0; while(1){ scanf("%d %d",&N,&M); if(N==0&&M==)break; for(int i=0;i<1000;i++) num[i]=true; do{ if(num[ii]==true){cou++;num[ii]=false;} ii=(ii+1)%M; }while(cou<N-1) for(int i=0;i<N;i++){int t=i+1; if(num[i]==true;)printf("%d\n",t); ii=0...
a.cc: In function 'int main()': a.cc:12:13: error: expected primary-expression before ')' token 12 | if(N==0&&M==)break; | ^ a.cc:22:16: error: expected ';' before 'for' 22 | }while(cou<N-1) | ^ | ; 23 | 24 | for(int i=0;i<N;i++){int t=i+1; ...
s127210566
p00085
C++
#include <string.h> #include <iostream> #include<time.h> using namespace std; int main() { const int MAX_DATAS = 1000; int N[MAX_DATAS], M[MAX_DATAS], CHECK[1099], ANS[MAX_DATAS], C1 = 0, C = 1, D = 1, E = 0; while (true) { memset(CHECK, -1, sizeof(CHECK)); // -1 C = 1; D = 1; E = 0; cin >> N[C1] >> M[...
a.cc: In function 'int main()': a.cc:21:62: error: expected ';' before ':' token 21 | if (M[C1] == 1) { ANS[C1] = N[C1]; goto Exit2:; } | ^ | ; a.cc:21:62: error: expe...
s876089542
p00085
C++
import java.util.*; class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()){ int leng = sc.nextInt();boolean[] p = new boolean[leng]; int t = sc.nextInt(), pleng = p.length; if(pleng==0 & t==0) break; Arrays.fill(p, true); int tcount = pleng, co...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:15: error: expected ':' before 'static' 3 | public static void main(String[] args) { | ^~~~~~~ | : a.cc:3...
s076700367
p00085
C++
#include<iostream> #include<vector> using namespace std; int main(){ int n,k,m,i; for(;cin>>n>>k,n;;){ vector<int>vec(n); for(i=0;i<n;i++)vec[i]=i+1; i=(m-1)%vec.size(); vec.erase(vec.begin()+i); for(;vec.size()>1;vec.erase(vec.begin()+i))if(i+=(k-1)%vec.size(),i>=vec.size())i-=vec.size(); cout<<vec[0]<<e...
a.cc: In function 'int main()': a.cc:6:26: error: expected primary-expression before ';' token 6 | for(;cin>>n>>k,n;;){ | ^ a.cc:6:26: error: expected ')' before ';' token 6 | for(;cin>>n>>k,n;;){ | ~ ^ | ...
s618962022
p00085
C++
#include<iostream> using namespace std; int potato(int x, int y) { for(int i=y-2; i<(y-2)*x; i=(i*y)/(y-1)+1) return(x*y-i); } int main() { while(cin>>x>>y, x || y) { cout<<potato(x,y)<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:13: error: 'x' was not declared in this scope 11 | while(cin>>x>>y, x || y) | ^ a.cc:11:16: error: 'y' was not declared in this scope 11 | while(cin>>x>>y, x || y) | ^ a.cc: In function 'int potato(int, int)': a.cc:8:2: warning: cont...
s595585953
p00085
C++
#include <iostream> using namespace std; int pt(int n, int m){ for(int i = m-1 ; i < (m-1)*n ; i = (m*i) / (m-1)+1); return (m*n-i); } int main(){ int n,m; while( cin >> n >> m , n || m ) cout << pt(n,m) << endl; return 0; }
a.cc: In function 'int pt(int, int)': a.cc:6:15: error: 'i' was not declared in this scope 6 | return (m*n-i); | ^
s088413899
p00085
C++
#include <iostream> using namespace std; int pt(int n, int m){ int i; for(i = m-1 ; i < (m-1)*n ; i = (m*i) / (m-1)+1); return (m*n-i); } int main(){ int n,m; while( cin >> n >> k , n || k ) cout << pt(n,m) << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:22: error: 'k' was not declared in this scope 13 | while( cin >> n >> k , n || k ) cout << pt(n,m) << endl; | ^
s529183205
p00085
C++
#include <stdio.h> #include<math.h> #include <string.h> #include <ctype.h> int main(){ int a[1001],i,n,m,f,t; while(1){ scanf("%d %d",&n,&m); if(n==0&&m==0)break; for(i=1;i<=n;i++)a[i]=i; i=1; f=0; t=0; while(1){ if(t==n-1)break; if(a[i]!=0)f++; if(f==m){ a[i]=0; t++; f=0; } i++; if(i==n+1)i=1; } for(i=1;i<=n;i++){ i...
a.cc: In function 'int main()': a.cc:33:2: error: expected '}' at end of input 33 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s006411122
p00085
C++
while 1: n,m=map(int,raw_input().split()) if n==0&m==0:break G=range(1,n+1) while n>1: if m%n==0:G=G[:n-1] else:G=G[m%n:]+G[:(m-1)%n] n-=1 print G[0]
a.cc:1:1: error: expected unqualified-id before 'while' 1 | while 1: | ^~~~~
s295732527
p00086
Java
public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { int[] map = new int[101]; while (true) { int n = scanner.nextInt(); int s = scanner.nextInt(); if (n == 0 && s == 0) { break; } map[n]++; map[s]...
Main.java:5: error: cannot find symbol Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:5: error: cannot find symbol Scanner scanner = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s986473430
p00086
Java
import java.io.*; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.NoSuchElementException; import java.util.Scanner; public class Main { public static void main...
Main.java:37: error: ')' or ',' expected out.println(((list[1] % 2 == 1 && list[2] % 2 == 1 && o == 2)?"OK":"NG"); ^ 1 error
s531167011
p00086
Java
import java.util.*; public class Mai { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()) { boolean f[] = new boolean[105]; int c = 0; for(;;) { int a = sc.nextInt(), b = sc.nextInt(); if( (a|b) == 0 ) break; f[a] = !f[a]; f[b] = !f[b]; c += f[a]?...
Main.java:2: error: class Mai is public, should be declared in a file named Mai.java public class Mai { ^ 1 error
s944438171
p00086
Java
import java.util.Arrays; import java.util.Scanner; public class Maim { Scanner sc; boolean solve(int[] edges){ for(int i=2;i<100;++i){ if(edges[i]%2!=0){ return false; } } if((edges[0]+edges[1])%2!=0)return false; else{ return true; } } int ni(){ return sc.nextInt(); } void io(){...
Main.java:5: error: class Maim is public, should be declared in a file named Maim.java public class Maim { ^ 1 error
s185846124
p00086
Java
public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int array[]=new int[50]; int count=0,a,b; while(true){ for(int i=0;i<50;i++){ array[i]=0; } while(true){ a=scan.nextInt(); b=scan.nextInt(); array[a]++; array[b]++; if(a==0){ ...
Main.java:3: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main Main.java:3: error: cannot find symbol Scanner scan = new Scanner(System.in); ^ symbol: class Scanner location: class Main 2 errors
s989356376
p00086
C++
#include<iostream> using namespace std; int cnt[200]; main() { int a,b; while(cin>>a>>b) { for(int i=1;i<=100;i++)cnt[i]=0; cnt[a]++,cnt[b]++; while(cin>>a>>b,a)cnt[a]++,cnt[b]++; int c=0;a=b=0; for(int i=1;i<=100;i++) { c+=cnt[i]%2; if...
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() | ^~~~ a.cc: In function 'int main()': a.cc:23:2: error: expected '}' at end of input 23 | } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s402890915
p00086
C++
#include <iostream> #include <algorithm> using namespace std; int path[101]; int main(void) { int a, b; while (cin >> a >> b) { if(a == 0 && b == 0) { bool ans = all_of(path + 3, path + 100, [=](int n){return n % 2 == 0;}); cout << (ans ? "OK" : "NG") << endl; memset(path, 0, sizeof(path)); } path...
a.cc: In function 'int main()': a.cc:16:25: error: 'memset' was not declared in this scope 16 | memset(path, 0, sizeof(path)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #inc...
s995111667
p00086
C++
#include <iostream> #include <algorithm> using namespace std; int path[101]; int main(void) { int a, b; while (cin >> a >> b) { if(a == 0 && b == 0) { bool ans = all_of(path + 3, path + 100, [=](int n){return n % 2 == 0;}); cout << (ans ? "OK" : "NG") << endl; memset(path, 0, sizeof(path)); } path...
a.cc: In function 'int main()': a.cc:16:25: error: 'memset' was not declared in this scope 16 | memset(path, 0, sizeof(path)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #inc...
s305923890
p00086
C++
#include <iostream> #include <cstdio> using namespace std; int list[100]; int main(void){ int a, b, odd = 0; while(scanf("%d %d", &a, &b) != EOF){ if(a || b){ list[a-1]++; list[b-1]++; }else{ for(int i = 0; i < 100; i++){ if(list[i] % 2 != 0) odd++; } if(odd == 2){ printf("OK\n"); memset...
a.cc: In function 'int main()': a.cc:18:33: error: 'memset' was not declared in this scope 18 | memset(list, 0, 100); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2...
s873392237
p00086
C++
#include <cstring> #include <cstdio> #include <cstring> using namespace std; int list[100]; int main(void){ int a, b; bool flag = false; while(scanf("%d %d", &a, &b)){ memset(list, 0, 100); list[a-1]++; list[b-1]++; while(true){ cin >> a >> b; if(!a && !b) break; list[a-1]++; list[b-1]++; } ...
a.cc: In function 'int main()': a.cc:16:25: error: 'cin' was not declared in this scope 16 | cin >> a >> b; | ^~~ a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 3 | #include <cstring> +...
s867136218
p00086
C++
#include<iostream> using namespace std; int main() { while(cin>>a>>b) { int hen[51]={}; hen[a]++; hen[b]++; if(a==0){ if(hen[1]%2==1&&hen[2]%2==1&& for(int i=3;i<51;i++)hen[i]%2==0)) cout<<"OK"<<endl; else co...
a.cc: In function 'int main()': a.cc:6:16: error: 'a' was not declared in this scope 6 | while(cin>>a>>b) | ^ a.cc:6:19: error: 'b' was not declared in this scope 6 | while(cin>>a>>b) | ^ a.cc:13:16: error: expected primary-expression before 'for' 13 | ...
s239384288
p00086
C++
#include<iostream> using namespace std; int main() { while(cin>>a>>b) { int hen[101]={}; hen[a]++; hen[b]++; if(a==0){ if(hen[1]%2==1&&hen[2]%2==1) { for(int i=3;i<101;i++){ if(i<=100&&hen[i]%2==1) ...
a.cc: In function 'int main()': a.cc:6:16: error: 'a' was not declared in this scope 6 | while(cin>>a>>b) | ^ a.cc:6:19: error: 'b' was not declared in this scope 6 | while(cin>>a>>b) | ^ a.cc:27:2: error: expected '}' at end of input 27 | } | ^ a.c...
s497503420
p00086
C++
#include<iostream> using namespace std; int main() { while(cin>>a>>b) { int hen[101]={}; hen[a-1]++; hen[b-1++; if(a==0){ if(hen[0]%2==1&&hen[1]%2==1) { for(int i=2;i<101;i++){ if(i<100&&hen[i]%2==1) ...
a.cc: In function 'int main()': a.cc:7:16: error: 'a' was not declared in this scope 7 | while(cin>>a>>b) | ^ a.cc:7:19: error: 'b' was not declared in this scope 7 | while(cin>>a>>b) | ^ a.cc:11:15: error: lvalue required as increment operand 11 | ...
s697431646
p00086
C++
#include<iostream> using namespace std; int main() { int a,b; int hen[101]={}; while(cin>>a>>b) { hen[a-1]++; hen[b-1]++; if(a==0){ if(hen[0]%2==1&&hen[1]%2==1) { for(int i=2;i<101;i++){ if(i<100&&hen[i]%2==1) ...
a.cc: In function 'int main()': a.cc:30:2: error: expected '}' at end of input 30 | } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^
s032204503
p00086
C++
#include<iostream> using namespace std; int main() { int a,b; int hen[100]={}; while(cin>>a>>b) { hen[a-1]++; hen[b-1]++; if(a==0){ if(hen[0]%2==1&&hen[1]%2==1){ for(int i=2;i<101;i++){ if(i<100&&hen[i]%2==1){ ...
a.cc: In function 'int main()': a.cc:22:17: error: expected '}' before 'else' 22 | else | ^~~~ a.cc:13:41: note: to match this '{' 13 | if(hen[0]%2==1&&hen[1]%2==1){ | ^ a.cc: At global scope: a.cc:31:5: error: expecte...
s637689341
p00086
C++
#include<iostream> using namespace std; int main() { int a,b; int hen[100]={}; while(cin>>a>>b) { hen[a-1]++; hen[b-1]++; if(a==0){ if(hen[0]%2==1&&hen[1]%2==1){ for(int i=2;i<101;i++){ if(i<100&&hen[i]%2==1){ ...
a.cc:32:5: error: expected unqualified-id before 'return' 32 | return 0; | ^~~~~~ a.cc:33:1: error: expected declaration before '}' token 33 | } | ^
s052323603
p00086
C++
#include<iostream> using namespace std; int main() { int a,b; int hen[100]={0}; while(cin>>a>>b) { hen[a-1]++; hen[b-1]++; if(a==0){ if(hen[0]%2==1&&hen[1]%2==1){ for(int i=2;i<101;i++){ if(i<100&&hen[i]%2==1){ ...
a.cc:31:5: error: expected unqualified-id before 'return' 31 | return 0; | ^~~~~~ a.cc:32:1: error: expected declaration before '}' token 32 | } | ^
s141125480
p00086
C++
namespace std; int a, b, c; int s[51][101]={}; int main() { c=0; while(cin >> a >> b) { if(a!=0) { s[c][a]++; s[c][b]++; } else { s[c][1]++; s[c][2]++; int t=0; for(int i=1; i<=100; i++) { if(s[c][i]%2!=0) { t++; break; } } if(t==0) { cout << "OK" <...
a.cc:1:14: error: expected '{' before ';' token 1 | namespace std; | ^ a.cc: In function 'int main()': a.cc:8:15: error: 'cin' was not declared in this scope 8 | while(cin >> a >> b) | ^~~ a.cc:30:33: error: 'cout' was not declared in this scope 30 | ...
s418646993
p00086
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int judge(vector<int> &a) { for (int i = 2; i < a.size(); ++i) { if (a[i] % 2 == 1) { return 1; break; } } return 0; } void output(const char str[]) { cout << str << endl; } int main() { int aa, bb,size=0; vector<int> a; while...
In file included 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 /usr/include/c++/14/ostream:40, from /usr/includ...
s957792859
p00086
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int judge(vector<int> &a,int k) { for (int i = 2; i < k; ++i) { if (a[i] % 2 == 1) { return 1; break; } } return 0; } void output(const char str[]) { cout << str << endl; } int main() { int aa, bb,size=0; vector<int> a; while ...
In file included 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 /usr/include/c++/14/ostream:40, from /usr/includ...
s927443471
p00086
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int judge(vector<int> a,int k) { for (int i = 2; i < k; ++i) { if (a[i] % 2 == 1) { return 1; break; } } return 0; } void output(const char str[]) { cout << str << endl; } int main() { int aa, bb,size=0; vector<int> a; while (...
In file included 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 /usr/include/c++/14/ostream:40, from /usr/includ...
s869445071
p00086
C++
#include <iostream> using namespace std; int main(){ int a, b, v[101], p; while(cin >> a && cin >> b){ v[a]++; v[b]++; if(a == 0);{ for (int i = 3; i <= 100; i++){ if (v[i]%2 == 1){ p = 1; } } if (p == 1) cout << "NG" << endl; else cout << "OK" << endl; v[] = {}; p = 0;...
a.cc: In function 'int main()': a.cc:19:27: error: expected primary-expression before ']' token 19 | v[] = {}; | ^
s809931489
p00086
C++
#include<cstdio> #include<string> #include<algorithm> using namespace std; int n, m, s, t = 0; int d[110][110], used[110]; /*v????????¨??°???t????¨?????????????????????°*/ bool solve(int v,int count) { if (used[v] == 0) { used[v] == 1; count++; } if (d[v][2] > 0 && count == t - 1)return true; for (int u = 3; u <...
a.cc: In function 'int main()': a.cc:32:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 32 | while (scanf_s("%d %d", &n, &m)) { | ^~~~~~~ | scanf
s640852524
p00086
C++
#include<cstdio> #include<string> #include<algorithm> using namespace std; int n, m, s, t = 0; int d[110][110], used[110]; /*v????????¨??°???t????¨?????????????????????°*/ bool solve(int v,int count) { if (used[v] == 0) { used[v] == 1; count++; } printf("%d", v); if (d[2][v] > 0 || d[v][2] > 0 && count == t - 1)...
a.cc: In function 'int main()': a.cc:33:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 33 | while (scanf_s("%d %d", &n, &m)) { | ^~~~~~~ | scanf