submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s133794007
p00103
C++
#include <bits/stdc++.h> using namespace std; #define FOR(i,k,n) for(int i = (k); i < (n); i++) #define REP(i,n) FOR(i,0,n) #define INF 114514810 #define ELEM(array) (sizeof (array)/sizeof *(array)) #define MAX_N 100 typedef long long ll; int n; int count_HIT=0, count_OUT=0; int Point=0; string S; void solve() { ...
a.cc: In function 'void solve()': a.cc:28:41: error: expected primary-expression before ';' token 28 | Point[++; | ^ a.cc:28:41: error: expected ']' before ';' token 28 | Point[++; | ...
s710612822
p00103
C++
#include <cstdio> #include <iostream> #include <string> #define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++) #define rep(x,to) rep2(x,0,to) using namespace std; int main() { int n; int base = 0, out = 0, score = 0; cin >> n; while(1) { char str[10]; if(EOF == scanf("%s", str)) break; ...
a.cc: In function 'int main()': a.cc:17:13: error: 'strcmp' was not declared in this scope 17 | if(!strcmp(str, "OUT")) { | ^~~~~~ a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <iostream> +++ |+#include ...
s743625125
p00103
C++
#include<iostream> #include<string> using namespace std; int main(){ int n,cou=0; string str; cin >> n; while(n>cou){ int cou_out=0,ans=0,ining=0; while(cou_out < 3){ cin >> str; if(str == "HIT"){ ining++; if(ining == 4){ ans++; ining--; } } else if(str == "OUT"){ cou_...
a.cc:31:2: error: stray '#' in program 31 | }#include<iostream> | ^ a.cc:31:3: error: 'include' does not name a type 31 | }#include<iostream> | ^~~~~~~ a.cc:35:5: error: redefinition of 'int main()' 35 | int main(){ | ^~~~ a.cc:5:5: note: 'int main()' previously defined here 5 | in...
s478076293
p00103
C++
#include <iostream> #include <array> class Baseball{ private: int point; int out; int base; //0:no runner 1:runner //home,third,second,first public: Baseball(){ point = 0; out = 0; base = 0; } int point(){ return point; } int out(){ return out; } int hit(){ base = (base * 10) + 1; ...
a.cc:21:9: error: 'int Baseball::point()' conflicts with a previous declaration 21 | } | ^ a.cc:6:13: note: previous declaration 'int Baseball::point' 6 | int point; | ^~~~~ a.cc:25:9: error: 'int Baseball::out()' conflicts with a previous declaration 25 | ...
s759926053
p00103
C++
#include <iostream> class Baseball{ private: int point; int out; int base; //0:no runner 1:runner //home,third,second,first public: Baseball(){ point = 0; out = 0; base = 0; } int point(){ return point; } int out(){ return out; } int hit(){ base = (base * 10) + 1; if(base >= 1000)...
a.cc:20:9: error: 'int Baseball::point()' conflicts with a previous declaration 20 | } | ^ a.cc:5:13: note: previous declaration 'int Baseball::point' 5 | int point; | ^~~~~ a.cc:24:9: error: 'int Baseball::out()' conflicts with a previous declaration 24 | ...
s128886665
p00103
C++
#include <iostream> class Baseball{ private: int point; int out; int base; //0:no runner 1:runner //home,third,second,first public: Baseball(){ point = 0; out = 0; base = 0; } int point(){ return point; } int out(){ return out; } void hit(){ base = (base * 10) + 1; if(base >= 100...
a.cc:21:9: error: 'int Baseball::point()' conflicts with a previous declaration 21 | } | ^ a.cc:6:13: note: previous declaration 'int Baseball::point' 6 | int point; | ^~~~~ a.cc:25:9: error: 'int Baseball::out()' conflicts with a previous declaration 25 | ...
s851497138
p00103
C++
#include <iostream> class Baseball{ private: int point; int out; int base; //0:no runner 1:runner //home,third,second,first public: Baseball(){ point = 0; out = 0; base = 0; } int get_point(){ return point; } int get_out(){ return out; } void hit(){ base = (base * 10) + 1; if(bas...
a.cc: In function 'int main()': a.cc:55:34: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 55 | Baseball baseball(); | ^~ a.cc:55:34: note: remove parentheses to default-initialize a variable 55 | Base...
s441713854
p00103
C++
#include <iostream> class Baseball{ private: int point; int out; int base; //0:no runner 1:runner //home,third,second,first public: Baseball(){ point = 0; out = 0; base = 0; } int get_point(){ return point; } int get_out(){ return out; } void hit(){ base = (base * 10) + 1; if(bas...
a.cc: In function 'int main()': a.cc:55:34: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 55 | Baseball baseball(); | ^~ a.cc:55:34: note: remove parentheses to default-initialize a variable 55 | Base...
s690247212
p00103
C++
#include <iostream> #include <string> class Baseball{ private: int point; int out; int base; //0:no runner 1:runner //home,third,second,first public: Baseball(){ point = 0; out = 0; base = 0; } int get_point(){ return point; } int get_out(){ return out; } void hit(){ base = (base * 10...
a.cc: In function 'int main()': a.cc:57:34: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 57 | Baseball baseball(); | ^~ a.cc:57:34: note: remove parentheses to default-initialize a variable 57 | Base...
s262574621
p00103
C++
#include <iostream> #include <string> class Baseball{ private: int point; int out; int base; //0:no runner 1:runner //home,third,second,first public: Baseball(){ point = 0; out = 0; base = 0; } int get_point(){ return point; } int get_out(){ return out; } void hit(){ base = (base * 10...
a.cc: In function 'int main()': a.cc:74:27: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 74 | std::cout >> baseball.get_point() >> std::endl; | ~~~~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~ | | ...
s519754628
p00103
C++
#include <iostream> #include <string> class Baseball{ private: int point; int out; int base; //0:no runner 1:runner //home,third,second,first public: Baseball(int fir_point, int fir_out, int fir_base){ point = fir_point; out = fir_out; base = fir_base; } int get_point(){ return point; } int ...
a.cc: In function 'int main()': a.cc:74:27: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 74 | std::cout >> baseball.get_point() >> std::endl; | ~~~~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~ | | ...
s453390588
p00103
C++
#include <iostream> #include <string> class Baseball{ private: int point; int out; int base; //0:no runner 1:runner //home,third,second,first public: Baseball(int fir_point, int fir_out, int fir_base){ point = fir_point; out = fir_out; base = fir_base; } int get_point(){ return point; } int ...
a.cc: In function 'int main()': a.cc:73:43: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 73 | std::cout >> baseball.get_point() >> std::endl; | ~~~~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~ ...
s958420083
p00103
C++
#include <iostream> #include <string> class Baseball{ private: int point; int out; int base; //0:no runner 1:runner //home,third,second,first public: Baseball(int fir_point, int fir_out, int fir_base){ point = fir_point; out = fir_out; base = fir_base; } int get_point(){ return point; } int ...
a.cc: In function 'int main()': a.cc:74:43: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 74 | std::cout >> P >> std::endl; | ~~~~~~~~~ ^~ ~ | ...
s256943271
p00103
C++
#include <iostream> #include <string> class Baseball{ private: int point; int out; int base; //0:no runner 1:runner //home,third,second,first public: Baseball(int fir_point, int fir_out, int fir_base){ point = fir_point; out = fir_out; base = fir_base; } int get_point(){ return point; } int ...
a.cc: In function 'int main()': a.cc:74:43: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 74 | std::cout >> P >> std::endl; | ~~~~~~~~~ ^~ ~ | ...
s658853912
p00103
C++
#include <iostream> #include <string> class Baseball{ private: int point; int out; int base; //0:no runner 1:runner //home,third,second,first public: Baseball(int fir_point, int fir_out, int fir_base){ point = fir_point; out = fir_out; base = fir_base; } int get_point(){ return point; } int ...
a.cc: In function 'int main()': a.cc:73:51: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 73 | std::cout >> baseball.get_point() >> std::endl; | ~~~~~~~~~ ^~ ~~~~~~~~...
s766035944
p00103
C++
#include <iostream> #include <string> class Baseball{ private: int point; int out; int base; //0:no runner 1:runner //home,third,second,first public: Baseball(int fir_point, int fir_out, int fir_base){ point = fir_point; out = fir_out; base = fir_base; } int get_point(){ return point; } int ...
a.cc: In function 'int main()': a.cc:73:51: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 73 | std::cout >> 7 >> std::endl; | ~~~~~~~~~ ^~ ~ | ...
s178323980
p00103
C++
#include <iostream> #include <string> class Baseball{ private: int point; int out; int base; //0:no runner 1:runner //home,third,second,first public: Baseball(int fir_point, int fir_out, int fir_base){ point = fir_point; out = fir_out; base = fir_base; } int get_point(){ return point; } int ...
a.cc: In function 'int main()': a.cc:77:19: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 77 | std::cout >> baseball.get_point() >> std::endl; | ~~~~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~ | | | ...
s636482099
p00103
C++
#include <iostream> #include <string> class Baseball{ private: int point; int out; int base; //0:no runner 1:runner //home,third,second,first public: Baseball(int fir_point, int fir_out, int fir_base){ point = fir_point; out = fir_out; base = fir_base; } int get_point(){ return point; } int ...
a.cc: In function 'int main()': a.cc:77:27: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [2]') 77 | std::cout >> "1" >> std::endl; | ~~~~~~~~~ ^~ ~~~ | | | | ...
s448838495
p00103
C++
#include <iostream> #include <vector> #include <algorithm> #include <stack> #include <string> #include <map> #include <functional> #include <cmath> #include <cstdio> using namespace std; #define PI 4*atan(1) int main(){ int n; cin >> n; for(int i = 0; i < n; i++){ bool base[3] = {false}; int point = 0, ...
a.cc: In function 'int main()': a.cc:23:10: error: 'strcmp' was not declared in this scope 23 | if(strcmp(s, "HIT") == 0){ | ^~~~~~ a.cc:10:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 9 | #include <cstdio> +++ |+#include <cstr...
s571072219
p00103
C++
#include<iostream> #include<string> using namespace std; int main(){ bool F,S,T //??? int out,point; int i,j; int dataN,dataLoop; string E; //???????????? cin>>dataN; for(dataLoop=0;dataLoop<dataN;dataLoop++){ //???????????? out=0;point=0; while(out==3){ cin>>E; switch(E){ case "HIT": if(T){poi...
a.cc: In function 'int main()': a.cc:7:9: error: expected initializer before 'int' 7 | int out,point; | ^~~ a.cc:17:9: error: 'out' was not declared in this scope 17 | out=0;point=0; | ^~~ a.cc:17:15: error: 'point' was not declared in this scope 17 | out=0;...
s929721725
p00103
C++
#include<iostream> #include<string> using namespace std; int main(){ bool F,S,T; //??? int out,point; int i,j; int dataN,dataLoop; string E; //???????????? cin>>dataN; for(dataLoop=0;dataLoop<dataN;dataLoop++){ //???????????? out=0;point=0; while(out==3){ cin>>E; switch(E){ case "HIT": if(T){po...
a.cc: In function 'int main()': a.cc:20:17: error: switch quantity not an integer 20 | switch(E){ | ^
s019583745
p00103
C++
#include<stdio.h> int main(void) { char str[16]={}; int n; int score=0; int base=0; int out=0; scanf("%d", &n); for(i=0;i<n;i++) { scanf("%s", str); if(str[1]='I') if(base==3) score++,base=0; else base++; else if(str[1]='U') if(out==2) ...
a.cc: In function 'int main()': a.cc:13:7: error: 'i' was not declared in this scope 13 | for(i=0;i<n;i++) | ^
s851860373
p00103
C++
#include <iostream> #include <string> int main(){ int n; int base[3]; int out, score; string event; std::cin >> n; for(int i=0; i<n; i++){ base[0] = 0; base[1] = 0; base[2] = 0; out = 0; score = 0; while(out!=3){ std::cin >> event; if(event=="HIT"){ if(base[2]...
a.cc: In function 'int main()': a.cc:9:3: error: 'string' was not declared in this scope 9 | string event; | ^~~~~~ a.cc:9:3: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostre...
s260958974
p00103
C++
#include <bits/stdc++.h> using namespace std; int main(){ int n,a[4],k=0,l=0; string s; cin>>n; while(k!=n){ cin>>s; if(s=='H'){ if(!a[0])a[0]++; else { if(!a[1])a[1]++; else{ if(!a[2])a[2]++; else a[3]++; } } } else if(s=='O'){ ...
a.cc: In function 'int main()': a.cc:9:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 9 | if(s=='H'){ | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} In f...
s831988458
p00103
C++
#include <iostream> using namespace std; int main(){ int n; cin>>n; while(n){ int o=0,a=0,b=0; while(o!=3){ string s; cin>>s; if(s=="HIT"){ if(b==3){ a++; } else b++; } } else if(s=="OUT")o++; else{ a+=++b; b=0; } } cout<<a<<endl; n--; } }
a.cc: In function 'int main()': a.cc:18:4: error: 'else' without a previous 'if' 18 | else if(s=="OUT")o++; | ^~~~ a.cc:18:12: error: 's' was not declared in this scope 18 | else if(s=="OUT")o++; | ^ a.cc:24:9: error: 'a' was not declared in this scope 24 | cout<<a<<endl; ...
s625094561
p00103
C++
for i in range(int(input())): f, s, t, count, point = 0, 0, 0, 0, 0 while count != 3: data = input() if data == 'HIT': if t == 1: point += 1 t = 0 if s == 1: t = 1 s = 0 if f == 1: ...
a.cc:5:20: warning: multi-character character constant [-Wmultichar] 5 | if data == 'HIT': | ^~~~~ a.cc:15:22: warning: multi-character character constant [-Wmultichar] 15 | elif data == 'OUT': | ^~~~~ a.cc:17:22: warning: multi-character charac...
s828718725
p00103
C++
#include <iostream> #include <string> int main(){ int hit, out, score, data_set_num; std::string event; cin >> data_set_num; while(data_set_num--){ cin >> event; if(event == "HIT"){ ++hit; if(hit == 4){ ++score; hit = 3; ...
a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> data_set_num; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; /...
s916501172
p00103
C++
#include <iostream> #include <string> #include <fstream> int main(){ int hit, out, score, data_set_num; std::string event; std::getline(std::cin,str); sscanf(str.c_str(),"%d ",&data_set_num); while(data_set_num--){ std::cin >> event; if(event == "HIT"){ ++hit; ...
a.cc: In function 'int main()': a.cc:9:27: error: 'str' was not declared in this scope; did you mean 'std'? 9 | std::getline(std::cin,str); | ^~~ | std
s677816550
p00103
C++
#include <iostream> #include <array> class Baseball{ private: int m_runner = 0; int m_out = 0; int m_point = 0; public: void isHit(){ if(m_runner < 3){ ++m_runner; //if fill all base } else { ++m_point; } } void isHomerun(){ /...
a.cc: In function 'int main()': a.cc:61:9: error: 'resetInning' was not declared in this scope 61 | resetInning(); | ^~~~~~~~~~~
s078001039
p00103
C++
//0103 #include<string.h> #include<stdio.h> int main() { int n,op,f,se,t,r; char s[16]; scanf("%d",&n); for(int i=0;i<n;i++){ r=0; op=0; f=0; se=0; t=0; while(op<3){ scanf("%s",s); if(strcmp("OUT",s)==0){ op++; }else if(strcmp("HIT",s)){ r+=t; t=se; se=f; f++; }else{ ...
a.cc: In function 'int main()': a.cc:27:36: error: incompatible types in assignment of 'int' to 'char [16]' 27 | f=s=t=0; | ~^~~~
s175748199
p00103
C++
#include <string> using namespace std; int base[3]; int point = 0; int out = 0; int n; //イニング終わり void reset_base() { for (int i = 0; i < 3; ++i) { base[i] = 0; } } //シングルヒット void Single_hit() { point += base[2]; base[2] = base[1]; base[1] = base[0]; base[0] = 1; } //ホームラン void HomeRun() { for (int i = 0; i...
a.cc: In function 'void Out()': a.cc:38:17: error: 'cout' was not declared in this scope 38 | cout << point << endl; | ^~~~ a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <string> +++ |+#...
s406675330
p00103
C++
#include<cstdio> int main() { bool a = false, b = false, c = false; int score = 0; char event[10]; int d; scanf_s("%d", &d, 10); for (int i = 0; i<d; i++) { score = 0; a = b = c = false; int out = 0; while (1) { scanf_s("%s", &event, 10); if (event[1] == 'I') { if (c)score++; c = b; b =...
a.cc: In function 'int main()': a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 8 | scanf_s("%d", &d, 10); | ^~~~~~~ | scanf
s277763430
p00103
C++
#include <iostream> #include <queue> #include <string> class Baseball { public: int score; //得点 int count; //アウトカウント std::queue<int> runner; //ランナー //コンストラクタ Baseball(int sc,int co){ score = sc; count = co; while(!runner.empty()){ ...
a.cc:54:18: warning: multi-character character constant [-Wmultichar] 54 | case 'HIT': | ^~~~~ a.cc:57:18: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes 57 | case 'HOMERUN': | ^~~~~~~~~ a.cc:60:18: warning: mu...
s277413083
p00103
C++
#include <iostream> #include <queue> #include <string> class Baseball { public: int score; //得点 int count; //アウトカウント std::queue<int> runner; //ランナー //コンストラクタ Baseball(int sc,int co){ score = sc; count = co; while(!runner.empty()){ ...
a.cc:66:1: error: expected declaration before '}' token 66 | } | ^
s052687100
p00103
C++
#include <iostream> #include <string> int base; int hit(){ if(base==3) return 1; else base++; return 0; } int homerun(){ base++; return base; } int main(){ int inning; std::cin << inning; for(int i=0;i<inning;i++){ int outCount=0; int point=0; string result; base=0; while(outCount<3){ std::cin...
a.cc: In function 'int main()': a.cc:19:18: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 19 | std::cin << inning; | ~~~~~~~~ ^~ ~~~~~~ | | | | | int | std::istrea...
s338560685
p00103
C++
#include <iostream> #include <string> int base; int hit(){ if(base==3) return 1; else base++; return 0; } int homerun(){ base++; return base; } int main(){ int inning; std::cin << inning; for(int i=0;i<inning;i++){ int outCount=0; int point=0; string result; base=0; while(outCount<3){ std::cin...
a.cc: In function 'int main()': a.cc:19:18: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 19 | std::cin << inning; | ~~~~~~~~ ^~ ~~~~~~ | | | | | int | std::istrea...
s945619288
p00103
C++
#include <iostream> #include <string> int base; int hit(){ if(base==3) return 1; else base++; return 0; } int homerun(){ base++; return base; } int main(){ int inning; std::cin >> inning; for(int i=0;i<inning;i++){ int outCount=0; int point=0; string result; base=0; while(outCount<3){ std::cin...
a.cc: In function 'int main()': a.cc:24:17: error: 'string' was not declared in this scope 24 | string result; | ^~~~~~ a.cc:24:17: note: suggested alternatives: In file included from /usr/include/c++/14/iosfwd:41, from /usr/include/c++/14/ios:40, ...
s162955164
p00103
C++
#include <iostream> #include <string> class Baseball{ private: int first; int second; int third; int score; int count; public: Baseball(){ first=0; second=0; third=0; score=0; count=0; } int score(){ return score; } void hit(){ score+=third; third=second; second=first; first=1; } void h...
a.cc:21:9: error: 'int Baseball::score()' conflicts with a previous declaration 21 | } | ^ a.cc:9:13: note: previous declaration 'int Baseball::score' 9 | int score; | ^~~~~ a.cc:39:9: error: 'int Baseball::count()' conflicts with a previous declaration 39 | ...
s419661178
p00103
C++
#include <iostream> #include <string> class Baseball{ private: int first; int second; int third; int score; int count; public: Baseball(){ first=0; second=0; third=0; score=0; count=0; } int getScore(){ return score; } void hit(){ score+=third; third=second; second=first; first=1; } voi...
a.cc:40:2: error: expected ';' after class definition 40 | } | ^ | ;
s438938194
p00103
C++
#include<stdio.h> #include<string.h> int main(void) { int base=0,out=0,score=0,e,i,j; char str[10]; scanf("%d",&e); if(e==0)break; for(i=0;i<e;){ scanf("%s",&str); if(!strcmp(str,"HIT"))base++; else if(!strcmp(str,"OUT")){ out++; } else if(!strcmp(str,"HOMERUN")){ score=score+base+1; base...
a.cc: In function 'int main()': a.cc:9:17: error: break statement not within loop or switch 9 | if(e==0)break; | ^~~~~
s755218462
p00103
C++
#include<iostream> #include<vector> using namespace std; int main(){ int n; string ins; cin>>n; for(int ix=0;ix<n;ix++){ int out=0,po=0; vector<bool> runner(3,false); for(;;){ cin>>ins; if(ins=="HIT"){ if(runner[2]){ po+...
a.cc: In function 'int main()': a.cc:35:19: error: 'enld' was not declared in this scope 35 | cout<<po<<enld; | ^~~~
s998402062
p00103
C++
#include <iostream> #include <string> using namespace std; void solve() { int n; cin >> n; while(n--) { int point = 0; int outcount = 0; bool runner[3]; memset(runner, 0, sizeof(bool) * 3); while(true) { string str; cin >> str; if(str == "HIT") { if(runner[2]) { point++; }...
a.cc: In function 'void solve()': a.cc:15:17: error: 'memset' was not declared in this scope 15 | memset(runner, 0, sizeof(bool) * 3); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <io...
s628896429
p00103
C++
#include<stdio.h> main(){ int c,y,t,o,p; char a[9]; scanf("%d",&c); for(y=0;;y++){ t=o=p=0; while(~scanf("%s",&a)||exit(1)){ if(a[0]=='H')t++; else o++; if(a[1]=='O'){p+=t;t=0;} if(t>3){p++;t--;} if(o>2)break; } printf("%d\n",p); } }
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:9:40: error: 'exit' was not declared in this scope 9 | while(~scanf("%s",&a)||exit(1)){ | ^~~~ a.cc:2:1...
s574357371
p00103
C++
b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+((b>3)?b-3:0))):!(s+=++b))a%3-2||(o=(o+1)%3);}
a.cc:1:1: error: 'b' does not name a type 1 | b,s,o;main(a){for(scanf("%*d");~scanf("%s",&a);b=a%3?(a%3-2)?b+1:o?b:(s=!printf("%d\n",s+((b>3)?b-3:0))):!(s+=++b))a%3-2||(o=(o+1)%3);} | ^ a.cc:1:11: error: expected constructor, destructor, or type conversion before '(' token 1 | b,s,o;main(a){for(scanf("%*d...
s992274822
p00103
C++
#include<stdio.h> int main(){ int c,y,t,o,p; char a[9]; read(0,c,4); for(y=0;;y++){ for(t=o=p=0;;){ if(!~scanf("%s",a))return 0; if(a[0]=='H')t++; else o++; if(a[1]=='O'){p+=t;t=0;} if(t>3){p++;t--;} if(o>2)break; } printf("%d\n",p); } }
a.cc: In function 'int main()': a.cc:6:9: error: 'read' was not declared in this scope; did you mean 'fread'? 6 | read(0,c,4); | ^~~~ | fread
s697413433
p00103
C++
main(){ int c,y,t,o,p; char a[9]; scanf("%d",&c); for(y=0;y<c;y++){ for(t=o=p=0;;){ if(!~scanf("%s",a))return 0; if(a[0]=='H')t++; else o++; if(a[1]=='O'){p+=t;t=0;} if(t>3){p++;t--;} if(o>2)break; } printf("%d\n",p); }c=1; }
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:4:9: error: 'scanf' was not declared in this scope 4 | scanf("%d",&c); | ^~~~~ a.cc:14:17: error: 'printf' was not declared in this scope 1...
s188085419
p00103
C++
main(){ int c,y,t,o,p; char a[9]; scanf("%d",&c); for(y=0;y<c;y++){ for(t=o=p=0;;){ scanf("%s",a); if(a[0]=='H')t++; else o++; if(a[1]=='O'){p+=t;t=0;} if(t>3){p++;t--;} if(o>2)break; } printf("%d\n",p); }c=1; }
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:4:9: error: 'scanf' was not declared in this scope 4 | scanf("%d",&c); | ^~~~~ a.cc:14:17: error: 'printf' was not declared in this scope 1...
s113046466
p00103
C++
main(){ int c,y,t,o,p; char a[9]; scanf("%d",&c); for(y=0;y<c;y++){ for(t=o=p=0;;){ scanf("%s",a); if(a[0]=='H')t++; else o++; if(a[1]=='O'){p+=t;t=0;} if(t>3){p++;t--;} if(o>2)break; } printf("%d\n",p); }c=1; }
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 1 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:4:9: error: 'scanf' was not declared in this scope 4 | scanf("%d",&c); | ^~~~~ a.cc:14:17: error: 'printf' was not declared in this scope 1...
s354065478
p00103
C++
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);) { if(a%3){ if(a&1,++o){ if(o%3){ b=!printf("%d\n",s+b>3?b-3:0),s=0; } } ...
a.cc:1:1: error: 'b' does not name a type 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);) | ^ a.cc:1:11: error: expected constructor, destructor, or type conversion before '(' token 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);) | ^
s022314537
p00103
C++
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,b=0);}
a.cc:1:1: error: 'b' does not name a type 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)a%3?a&1?++o%3?:(s=!printf("%d\n",b>3?s+b-3:s),b=0):b++:(s+=b+1,b=0);} | ^ a.cc:1:11: error: expected constructor, destructor, or type conversion before '(' token 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)...
s595305428
p00103
C++
b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:(s+=b+1);}
a.cc:1:1: error: 'b' does not name a type 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3?a&1?++o%3?b:(s=!printf("%d\n",b>3?s+b-3:s)):b+1:(s+=b+1);} | ^ a.cc:1:11: error: expected constructor, destructor, or type conversion before '(' token 1 | b,o,s;main(a){for(scanf("%d");~scanf("%s",&a);)b=a%3...
s004962492
p00103
C++
#include<stdio.h> int main(void){ int i,j,k,q,p,inning,point,kazu[20]; char eve[10]; point=0; j=0; k=0; q=0; p=0; scanf("%d",&inning); for(k=0;k<inning;k++){ point=0; j=0; q=0; p=0; while(q<3){ for(j=0;j<10;j++){ eve[j]=0; } gets(eve); if(eve[0]=...
a.cc: In function 'int main()': a.cc:29:25: error: 'gets' was not declared in this scope; did you mean 'getw'? 29 | gets(eve); | ^~~~ | getw
s023741313
p00103
C++
&#65279;&#65279;#include <iostream> #include <string> using namespace std; int main(void) { int point; int single_hit; int out; int inning; string event; cin >> inning; for(int i = 0 ; i < inning ; i++) { point = 0; out = 0; single_hit = 0; while(1) { if(out == 3) break...
a.cc:1:2: error: stray '#' in program 1 | &#65279;&#65279;#include <iostream> | ^ a.cc:1:10: error: stray '#' in program 1 | &#65279;&#65279;#include <iostream> | ^ a.cc:1:17: error: stray '#' in program 1 | &#65279;&#65279;#include <iostream> | ^ a.cc:1:3: error:...
s136444811
p00103
C++
#include<iostram> #include<cstdio> #include<algorithm> using namespace std; main(){ int N; scanf("%d",&N); for(int i=;i<N;i++){ int oc=0; int po=0; int co[3]={0}; while(oc<3){ string str; cin >> str; if(str=="OUT") oc++; if(str=="HIT"){ po+=co[2]; co[2]=co[1]; co[1]=co[0]; co[0]++; } if(str=="HOMERUN"){ po+=co[0]+co[1...
a.cc:1:9: fatal error: iostram: No such file or directory 1 | #include<iostram> | ^~~~~~~~~ compilation terminated.
s583648079
p00103
C++
#include<cstdio> #include<algorithm> #include<iostream> #include<cstring> #include<string> using namespace std; int loop; int HIT,OUT,point; string stait; int main(){ scanf("%d",&loop); for(int i=0;i<loop;i++){ int base[4]={0}; point = 0; OUT=0; while(OUT<3){ cin>>stait; cout<<stait[1]; if(sta...
a.cc: In function 'int main()': a.cc:20:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 20 | if(stait[1]=="O"){ a.cc:25:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 25 | if(stait[1]=="U"){OUT++;} a.cc:26:20: error: ISO C++ forbid...
s451472976
p00103
C++
#include <stdio.h> int main(void){ int dataset,ining; int i; int runner[3],point,out; char str[8]; scanf("%d",&dataset); for(ining=0;ining<dataset;ining++){ //init state variable for(i=0;i<3;i++){ runner[i]=0; } point=0; out=0; //start ining while(out<3){ scanf("%s",&str[0]); if(strcmp...
a.cc: In function 'int main()': a.cc:23:28: error: 'strcmp' was not declared in this scope 23 | if(strcmp(str,"HOMERUN")==0){ | ^~~~~~ a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #i...
s265772594
p00103
C++
#include <iostream> #include <string> &#160; using namespace std; &#160; int main() { &#160;&#160;&#160;&#160;int n, o, h, t; &#160;&#160;&#160;&#160;string s; &#160;&#160;&#160;&#160;cin >> n; &#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;while(n--) { &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;o = h = t...
a.cc:3:2: error: stray '#' in program 3 | &#160; | ^ a.cc:5:2: error: stray '#' in program 5 | &#160; | ^ a.cc:8:2: error: stray '#' in program 8 | &#160;&#160;&#160;&#160;int n, o, h, t; | ^ a.cc:8:8: error: stray '#' in program 8 | &#160;&#160;&#160;&#160;int n, o, h, t; | ...
s880057965
p00103
C++
int main(){ int n; string input; int out; cin >> n; for(int i = 0; i < n; i++) { first = second = third = out = point = 0; out = 0; while(out < 3) { cin >> input; if(input == "OUT") { out++; continue; } else if(input == "HIT") { poi...
a.cc: In function 'int main()': a.cc:3:3: error: 'string' was not declared in this scope 3 | string input; | ^~~~~~ a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin >> n; | ^~~ a.cc:8:5: error: 'first' was not declared in this scope 8 | first = second = third = out = poi...
s966205692
p00103
C++
#include <iostream> #include <string> #include <array> int Baseball() { int num_of_runner = 0, num_of_out = 0, point = 0; std::string event; while(num_of_out != 3){ std::cin >> event; switch(event){ case HIT: if(num_of_runner == 3); ++point; ...
a.cc: In function 'int Baseball()': a.cc:11:16: error: switch quantity not an integer 11 | switch(event){ | ^~~~~ a.cc:12:18: error: 'HIT' was not declared in this scope 12 | case HIT: | ^~~ a.cc:15:17: error: 'else' without a previous 'if' 15 | ...
s205143992
p00103
C++
#include <iostream> #include <string> int Baseball() { int num_of_runner = 0, num_of_out = 0, point = 0; std::string event; while(num_of_out != 3){ std::cin >> event; if(event == HIT){ if(num_of_runner == 3) ++point; else ++num_of_runn...
a.cc: In function 'int Baseball()': a.cc:10:21: error: 'HIT' was not declared in this scope 10 | if(event == HIT){ | ^~~ a.cc:16:17: error: 'evenr' was not declared in this scope; did you mean 'event'? 16 | else if(evenr == HOMERUN){ | ^~~~~ | ...
s511351528
p00103
C++
#include <iostream> #include <string> int Baseball() { const u_int num_of_event = 100; int num_of_runner = 0, num_of_out = 0, point = 0; std::string event; for(u_int i = 0; i < num_of_event; ++i){ std::cin >> event; if(event == "HIT"){ if(num_of_runner == 3) ...
a.cc: In function 'int Baseball()': a.cc:31:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 31 | int main() | ^~ a.cc:31:9: note: remove parentheses to default-initialize a variable 31 | int main() | ^~ | -- a.cc:31:9: note: or ...
s981752447
p00103
C++
#include <iostream> #include <string> class Baseball { u_int runner, out, point; public: Baseball(); ~Baseball(){} u_int get_out() const {return out;} u_int get_point() const {return point;} void game(); void event_hit(); void event_homerun(); void event_out();...
a.cc: In member function 'void Baseball::event_hit()': a.cc:53:8: error: 'get_runner' was not declared in this scope; did you mean 'set_runner'? 53 | if(get_runner() == 3){ | ^~~~~~~~~~ | set_runner a.cc: In member function 'void Baseball::event_homerun()': a.cc:63:19: error: 'get_runne...
s623691523
p00103
C++
#include <iostream> #include <queue> #include <string> class Baseball{ private: std::queue<int> runner; int out_count; int score; public: void Baseball::initRunner(){ while(runner.empty() != true){ runner.pop(); } for(...
a.cc:12:14: error: extra qualification 'Baseball::' on member 'initRunner' [-fpermissive] 12 | void Baseball::initRunner(){ | ^~~~~~~~ a.cc:29:14: error: extra qualification 'Baseball::' on member 'hit' [-fpermissive] 29 | void Baseball::hit(){ | ^~~~~~~~ a.cc...
s234682106
p00103
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<cstdio> #include<cmath> #define pb(in,tmp) in.push_back(tmp) #define loop(i,a,b) for(int i=a;i<b;i++) #define rep(i,b) loop(i,0,b) using namespace std; int main(){ int n; cin>>n; rep(i,n){ int out=0; int r1=0,r2=0,r3=0; int tm=0; while(ou...
a.cc: In function 'int main()': a.cc:21:4: error: 'strcmp' was not declared in this scope 21 | if(strcmp(in,"OUT")==0)out++; | ^~~~~~ a.cc:7:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 6 | #include<cmath> +++ |+#include <cstring> 7 | ...
s938354353
p00104
Java
t H,W; Scanner sc = new Scanner(System.in); while(true){ H = sc.nextInt(); W = sc.nextInt(); if(H == 0 || W == 0){ break; } char [][] array = new char[H][W]; sc.nextLine(); for(int i = 0; i < H; i++){ String line = sc.nextLine(); for(int j = 0; j < W; j++){ array[i][j] = line.c...
Main.java:1: error: class, interface, enum, or record expected t H,W; ^ Main.java:2: error: unnamed classes are a preview feature and are disabled by default. Scanner sc = new Scanner(System.in); ^ (use --enable-preview to enable unnamed classes) Main.java:3: error: class, interface, enum, or record expected wh...
s120305090
p00104
Java
process.stdin.resume(); process.stdin.setEncoding('utf8'); process.stdin.on('data', function(chunk) { main(chunk.trim()); }); function main(chunk){ var lines = chunk.split("\n"); for(var n=0;n<lines.length-1;){ var H = Number(lines[n].split(" ")[0]); var W = Number(lines[n].split(" ")[1]); ...
Main.java:1: error: class, interface, enum, or record expected process.stdin.resume(); ^ Main.java:2: error: class, interface, enum, or record expected process.stdin.setEncoding('utf8'); ^ Main.java:2: error: unclosed character literal process.stdin.setEncoding('utf8'); ^ Main.java:2: error: u...
s244346067
p00104
Java
import java.io.PrintWriter; import java.util.Scanner; public class Main { public static void main(String[] args) { new MagicTiles().solve(); } public void solve() { Scanner input = new Scanner(System.in); PrintWriter out = new PrintWriter(System.out); int H, W; char[][] maze = new char[101][101]; whil...
Main.java:6: error: cannot find symbol new MagicTiles().solve(); ^ symbol: class MagicTiles location: class Main 1 error
s904770811
p00104
Java
import java.util.*; public class Main { int w,h; int[][] map; int[][] cost; int ansx, ansy; public void loop(int y, int x, int d){ if(map[y][x]==0){ System.out.println(x + " " + y); return; } cost[y][x] = 1; if(d==1){ if(cost[y-1][x]==1){ System.out.println("LOOP"); return; }els...
Main.java:51: error: cannot find symbol AOJ_0104 A = new AOJ_0104(); ^ symbol: class AOJ_0104 location: class Main Main.java:51: error: cannot find symbol AOJ_0104 A = new AOJ_0104(); ^ symbol: class AOJ_0104 location: class Main 2 errors
s573456200
p00104
C
#include <cstdio> #include <cstring> using namespace std; int main(){ int n,m,k,l,b[105][105]={0}; char a[105][105]; while(1){ scanf("%d %d ",&n,&m); if( n==0 && m==0 ) break; k=0; l=0; for(int i=0 ; i<n ; i++ ){ scanf("%s",&a[i]); } while(1){ if(a[k][l]=='.'){ printf("%d %d\n",l,k); bre...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s719857467
p00104
C
#include <stdio.h> #define RIGHT '>' #define LEFT '<' #define TOP '^' #define UNDER 'v' #define LOOP 'l' #define END '.' #define MAX 101 void dfs(char mp[MAX][MAX],int i,int j){ if(mp[i][j]==END){ printf("%d %d\n" ,j ,i); return; } if(mp[i][j]==LOOP){ printf("LOOP\n"); retu...
main.c: In function 'main': main.c:44:11: error: 'true' undeclared (first use in this function) 44 | while(true){ | ^~~~ main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 1 | #include <stdio.h> +++ |+#include <stdbool.h> ...
s100744925
p00104
C++
#include<iostream> #include<string> using namespace std; int main(){ int h,w; while(cin>>h>>w,w||h){ string a; for(int i=0;i<w;i++){ for(int j=0;j<h;j++){ cin>>a[i][j]; } } bool flag=true; int i=0,j=0; while(flag){ flag=true; if(a[i][j]=='v'){ i++; a[i][j]='!'; } if(a[i][j]==...
a.cc: In function 'int main()': a.cc:10:42: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript 10 | cin>>a[i][j]; | ^ a.cc:17:32: error: invalid types '__gnu_cxx::_...
s039016590
p00104
C++
#include<iosteram> #include<string> using namespace std; int main(void){ int w,h; while(cin>>>h>>w,h){ string f[h]; for(int i=0,i<h;i++){ cin>>f[i]; } int x,y; x=y=0; bool used[h][w]; memset(used,0,sizeof(used)); while(true){ if(used[y][x]){ cout<<"LOOP"<<endl; break; } if(f[y][...
a.cc:1:9: fatal error: iosteram: No such file or directory 1 | #include<iosteram> | ^~~~~~~~~~ compilation terminated.
s081338147
p00104
C++
#include <iostream> #include <sstream> #include <vector> #include <string> #include <set> using namespace std; void calc(vector<vector<char> >, int y, int x); int resultx; int resulty; set<string> passed; int main() { while(true) { int width, height; cin >> width >> height; if(width == 0 && height == 0) break;...
a.cc: In function 'int main()': a.cc:23:10: error: could not convert 'calc(std::vector<std::vector<char> >(field), 0, 0)' from 'void' to 'bool' 23 | if(calc(field, 0, 0)) cout << resulty << " " << resultx << endl; | ~~~~^~~~~~~~~~~~~ | | | void a.cc: At global scope: a.cc:2...
s080414739
p00104
C++
loop do n,m=gets.split.map(&:to_i) break if n==0 px,py,cnt=0,0,0 arr=Array.new() n.times do arr<<gets.chomp.split("") end loop do case arr[py][px] when "<" then px-=1 when ">" then px+=1 when "^" then py-=1 when "v" then py+=1 else break end cnt+=1 break if cnt>n*m...
a.cc:1:1: error: 'loop' does not name a type 1 | loop do | ^~~~
s217453505
p00104
C++
int main(int argc, char **argv) { int h, w; int x = 0, y = 0; char tiles[100][100]; bool throughed[100][100] = {}; bool loop = false; bool end = false; while(std::cin >> h >> w, h+w != 0){ x = 0; y = 0; for(int i = 0; i < 100; i++){ for(int j = 0; j < 100; j++){ throughed[j][i] = false; } } f...
a.cc: In function 'int main(int, char**)': a.cc:9:20: error: 'cin' is not a member of 'std' 9 | while(std::cin >> h >> w, h+w != 0){ | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostrea...
s973803969
p00104
C++
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;i++) char s[101][101]; int n,m,a[100][100],c; using namespace std; void dfs(int y,int x){ if(c)goto Z; if(a[y][x]++)goto L; if(s[y][x]=='.'){cout<<x<<' '<<y<<endl;p++;} else if(s[y][x]=='^')dfs(y-1,x); else if(s[y][x]=='v')dfs(y+1,x); else if(s[y][x]...
a.cc: In function 'void dfs(int, int)': a.cc:9:42: error: 'p' was not declared in this scope 9 | if(s[y][x]=='.'){cout<<x<<' '<<y<<endl;p++;} | ^ a.cc:14:24: error: 'p' was not declared in this scope 14 | L:cout<<"LOOP"<<endl;p++;Z:; | ...
s669671199
p00104
C++
#include <bits/stdc++.h> using namespace std; int a, b; int main() { while (cin >> a >> b) { if (a == 0 && b == 0) { break; } char data[102][102]; int b[a][b] = { 0 }; for(int i=0; i< a; i++){ for(int j=0; j< b; j++){ cin >> data[i][j]; } } int H = 0, W = 0...
a.cc: In function 'int main()': a.cc:13:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | for(int j=0; j< b; j++){ | ~^~~
s392713559
p00104
C++
#include <iostream> #include <stdio.h> #include <time.h> #include<string> using namespace std; int main(){ char tile[101][101]; int dp[101][101]={0}; bool finished=false; int x,y; while(1){ cin>>y>>x; memset(dp,0,sizeof(dp)); finished=false; if(y==0 && x==0){ break; } for(int i=0;i<y;i++){ for(in...
a.cc: In function 'int main()': a.cc:13:17: error: 'memset' was not declared in this scope 13 | memset(dp,0,sizeof(dp)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ ...
s971861813
p00104
C++
#include <iostream> #include <stdio.h> #include <time.h> #include<string> using namespace std; int main(){ char tile[101][101]; int dp[101][101]={0}; bool finished=false; int x,y; while(1){ cin>>y>>x; memset(dp,0,sizeof(dp)-1); finished=false; if(y==0 && x==0){ break; } for(int i=0;i<y;i++){ for(...
a.cc: In function 'int main()': a.cc:13:17: error: 'memset' was not declared in this scope 13 | memset(dp,0,sizeof(dp)-1); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> ++...
s367152463
p00104
C++
import java.util.*; class Main { public static void main(String args[]){ Scanner in = new Scanner(System.in); while(true){ int h = in.nextInt(), w = in.nextInt(); if(w==0 && h==0) return ; String board[] = new String[h]; for(int i=0; i<h; i++){ board[i] = in.next(); } int cx = 0, cy = 0; ...
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:4:15: error: expected ':' before 'static' 4 | public static void main(String args[]){ | ^~~~~~~ | : a.cc:4:...
s535426479
p00104
C++
#include<stdio.h> #include<windows.h> char masu[101][101]; int H,W,x,y; int main() { int i,j; int f,t1,t2; char temp; for(;;){ x=0; y=0; f=0; scanf("%d %d", &H, &W); if(H==0)break; scanf("%c",&temp); for(i=0;i<H;i++){ for(j=0;j<W+1;j++){ scanf("%c",&masu[i][j]); } } for(;;){ ...
a.cc:2:9: fatal error: windows.h: No such file or directory 2 | #include<windows.h> | ^~~~~~~~~~~ compilation terminated.
s761813849
p00104
C++
#include <iostream> #include <string> using namespace std; int main(){ int w,h; string m[110]; bool f[110][110], flag; while( cin >> h >> w , w, h ){ flag = false; for(int y=0 ; y<h ; y++){ m[y].clear(); for(int x=0 ; x<w ; x++){ f[y][x] = false; } } for(int y=0 ; y<h ; y++){ cin >> m[y]...
a.cc: In function 'int main()': a.cc:29:60: error: expected primary-expression before ';' token 29 | ( f[y][x] )? flag = true : ; | ^
s222227586
p00104
C++
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int w = sc.nextInt(); while(h != 0){ sc.nextLine(); char[][] map = n...
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:4:15: error: expected ':' before 'static' 4 | public static void main(String[] args){ | ^~~~~~~ | : a.cc:4:...
s830763732
p00104
C++
#include<iostream> #include<vector> #include<string> using namespace std; char f[101][101]; int judge[101][101]; int ex, ey; void move(int i, int j) { //printf("%3d:%3d\n", i, j); if(judge[i][j] == 1) { ex = -1; ey = -1; return; } else if(f[i][j] == '.') { ex = j; ey = i; returan; } judge[i][j] = 1;...
a.cc: In function 'void move(int, int)': a.cc:22:17: error: 'returan' was not declared in this scope 22 | returan; | ^~~~~~~
s200558105
p00104
C++
#include<cstdio> #include<algorithm> #include<vector> #include<iostream> using namespace std; int W,H; char fie[102][102]; int cost[102][102]; char df[]={'>','v','<','^'}; int dx[]={1,0,-1,0}; int dy[]={0,1,0,-1}; int main(){ while(1){ cin >> W >> H; memset(fie,-1,sizeof(fie)); memset(cost,0,sizeof(cost))...
a.cc: In function 'int main()': a.cc:15:5: error: 'memset' was not declared in this scope 15 | memset(fie,-1,sizeof(fie)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<iostream> +++ |+#include <cstring> ...
s406157311
p00104
C++
#include<cstdio> #include<algorithm> #include<vector> #include<iostream> using namespace std; int W,H; char fie[102][102]; int cost[102][102]; char df[]={'>','v','<','^'}; int dx[]={1,0,-1,0}; int dy[]={0,1,0,-1}; int main(){ while(1){ cin >> H >> W; memset(fie,-1,sizeof(fie)); memset(cost,0,sizeof(cost))...
a.cc: In function 'int main()': a.cc:15:5: error: 'memset' was not declared in this scope 15 | memset(fie,-1,sizeof(fie)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<iostream> +++ |+#include <cstring> ...
s915798525
p00104
C++
#include <iostream> using namespace std; int main(){ int w,h; int ichi[101][101]={0}; while(1){ int i=0,j=0; cin >> w >> h; if(w == 0 && h == 0){ break; } char map[w][h]; for(int n=0;n<w;n++){ for(int k=0;k<h;k++){ cin ...
a.cc: In function 'int main()': a.cc:21:17: error: 'memset' was not declared in this scope 21 | memset(ichi[n],0,sizeof(ichi[i])); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostre...
s871039923
p00104
C++
#include <iostream> #include <cstdio> using namespace std; int main(){ int w,h; int ichi[101][101]={0}; while(1){ int i=0,j=0; cin >> w >> h; if(w == 0 && h == 0){ break; } char map[w][h]; for(int n=0;n<w;n++){ for(int k=0;k<h;k++){ ...
a.cc: In function 'int main()': a.cc:22:17: error: 'memset' was not declared in this scope 22 | memset(ichi[n],0,sizeof(ichi[i])); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include <cstdio...
s273286924
p00104
C++
#include<iostream> int w,h; int d[100][100]; char c; const int dx[4]={1,0,-1,0}; const int dy[4]={0,1,0,-1}; int main(){ while( std::cin>>h>>w , (w || h) ){ memset(d,-1,sizeof(d)); for(int i=0;i<h;++i){ for(int l=0;l<w;++l){ std::cin>>c; if( c=='>' ) d[l][i]=0; else if( c=='v' ) d[l][i]...
a.cc: In function 'int main()': a.cc:12:17: error: 'memset' was not declared in this scope 12 | memset(d,-1,sizeof(d)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+...
s787676463
p00104
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <stack> #include <queue> #include <set> #include <map> #include <cmath> using namespace std; #define all(c) (c).begin(), (c).end() #define rall(c) (c).rbegin(), (c).rend() #define loop(i,a,b) for(int i=(a); i<(int)(b); i++) #define ...
a.cc: In function 'int main()': a.cc:26:14: error: 'a' was not declared in this scope 26 | vs G(a); | ^ a.cc:29:57: error: no matching function for call to 'std::vector<std::vector<bool> >::vector(std::vector<bool>, int&)' 29 | vector<vector<bool>> vis(vector<bool>(w,false),h); ...
s534375828
p00104
C++
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <stack> #include <queue> #include <set> #include <map> #include <cmath> using namespace std; #define all(c) (c).begin(), (c).end() #define rall(c) (c).rbegin(), (c).rend() #define loop(i,a,b) for(int i=(a); i<(int)(b); i++) #define ...
a.cc: In function 'int main()': a.cc:38:24: error: 'cs' was not declared in this scope; did you mean 'cy'? 38 | if(vis[cy][cs]){ | ^~ | cy
s448031076
p00104
C++
#include<iostream> using namespace std; int main(){ int a, b, i, j; char map[102][102] while(1){ cin >> a >> b; if(a+b==0) break; for(i=0; i< a; i++){ for(j=0; j< b; j++){ cin >> map[i][j]; } } i=0;j=0; while(1){ if(map[i][j...
a.cc: In function 'int main()': a.cc:8:4: error: expected initializer before 'while' 8 | while(1){ | ^~~~~
s546855770
p00104
C++
#include<iostream> using namespace std; int main(){ int a, b, i, j; char map[102][102]; while(1){ cin >> a >> b; if(a+b==0) break; for(i=0; i< a; i++){ for(j=0; j< b; j++){ cin >> map[i][j]; } } i=0;j=0; while(1){ if(map[i][...
a.cc: In function 'int main()': a.cc:19:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 19 | if(map[i][j]=="."){ | ~~~~~~~~~^~~~~ a.cc:22:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 22 | }else if(map[i][j]=="...
s327813910
p00104
C++
#include<iostream> using namespace std; int main(){ int a, b, i, j; char map[102][102]; while(1){ cin >> a >> b; if(a+b==0) break; for(i=0; i< a; i++){ for(j=0; j< b; j++){ cin >> map[i][j]; } } i=0;j=0; while(1){ if(map[i][...
a.cc: In function 'int main()': a.cc:19:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 19 | if(map[i][j]=="."){ | ~~~~~~~~~^~~~~ a.cc:22:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 22 | }else if(map[i][j]=="...
s740234653
p00104
C++
#include<iostream> using namespace std; int main(){ int a, b, i, j; char map[102][102]; while(1){ cin >> a >> b; if(a+b==0) break; for(i=0; i< a; i++){ for(j=0; j< b; j++){ cin >> map[i][j]; } } i=0;j=0; while(1){ if(map[i][...
a.cc: In function 'int main()': a.cc:26:23: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 26 | map[i][j]="#"; | ^~~ | | | const char* a.cc:29:23: error: invalid conversion from 'const char*' to 'ch...
s639860806
p00104
C++
#include<iostream> using namespace std; int main(void) { int h,w; while(true) { cin>>h>>w; if(h==0 && w==0)break; char str[h][w]; int looper[h][w]; for(int i=0;i<h;i++) { for(int j=0;j<w;j++) { cin>>str[i][j]; looper[i][j]=0; } } int i=0,j=0; ...
a.cc: In function 'int main()': a.cc:54:11: error: 'loop' was not declared in this scope; did you mean 'looper'? 54 | loop[i][j]++; | ^~~~ | looper
s137790317
p00105
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.TreeMap; public class Main { private BufferedReader in = new BufferedReader(new InputStreamReader( System.in)); public static voi...
Main.java:15: error: cannot find symbol BookIndex wordcount = new BookIndex(); ^ symbol: class BookIndex location: class Main Main.java:15: error: cannot find symbol BookIndex wordcount = new BookIndex(); ^ symbol: class BookIndex location: class Main 2 errors
s107314691
p00105
Java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.TreeMap; public class Main { private BufferedReader in = new BufferedReader(new InputStreamReader( System.in)); public static voi...
Main.java:47: error: cannot find symbol Collections.sort(list); ^ symbol: variable Collections location: class Main 1 error
s801129820
p00105
Java
import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.PriorityQueue; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Map<String, List<Integer>> ref = ne...
Main.java:40: error: reached end of file while parsing } ^ 1 error
s134000274
p00105
C
#include<stdio.h> #define W 30 #define P 1000 int main(){ int p; char c[W]; while(scanf("%c %d",c,&p)!=EOF){ } retrn 0; }
main.c: In function 'main': main.c:15:1: error: 'retrn' undeclared (first use in this function) 15 | retrn 0; | ^~~~~ main.c:15:1: note: each undeclared identifier is reported only once for each function it appears in main.c:15:6: error: expected ';' before numeric constant 15 | retrn 0; | ^~ ...