submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s150510043
p03777
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ string a,b; cin>>a>>b; (a="H" && b="H")? cout<<"H":cout<<"D" return 0; }
a.cc: In function 'int main()': a.cc:9:10: error: no match for 'operator&&' (operand types are 'const char [2]' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 9 | (a="H" && b="H")? cout<<"H":cout<<"D" | ~~~ ^~ ~ | | | | | std::string {aka std::__cxx11::basic...
s531893228
p03777
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ string a,b; cin>>a>>b; (a='H' & b='H')? cout<<"H":cout<<"D" return 0; }
a.cc: In function 'int main()': a.cc:9:10: error: no match for 'operator&' (operand types are 'char' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 9 | (a='H' & b='H')? cout<<"H":cout<<"D" | ~~~ ^ ~ | | | | char std::string {aka std::__cxx11::basic_string<char>} ...
s209403915
p03777
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ string a,b; cin>>a>>b; (a='H' && b='H')? cout<<"H":cout<<"D" return 0; }
a.cc: In function 'int main()': a.cc:9:10: error: no match for 'operator&&' (operand types are 'char' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 9 | (a='H' && b='H')? cout<<"H":cout<<"D" | ~~~ ^~ ~ | | | | char std::string {aka std::__cxx11::basic_string<ch...
s249502679
p03777
C++
#include<iostream> using namespace std; int main() { std::string a,b; cin >> a >> b; if (a=="H") { if (b=="H") cout << "H" << endl;; else cout << "D" << endl;; } else { if (b=="H") cout << "D" << endl;; else cout << "H" << endl;; } }
a.cc: In function 'int main()': a.cc:8:5: error: expected '}' before 'else' 8 | else cout << "D" << endl;; | ^~~~ a.cc:6:15: note: to match this '{' 6 | if (a=="H") { | ^ a.cc: At global scope: a.cc:10:3: error: expected unqualified-id before 'else' 10 | else { | ...
s090755668
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; if (a == "H") {#include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; if (a == "H") { cout << b << endl; } else { if (b == "D") cout << "H" << endl; else ...
a.cc:8:18: error: stray '#' in program 8 | if (a == "H") {#include <bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:8:19: error: 'include' was not declared in this scope 8 | if (a == "H") {#include <bits/stdc++.h> | ^~~~~~~ a.cc:8:28: error: 'bits' was ...
s968801770
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; if (a == "H") {#include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; if (a == "H") { cout << b << endl; } else { if (b == "D") cout << "H" << endl; else ...
a.cc:8:18: error: stray '#' in program 8 | if (a == "H") {#include <bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:8:19: error: 'include' was not declared in this scope 8 | if (a == "H") {#include <bits/stdc++.h> | ^~~~~~~ a.cc:8:28: error: 'bits' was ...
s203768403
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; if (a == "H") { cout >> b >> endl; } else { if (b == "D") cout >> "H" >> endl; else cout >> "D" >> endl; } return; }
a.cc: In function 'int main()': a.cc:9:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 9 | cout >> b >> endl; | ~~~~ ^~ ~ | | | | | std::string {aka std::...
s373900528
p03777
C++
# include<bits/stdc++.h> using namespace std; int main (){ string a,b; cin>>a>>b; if(a=='H' and b=='H'){ cout<<"D"; } else if (a=='D' and b=='D'){ cout<<"H"; } else if (a=='D' and b=='H'){ cout<<'D'; } else { cout<<'H'; }
a.cc: In function 'int main()': a.cc:6:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 6 | if(a=='H' and b=='H'){ | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<...
s305779707
p03777
C++
#include<stdio.h> int main(){ char a, b; scanf("%c %c", &a, &b); if(a==b) printf("H\n"); else printf("D\n") return 0; }
a.cc: In function 'int main()': a.cc:7:27: error: expected ';' before 'return' 7 | else printf("D\n") | ^ | ; 8 | return 0; | ~~~~~~
s831062969
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { string a,b; cin >> a >> b; if(a=="H"){ if(b=="H"){ cout << "H" << endl; } else{ cout << "D" << endl; } } else{ if(B=="H"){ cout << "D" << endl; } else{ cout << "H" << endl; } } }
a.cc: In function 'int main()': a.cc:16:8: error: 'B' was not declared in this scope 16 | if(B=="H"){ | ^
s555014377
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ char a,b; cin >> a >> b; if(a=='H'){ cout << "H" << endl; }else if(a=='D'){ if(b=='H'){ cout << "D" << endl; }else(b=='H'){ cour << "H" << endl; }} }
a.cc: In function 'int main()': a.cc:12:19: error: expected ';' before '{' token 12 | }else(b=='H'){ | ^ | ;
s901423365
p03777
C++
#include<bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < (n); ++i) typedef long long ll; template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1;} return 0;} template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1;} return 0;} const ll INF = 1LL << 60...
a.cc: In function 'int main()': a.cc:11:27: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 11 | if(a == 'H') puts(b); | ^ | | | char In file included from /usr/include/c++/14/cstdio:42, ...
s736259356
p03777
C++
#include <iostream> #include <vector> using namespace std; int main(){ char a, b; cin >> a >> b; bool atco, tpco; if(a == 'H') atco = true; else atco = false; if(b == "H") tpco = true; else tpco = false; if(atco == tpco) cout << 'H'; else cout << 'D'; }
a.cc: In function 'int main()': a.cc:13:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | if(b == "H") tpco = true; | ~~^~~~~~
s646456009
p03777
C++
#include<iostream> using namespace std; int main(){ char a,b; cin>>a>>b; char hd[2]=['H','D']; cout<<(a=='H'?b:hd[abs((b=='D')-1)] )<<endl; }
a.cc: In function 'int main()': a.cc:6:21: error: expected identifier before 'H' 6 | char hd[2]=['H','D']; | ^~~ a.cc:6:24: error: expected ']' before ',' token 6 | char hd[2]=['H','D']; | ^ | ] a.cc: In lambda f...
s804307955
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a,b; cin>>a>>b; if(a=='H') cout<<b; else { if(b=="H") cout<<"D"; else cout<<"H"; } cout<<"\n"; }
a.cc: In function 'int main()': a.cc:6:7: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 6 | if(a=='H') cout<<b; | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} In fil...
s828194909
p03777
C++
int main() { char a, b; cin >> a >> b; if (a == 'H') cout << b << endl; else { if (b == 'H') cout << 'D' << endl; else cout << 'H' << endl; } return 0; }
a.cc: In function 'int main()': a.cc:3:5: error: 'cin' was not declared in this scope 3 | cin >> a >> b; | ^~~ a.cc:4:19: error: 'cout' was not declared in this scope 4 | if (a == 'H') cout << b << endl; | ^~~~ a.cc:4:32: error: 'endl' was not declared in this scope ...
s493940953
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { char a, b; cin >> a >> b; if ((a == "H" && b == "H") || (a == "D" && b == "D")) { cout << "H" << endl; } else { cout << "D" << endl; } }
a.cc: In function 'int main()': a.cc:6:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | if ((a == "H" && b == "H") || (a == "D" && b == "D")) { | ~~^~~~~~ a.cc:6:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | if ((a == "H...
s160453832
p03777
C++
#include"stdio.h" int main (){ char a, b; scanf("%c %c", &a, &b);getchar(); if(a=='H' && b=='H')||(a=='D' && b=='D') { puts("H"); } else { puts("D"); } return 0; }
a.cc: In function 'int main()': a.cc:6:29: error: expected primary-expression before '||' token 6 | if(a=='H' && b=='H')||(a=='D' && b=='D') | ^~
s294658294
p03777
C++
#include <bits/stdc++.h> using namespace std; const int MOD = 1000000007; const int INF = 1e9; //long long using ll = long long; //出力系 #define print(x) cout << x << endl #define yes cout << "Yes" << endl #define YES cout << "YES" << endl #define no cout << "No" << endl #define NO cout << "NO" << endl // begin() en...
a.cc: In function 'int main()': a.cc:47:1: error: 'chat' was not declared in this scope; did you mean 'char'? 47 | chat a, b; | ^~~~ | char a.cc:48:8: error: 'a' was not declared in this scope 48 | cin >> a >> b; | ^ a.cc:48:13: error: 'b' was not declared in this scope 48 | cin >> a >...
s726561925
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; if(a == 'H'){ cout << b << endl; } else if(a == 'D'){ if(b == 'H'){ cout << 'D' <<endl; } else if(b == 'D'){ cout << 'H' << endl; } } }
a.cc: In function 'int main()': a.cc:7:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 7 | if(a == 'H'){ | ~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} In fil...
s452433551
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a, b; cin >> a >> b; if (a == H && b == H){ cout << "H" << endl; } else if (a == H && b == D){ cout << "D" << endl; } else if (a == D && b == H){ cout << "D" << endl; } else { cou...
a.cc: In function 'int main()': a.cc:8:14: error: 'H' was not declared in this scope 8 | if (a == H && b == H){ | ^ a.cc:11:29: error: 'D' was not declared in this scope 11 | else if (a == H && b == D){ | ^
s507269253
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; cin >> a >> b; if((a=="H"&&b=="H")||(a=="D"&&b=="D")){ cout << "H" << endl; }else{ cout << "D" << endl; } }
a.cc: In function 'int main()': a.cc:6:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | if((a=="H"&&b=="H")||(a=="D"&&b=="D")){ | ~^~~~~ a.cc:6:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | if((a=="H"&&b=="H")||(a=="D"&&b=...
s347761181
p03777
C++
# include <bits/stdc++.h> using namespace std; int main() { char a, b; cin >> a >> b; char ans[2] = {'D', 'H'}; std::random_device rnd; std::mt19937 mt(rnd()); std::uniform_int_distribution<> rand2bit(0, 1); char ans[2] = {'D', 'H'}; cout << ans[rand2bit(mt)]...
a.cc: In function 'int main()': a.cc:12:14: error: redeclaration of 'char ans [2]' 12 | char ans[2] = {'D', 'H'}; | ^~~ a.cc:6:12: note: 'char ans [2]' previously declared here 6 | char ans[2] = {'D', 'H'}; | ^~~
s108884137
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { int X; cint >> X; int count = 0; int ans = 0; vector<int> vec; for (int i = 0; i < X + 1; i++) { vec; } for (int i = 0; size.vec(); i++) { ans++; count++; if (X < count + i + 1) ...
a.cc: In function 'int main()': a.cc:8:5: error: 'cint' was not declared in this scope; did you mean 'uint'? 8 | cint >> X; | ^~~~ | uint a.cc:19:26: error: overloaded function with no contextual type information 19 | for (int i = 0; size.vec(); i++) | ^...
s180571120
p03777
C++
#include<stdio.h> int main(){ char a,b; scanf("%c %c",&a,&b); if(a=='H'){ if(b=='H') printf("H\n"); else printf("D\n") }else { if(b=='H') printf("D\n"); else printf("H\n"); } return 0; }
a.cc: In function 'int main()': a.cc:8:27: error: expected ';' before '}' token 8 | else printf("D\n") | ^ | ; 9 | }else { | ~
s680508004
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; if (a = b) { cout << "H" << endl; } else { cout << "D" << endl; } }
a.cc: In function 'int main()': a.cc:8:9: error: could not convert 'a.std::__cxx11::basic_string<char>::operator=(b)' from 'std::__cxx11::basic_string<char>' to 'bool' 8 | if (a = b) { | ~~^~~ | | | std::__cxx11::basic_string<char>
s582077794
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ char a, b; cin >> a >> b; sort(a, a+3); if(a=='H'){ cout << "H" << endl; }else{ if(b=='H'){ cout << "D" << endl; }else{ cout << "H" << endl; } } return 0; }
a.cc: In function 'int main()': a.cc:6:9: error: no matching function for call to 'sort(char&, int)' 6 | sort(a, a+3); | ~~~~^~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51, from a.cc:1: /usr/...
s333871695
p03777
C++
include <bits/stdc++.h> using namespace std; int main(){ string A, B; cin >> A >> B; if(A == B){ cout << "H"; } else { cout << "D"; } }
a.cc:1:1: error: 'include' does not name a type 1 | include <bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:5:3: error: 'string' was not declared in this scope 5 | string A, B; | ^~~~~~ a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin >> A >> B; | ^~~ a....
s155317863
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { string S,s; cin>>S>>s; if(S==s){ cout<<"H"<<endl; }else cout<<"D"<<endl; } }
a.cc:12:1: error: expected declaration before '}' token 12 | } | ^
s984359191
p03777
C++
#include<bits/stdc++.h> using nmespace std; int main() { char a,b; cin >> a >> b; if(a=='H' && b=='H') cout << "H" << endl; else if(a=='D' && b=='H') cout << "D" << endl; else if(a=='H' && b=='D') cout << "D" << endl; else if(a=='D' && b=='D') cout << "H" << endl; }
a.cc:2:7: error: expected nested-name-specifier before 'nmespace' 2 | using nmespace std; | ^~~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> a >> b; | ^~~ | std::cin In file included from /usr/includ...
s365555433
p03777
C++
#include<bitss/stdc++.h> using nmespace std; int main() { char a,b; cin >> a >> b; if(a=='H' && b=='H') cout << "H" << endl; else if(a=='D' && b=='H') cout << "D" << endl; else if(a=='H' && b=='D') cout << "D" << endl; else if(a=='D' && b=='D') cout << "H" << endl; }
a.cc:1:9: fatal error: bitss/stdc++.h: No such file or directory 1 | #include<bitss/stdc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s963651166
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a,b; //scanf("%c%c",&a &b); cin>>a>>b; if(a==b){ //printf("H"); cout<<"H"; } else{ //printf("D"); cout<<"D"; } ]
a.cc: In function 'int main()': a.cc:15:1: error: expected primary-expression before ']' token 15 | ] | ^ a.cc:15:2: error: expected '}' at end of input 15 | ] | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s217757416
p03777
C++
#include <bits/stdc++.h> #include <string.h> using namespace std; int main () { char a[1]; char b[1]; cin>>a>b; if (a[0]=='H') { if (b[0]=='H') cout<<"H\n"; else cout<<"D\n"; } else { if (a[0]=='D'&&b[0]=='H') cout<<"D\n"; else cout<<"H\n"; } }
a.cc: In function 'int main()': a.cc:10:15: error: no match for 'operator>' (operand types are 'std::basic_istream<char>' and 'char [1]') 10 | cin>>a>b; | ~~~~~~^~ | | | | | char [1] | std::basic_istream<char> In file included from /usr/inc...
s401725069
p03777
C++
#include<bits/stdc++.h> int main() { char a,b; cin>>a>>b; if(a==b) { puts("H"); return 0; } puts("D"); }
a.cc: In function 'int main()': a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin>>a>>b; | ^~~ | std::cin In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146, from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin'...
s689141960
p03777
C++
#include<iostream> using namespace std; int main(){ char a,b; cin>>a>>b; while((a=="H" || a=="D") && (b=="H" || b=="D")){ continue; } if(a==b){ cout<<"H\n"; cout<<"In this input, AtCoDeer is honest. Hence, as he says, TopCoDeer is honest.\n"; } else{ cout<<"D\n"; cout<<"In this input, AtCoDeer is...
a.cc: In function 'int main()': a.cc:6:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | while((a=="H" || a=="D") && (b=="H" || b=="D")){ | ~^~~~~ a.cc:6:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | w...
s166481122
p03777
C++
#include <iostream> using namespace std; int main() { string a, b; cin>>a>>b; if(a=='H' ) { cout<<"H" ; } else if((a=='D')&&(b=='H')) { cout<<"D" ; } else if((a=='D')&&(b=='D')) { cout<<"H" ; } return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 7 | if(a=='H' ) { | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} In file included from ...
s781364975
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { char a,b; cin >>a >>b; if(a =='H'){ if(b =='H'){ cout << 'H' <<endl; } else if(b=='D'){ cout <<'D' <<endl; } } if(a =='D'){ if(b =='H'){ cout << 'D' <<endl; } else if(b=='D'){ cout <<'H' <<endl; ...
a.cc: In function 'int main()': a.cc:22:4: error: expected '}' at end of input 22 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s726140043
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ if(a=='H',b=='H') cout<<'H'; if(a=='H',b=='D') cout<<'D'; if(a=='D',b=='H') cout<<'D'; if (a=='D',b=='D') cout<<'H'; }
a.cc: In function 'int main()': a.cc:4:12: error: 'a' was not declared in this scope 4 | if(a=='H',b=='H') | ^ a.cc:4:19: error: 'b' was not declared in this scope 4 | if(a=='H',b=='H') | ^ a.cc:6:12: error: 'a' was not declared in this scope 6 | ...
s794533524
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a,b;cin>>a>>b; if(a==b) cout<<char(h-32); if(a!=b) cout<<char(d-32); return 0;}
a.cc: In function 'int main()': a.cc:6:12: error: 'h' was not declared in this scope 6 | cout<<char(h-32); | ^ a.cc:8:12: error: 'd' was not declared in this scope 8 | cout<<char(d-32); | ^
s105760902
p03777
C++
int main (){ char a,b; cin>>a>>b; if(a=='H'&&b=='H') { cout<<"H"; } if(a=='D'&&b=='H') { cout<<"D"; } if(a=='H'&&b=='D') { cout<<"D"; } if(a=='D'&&b=='D') { cout<<"H"; } }
a.cc: In function 'int main()': a.cc:3:9: error: 'cin' was not declared in this scope 3 | cin>>a>>b; | ^~~ a.cc:6:13: error: 'cout' was not declared in this scope 6 | cout<<"H"; | ^~~~ a.cc:10:11: error: 'cout' was not declared in this scope 10 | ...
s871566896
p03777
C++
int main (){ char a,b; cin>>a>>b; if(a=='H'&&b=='H') { cout<<"H"; } if(a=='D'&&b=='H') { cout<<"D"; } if(a=='H'&&b=='D') { cout<<"D"; } if(a=='D'&&b=='D') { cout<<"H"; } }
a.cc: In function 'int main()': a.cc:3:9: error: 'cin' was not declared in this scope 3 | cin>>a>>b; | ^~~ a.cc:6:13: error: 'cout' was not declared in this scope 6 | cout<<"H"; | ^~~~ a.cc:10:11: error: 'cout' was not declared in this scope 10 | ...
s807896757
p03777
C++
#include <iostream> using namespace std; int main() { char answer,a,b; cin >> a, b; if (a=='H') { if (b == 'H') { answer = 'H'; } else { answer = 'D'; } } else{ if(b=='D'){ answer = 'H'; } else { answer = 'D'; } cout << answer << endl; }
a.cc: In function 'int main()': a.cc:23:2: error: expected '}' at end of input 23 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s193153771
p03777
C++
#include<iostream> using namespace std; int main(){ char a[2],b[2]; cout<<"Enter (H) OR (D) for a and b\n"; cin>>a>>b; if((a=='H' && b=='H') || (a=='D' && b=='D')){ cout<<"H\n"; cout<<" TopCoDeer is honest.\n"; } else{ cout<<"D\n"; cout<<"TopCoDeer is dishonest.\n"; } return 0; }
a.cc: In function 'int main()': a.cc:7:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if((a=='H' && b=='H') || (a=='D' && b=='D')){ | ~^~~~~ a.cc:7:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if((a==...
s856453486
p03777
C++
#include<iostream> using namespace std; int main(){ char a[],b[]; cout<<"Enter (H) OR (D) for a and b\n"; cin>>a>>b; if((a=='H' && b=='H') || (a=='D' && b=='D')){ cout<<"H\n"; cout<<" TopCoDeer is honest.\n"; } else{ cout<<"D\n"; cout<<"TopCoDeer is dishonest.\n"; } return 0; }
a.cc: In function 'int main()': a.cc:4:14: error: storage size of 'a' isn't known 4 | char a[],b[]; | ^ a.cc:4:18: error: storage size of 'b' isn't known 4 | char a[],b[]; | ^
s998655483
p03777
C++
#include<iostream> using namespace std; int main(){ char a[]={H,D},b[]={H,D}; cout<<"Enter (H) OR (D) for a and b\n"; cin>>a>>b; if((a=='H' && b=='H') || (a=='D' && b=='D')){ cout<<"H\n"; cout<<" TopCoDeer is honest.\n"; } else{ cout<<"D\n"; cout<<"TopCoDeer is dishonest.\n"; } return 0; }
a.cc: In function 'int main()': a.cc:4:19: error: 'H' was not declared in this scope 4 | char a[]={H,D},b[]={H,D}; | ^ a.cc:4:21: error: 'D' was not declared in this scope 4 | char a[]={H,D},b[]={H,D}; | ^ a.cc:7:14: error: ISO C++ forbids compar...
s582585173
p03777
C++
#include <iostream> int main() { char a,b; cin >>a>>b; if(a=='H') { if(b=='H') cout << "H"; else cout << "D"; } else if (a=='D') { if(b=='D') cout << 'D'; else cout << 'H'; } }
a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 5 | cin >>a>>b; | ^~~ | 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; ///< Linked to s...
s611148337
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a,b; scanf("%c%c",&a &b); if(a==b){ printf("H"); } else{ printf("D"); } }
a.cc: In function 'int main()': a.cc:5:17: error: invalid operands of types 'char*' and 'char' to binary 'operator&' 5 | scanf("%c%c",&a &b); | ~~ ^~ | | | | | char | char*
s898565573
p03777
C++
// o #include <iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if((a=='H')&&(b=='H')) { cout<<"H"; } if((a=='D')&&(b=='D')){ cout<<"H"; } if(((a=='H')&&(b=='D'))|| ((a=='D')&&(b=='H'))){ cout<<"D"; } }
a.cc:2:21: warning: extra tokens at end of #include directive 2 | #include <iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if((a=='H')&&(b=='H')) { cout<<"H"; } if((a=='D')&&(b=='D')){ cout<<"H"; } if(((a=='H')&&(b=='D'))|| ((a=='D')&&(b=='H'))){ cout<<"D"; } } | ^~~~~ /us...
s849879653
p03777
C++
Alice started holding down her button 0 second after the start-up of the robot, and released her button 75 second after the start-up. Bob started holding down his button 25 second after the start-up, and released his button 100 second after the start-up. Therefore, the time when both of them were holding down their but...
a.cc:1:1: error: 'Alice' does not name a type 1 | Alice started holding down her button 0 second after the start-up of the robot, and released her button 75 second after the start-up. | ^~~~~
s526803576
p03777
C++
// o #include <iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if((a=='H')&&(b=='H')) { cout<<"H"; } if((a=='D')&&(b=='D')){ cout<<"H"; } if(((a=='H')&&(b=='D'))|| ((a=='D')&&(b=='H'))){ cout<<"D"; } }
a.cc:2:21: warning: extra tokens at end of #include directive 2 | #include <iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if((a=='H')&&(b=='H')) { cout<<"H"; } if((a=='D')&&(b=='D')){ cout<<"H"; } if(((a=='H')&&(b=='D'))|| ((a=='D')&&(b=='H'))){ cout<<"D"; } } | ^~~~~ /us...
s789814482
p03777
C++
#include <iostream> using namespace std; int main(){ string a,b; cin>>a>>b; if((a=='H')&&(b=='H')) { cout<<"H"; } if((a=='D')&&(b=='H')){ cout<<"H"; } else { cout<<"D"; } }
a.cc: In function 'int main()': a.cc:6:6: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 6 | if((a=='H')&&(b=='H')) | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} In file i...
s020866806
p03777
C++
#include <iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if((a=="H")&&(b=="H")) { cout<<"H"; } if((a=="D")&&(b=="H")){ cout<<"H"; } else { cout<<"D"; } }
a.cc: In function 'int main()': a.cc:6:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | if((a=="H")&&(b=="H")) | ~^~~~~ a.cc:6:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | if((a=="H")&&(b=="H")) | ~^~~~~ a.c...
s987348344
p03777
C++
#include <iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if(((a=="H")&&(b=="H"))||((a=="D")&&(b=="H"))){ cout<<"H"; } else { cout<<"D"; } }
a.cc: In function 'int main()': a.cc:6:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | if(((a=="H")&&(b=="H"))||((a=="D")&&(b=="H"))){ | ~^~~~~ a.cc:6:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | if(((a=="H")&&(b=="H"))||((a=...
s099696856
p03777
C++
#include<iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if(a=='H'&&b=='H'){ cout<<'H'; else if(a=='D'&&b=='D') cout<<'H'; else cout<<'D'; return 0; }
a.cc: In function 'int main()': a.cc:8:1: error: expected '}' before 'else' 8 | else if(a=='D'&&b=='D') | ^~~~ a.cc:6:27: note: to match this '{' 6 | if(a=='H'&&b=='H'){ | ^
s654753041
p03777
C++
#include<iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if(a=='H'&&b=='H') cout<<'H'; if(a=='D'&&b=='D') cout<<'H'; else cout<<'D' return 0; }
a.cc: In function 'int main()': a.cc:11:18: error: expected ';' before 'return' 11 | cout<<'D' | ^ | ; 12 | return 0; | ~~~~~~
s071192462
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a , b ; cin>>a>>b; if((a=='h'&&b=='h')||(a=='d'&&b=='d' )) cout<<"H"; if((a=='h'&&b=='d')||(a=='d'&&b=='h')) cout<<"D"; }
a.cc: In function 'int main()': a.cc:6:14: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 6 | if((a=='h'&&b=='h')||(a=='d'&&b=='d' )) | ~^~~~~ | | | | | char | st...
s994702141
p03777
C++
Two deer, AtCoDeer and TopCoDeer, are playing a game called Honest or Dishonest. In this game, an honest player always tells the truth, and an dishonest player always tell lies. You are given two characters a and b as the input. Each of them is either H or D, and carries the following information: If a=H, AtCoDeer is ...
a.cc:1:1: error: 'Two' does not name a type 1 | Two deer, AtCoDeer and TopCoDeer, are playing a game called Honest or Dishonest. In this game, an honest player always tells the truth, and an dishonest player always tell lies. You are given two characters a and b as the input. Each of them is either H or D, and carr...
s342052237
p03777
C++
#include<bits/stdc++.h> using namespace std; int main() {string a,b;cin>>a>>b; if(a=='h'&&b=='h'||a=='d'&&b=='d') {cout<<"h";} else if(a=='h'&&b=='d'||a=='d'&&b=='h') {cout<<"d";} return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 5 | if(a=='h'&&b=='h'||a=='d'&&b=='d') | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} I...
s878338102
p03777
C++
#include<bits/stdc++.h> using namespace std; int main() { string a,b;cin>>a>>b; if((a=='h'&&b=='h')||(a=='d'&&b=='d') { cou<<"h"; } if((a=='h'&&b=='d')||(a=='d'&&b=='h') { cou<<"d"; } return 0; }
a.cc: In function 'int main()': a.cc:6:6: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 6 | if((a=='h'&&b=='h')||(a=='d'&&b=='d') | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<c...
s968768565
p03777
C
#include <bits/stdc++.h> #include <stdio.h> using namespace std; int main(){ char a,b; cin >>a>>b; if (a=='H'){ if (b=='H') cout<<"H"<<endl; else if(b=='D') cout<<"D"<<endl; }else if (a=='D'){ if (b=='D') cout<<"H"<<endl; else if(b=='H') cout<<"D"<<endl; } return ...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s336112623
p03777
C++
#include <bits/stdc++.h> int main() { using namespace std; char a,b; cin>>a>>b; if(a=='H'||a=='D'||b=='H'||b=='D'){ if(b=='H'){ printf("%c",a); }else { if(a=='H'){ printf("D"); }else{ printf("H"); } } }
a.cc: In function 'int main()': a.cc:16:2: error: expected '}' at end of input 16 | } | ^ a.cc:2:12: note: to match this '{' 2 | int main() { | ^
s775617586
p03777
C++
#include <bits/stdc++.h> using namespace std ; int main ( ) { char a , b ; cin >> a >> b ; if ( a == 'H' && b == 'H') { cout << 'H' ; } else if ( a == 'H' && b == 'D') { cout << 'D' } else if ( a == 'D' && b == 'H') { cout << 'D' ; } else cout << 'H' ; return 0 ; }
a.cc: In function 'int main()': a.cc:17:28: error: expected ';' before '}' token 17 | cout << 'D' | ^ | ; 18 | } | ~
s100957408
p03777
C++
#include <iostream> #include <algorithm> using namespace std; int main(void){ // Your code here! char a, b; if(a == 'H'){ if(b == "H"){ cout << "H" << endl; } else { cout << "D" << endl; } } else { if(b == "H"){ cout << "D" << endl; } els...
a.cc: In function 'int main()': a.cc:9:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 9 | if(b == "H"){ | ~~^~~~~~ a.cc:15:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 15 | if(b == "H"){ | ~~^~~~~~...
s453008797
p03777
C++
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <map> #include <utility> #include <tuple> #include <string> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define SORT(x) sort(x.begin(),x.end()) #define REVE(x) reverse(x.begin(),x.end()) #define all(x) (x).be...
a.cc: In function 'int main()': a.cc:30:11: error: 'H' was not declared in this scope 30 | if(a==H){ | ^ a.cc:39:6: error: 'else' without a previous 'if' 39 | }else{ | ^~~~
s836036613
p03777
C++
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <map> #include <utility> #include <tuple> #include <string> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define SORT(x) sort(x.begin(),x.end()) #define REVE(x) reverse(x.begin(),x.end()) #define all(x) (x).be...
a.cc: In function 'int main()': a.cc:30:11: error: 'H' was not declared in this scope 30 | if(a==H){ | ^ a.cc:38:18: error: expected ';' before '}' token 38 | cout << "D" | ^ | ; 39 | }else{ | ~ a.cc:39:6: error:...
s816823532
p03777
C++
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <map> #include <utility> #include <tuple> #include <string> using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define SORT(x) sort(x.begin(),x.end()) #define REVE(x) reverse(x.begin(),x.end()) #define all(x) (x).be...
a.cc: In function 'int main()': a.cc:27:12: error: 'H' was not declared in this scope 27 | cout << a==H?b==H?"H":"D":b==H?"D":"H"; | ^
s535749602
p03777
C++
#include<iostream> #include<vector> using namespace std; int main() { string a,b; cin >> a >> b; if ( a = b) cout <<"H"<<endl; else cout<<"D"<<endl; }
a.cc: In function 'int main()': a.cc:6:10: error: could not convert 'a.std::__cxx11::basic_string<char>::operator=(b)' from 'std::__cxx11::basic_string<char>' to 'bool' 6 | if ( a = b) cout <<"H"<<endl; | ~~^~~ | | | std::__cxx11::basic_string<char>
s640299937
p03777
C++
#include <bits/stdc++.h> using namespace std; int main () { char a,b; cin >>a>>b; if (a=='D'&&b=='D') { cout <<"H"<<endl; } if (a=='D'&&b=='H') { cout <<"D"<<endl; } if (a==H) { cout <<b<<endl; } }
a.cc: In function 'int main()': a.cc:12:10: error: 'H' was not declared in this scope 12 | if (a==H) { | ^
s369994870
p03777
C++
#include <bits/stdc++.h> using namespace std; int main () { char a,b; cin >>a>>b; if (a==D&&b==D) { cout <<"H"<<endl; } if (a==D&&b==H) { cout <<"D"<<endl; } if (a==H) { cout <<b<<endl; } }
a.cc: In function 'int main()': a.cc:6:10: error: 'D' was not declared in this scope 6 | if (a==D&&b==D) { | ^ a.cc:9:10: error: 'D' was not declared in this scope 9 | if (a==D&&b==H) { | ^ a.cc:9:16: error: 'H' was not declared in this scope 9 | if (a==D&&b==H) { |...
s405106404
p03777
C
#include <bits/stdc++.h> using namespace std; #define ll long long #define mp make_pair #define pb push_back #define pii pair<int,int> #define vi vector<int> #define vii vector<pii> #define mi map<int,int> #define mii map<pii,int> #define all(a) (a).b...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s630229374
p03777
C++
#include<stdio.h> int main(){ char a, b; scanf("%c%c", &a, &b); if(a==b)printf('H'); else printf("D"); }
a.cc: In function 'int main()': a.cc:5:18: error: invalid conversion from 'char' to 'const char*' [-fpermissive] 5 | if(a==b)printf('H'); | ^~~ | | | char In file included from a.cc:1: /usr/include/stdio.h:363:43: note: initializing argument 1...
s872046649
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { string a , b; cin >> a >> b; if (a == H && b == H ){ cout << "H" << endl; } else if ( a == H && b == D ){ cout << "D" << endl; } else if ( a == D && b == H ){ cout << "D" << endl; } else if ( a == D && b == D ){ ...
a.cc: In function 'int main()': a.cc:8:12: error: 'H' was not declared in this scope 8 | if (a == H && b == H ){ | ^ a.cc:11:30: error: 'D' was not declared in this scope 11 | else if ( a == H && b == D ){ | ^
s677914134
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { int a , b; cin >> a >> b; if (a == H && b == H ){ cout << "H" << endl; } else if ( a == H && b == D ){ cout << "D" << endl; } else if ( a == D && b == H ){ cout << "D" << endl; } else if ( a == D && b == D ){ co...
a.cc: In function 'int main()': a.cc:8:12: error: 'H' was not declared in this scope 8 | if (a == H && b == H ){ | ^ a.cc:11:30: error: 'D' was not declared in this scope 11 | else if ( a == H && b == D ){ | ^
s502170842
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { int a , b; cin >> a >> b; if (a == H && b == H ){ cout << H << endl; } else if ( a == H && b == D ){ cout << D << endl; } else if ( a == D && b == H ){ cout << D << endl; } else if ( a == D && b == D ){ cout << ...
a.cc: In function 'int main()': a.cc:8:12: error: 'H' was not declared in this scope 8 | if (a == H && b == H ){ | ^ a.cc:11:30: error: 'D' was not declared in this scope 11 | else if ( a == H && b == D ){ | ^ a.cc: At global scope: a.cc:22:3: error: 'cou...
s501075562
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ char a, b; cin >> a >> b; if((a=='H'&&b=='H')||(a=='D'&&a¥b=='D')){ cout << 'H' << endl; } else { cout << 'D' << endl; } }
a.cc:6:33: error: extended character ¥ is not valid in an identifier 6 | if((a=='H'&&b=='H')||(a=='D'&&a¥b=='D')){ | ^ a.cc: In function 'int main()': a.cc:6:33: error: 'a\U000000a5b' was not declared in this scope 6 | if((a=='H'&&b=='H')||(a=='D'&&a¥b=='D')){ | ...
s961055266
p03777
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; int main(){ char a,b; cin>>a>>b; if(a=='D'){ if(b=='D')cout<<'H'<<endl; else cout<<'D'<<endl; } else cour<<b<<endl; }
a.cc: In function 'int main()': a.cc:11:8: error: 'cour' was not declared in this scope 11 | else cour<<b<<endl; | ^~~~
s915120401
p03777
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; int main(){ bool h=true; char a,b; cin>>a>>b; if(a=='D'){ if(b=='D')cout<<'H'<<endl; else cout<<'D'<<endl; } else cour<<b<<endl; }
a.cc: In function 'int main()': a.cc:12:8: error: 'cour' was not declared in this scope 12 | else cour<<b<<endl; | ^~~~
s526832634
p03777
C++
#include<iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if ((a=="H" && b=="H") ||(a=="D" && b=="D")){ cout<<"H"<<endl; }else{ cout<<"D"<<endl; } }
a.cc: In function 'int main()': a.cc:6:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | if ((a=="H" && b=="H") ||(a=="D" && b=="D")){ | ~^~~~~ a.cc:6:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | if ((a=="H" && b==...
s392567574
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a,b; cin>>a>>b; if(b=='H'){ cout<<a<<end;: } else if(b=='D'&&a=='D'){ cout<<'H'<<endl; } else if(b=='D'&&a=='H'){ cout<<'D'<<endl; } }
a.cc: In function 'int main()': a.cc:7:12: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 7 | cout<<a<<end;: | ~~~~~~~^~~~~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstre...
s754890232
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a,b; cin>>a>>b; if(b=='H'){ cout<<a<<end;: } else if(b=='D'&&a=='D'){ cout<<'H'<<endl; } else if(b=='D'&&a=='H'){ cout<<'D'<<endl; } }
a.cc: In function 'int main()': a.cc:7:12: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 7 | cout<<a<<end;: | ~~~~~~~^~~~~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstre...
s689178780
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a,b; if(b=='H'){ cout<<a<<end;: } else if(b=='D'&&a=='D'){ cout<<'H'<<endl; } else if(b=='D'&&a=='H'){ cout<<'D'<<endl; } }
a.cc: In function 'int main()': a.cc:6:12: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 6 | cout<<a<<end;: | ~~~~~~~^~~~~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/14/sstre...
s680774735
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a,b; if(b=='H'){ cout<<a<<end;: } else if(b=='D'&&a=='D'){ cout<<'H'<<endl; } else if(b=='D'&&a=='H'){ cout<<'D'<<endl; } }
a.cc:9:3: error: extended character   is not valid in an identifier 9 | else if(b=='D'&&a=='D'){ | ^ a.cc: In function 'int main()': a.cc:6:12: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 6 | cout<<a<<end;: | ...
s167868070
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a,b; if(b=='H'){ cout<<a<<end;: } else if(b=='D'&&a=='D'){ cout<<'H'<<endl; } else if(b=='D'&&a=='H'){ cout<<'D'<<endl; } }
a.cc:9:3: error: extended character   is not valid in an identifier 9 | else if(b=='D'&&a=='D'){ | ^ a.cc: In function 'int main()': a.cc:6:12: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 6 | cout<<a<<end;: | ...
s831949464
p03777
C++
#include<bits/std++.h> using namespace std; int main(){ char a,b; if(b=='H'){ cout<<a<<end;: } else if(b=='D'&&a=='D'){ cout<<'H'<<endl; } else if(b=='D'&&a=='H'){ cout<<'D'<<endl; } }
a.cc:1:9: fatal error: bits/std++.h: No such file or directory 1 | #include<bits/std++.h> | ^~~~~~~~~~~~~~ compilation terminated.
s696142448
p03777
C++
#include <iostream> using namespace std; int main(){ int a; //文字列a int b; //文字列b cin >> a >> b; if (a == "H" && b == "H"){ cout << "H" << endl; } else if (a == "H" && b == "D"){ cout << "D" << endl; } else if (a == "D" && b == "D"){ cout << "H" << endl; } el...
a.cc: In function 'int main()': a.cc:11:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if (a == "H" && b == "H"){ | ~~^~~~~~ a.cc:11:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if (a == "H" && b == "H"){ |...
s229844535
p03777
C++
#inlcude<bits/stdc++.h> using namespace std; int main(){ char a,b; cin >> a >> b; if(b == 'H'){ if(a == 'H'){ cout << 'H' << endl; } else if(b == 'D'){ cout << 'D' << endl; } } else if(b == 'D'){ if(a == 'H'){ cout << 'D' << endl; } else if(b == 'D'){ ...
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include? 1 | #inlcude<bits/stdc++.h> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:6:13: error: 'cin' was not declared in this scope 6 | char a,b; cin >> a >> b; | ^~~ a.cc:1:1: note: 'std::cin'...
s782870637
p03777
C++
#include <iostream> #include <cstdlib> #include <string> #include <algorithm> using namespace std; int comp(const void* a, const void* b){ return *(int*)a - *(int*)b; } int main() { char a, b; cin >> a >> b; if(a == 'H'){ if(b == 'H'){ cout << "H" << endl; }else{ cout << "D" << endl; } }else{ if(b ...
a.cc: In function 'int main()': a.cc:26:2: error: expected '}' at end of input 26 | } | ^ a.cc:11:12: note: to match this '{' 11 | int main() { | ^
s241485364
p03777
C++
#include <algorithm> #include <cmath> #include <iostream> #include <iomanip> #include <map> #include <numeric> #include <set> #include <string> #include <vector> using namespace std; using LLONG = long long; int main() { LLONG N; cin >> N; LLONG power = 1; for (LLONG i = 1; i <= N; ++i) { ...
a.cc:27:2: error: stray '#' in program 27 | }#include <algorithm> | ^ a.cc:27:3: error: 'include' does not name a type 27 | }#include <algorithm> | ^~~~~~~ a.cc:40:5: error: redefinition of 'int main()' 40 | int main() | ^~~~ a.cc:14:5: note: 'int main()' previously defined here 14 ...
s217523343
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a,b; cin >> a >> b; char ans; if(a == 'H'){ ans = b; }else{ if(b == 'H'){ ans = 'D' }else{ ans = 'H' } } cout << ans << endl; }
a.cc: In function 'int main()': a.cc:12:22: error: expected ';' before '}' token 12 | ans = 'D' | ^ | ; 13 | }else{ | ~ a.cc:14:22: error: expected ';' before '}' token 14 | ans = 'H' | ...
s561112844
p03777
C++
#include <iostream> #include <string> using namespace std; int main(){ char a,b; cin>>a>>b; if(a == 'H'){ if(b == 'H'){ cout<<"H"<<endl; return 0; } else{ cout<<"D"<<endl; return 0; }else { if(b =='H'){ cout<<"D"<<endl; return 0; } else{ cout...
a.cc: In function 'int main()': a.cc:14:6: error: expected '}' before 'else' 14 | }else { | ^~~~ a.cc:7:15: note: to match this '{' 7 | if(a == 'H'){ | ^
s608036875
p03777
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { char c,d; cin>>c>>d; if(c!=d) cout<<"D"<<endl; else cour<<"H"<<endl; }
a.cc: In function 'int main()': a.cc:9:8: error: 'cour' was not declared in this scope 9 | else cour<<"H"<<endl; | ^~~~
s114539282
p03777
C++
#include <stdio.h> int main() { char i,j,k; scanf("%c",&i); scanf("%c", &j); scanf_("%c", &k); if (i == 'H') { printf("%c\n",k); } else { if (k == 'H') { printf("D\n"); } else { printf("H\n"); } } return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'scanf_' was not declared in this scope; did you mean 'scanf'? 8 | scanf_("%c", &k); | ^~~~~~ | scanf
s016089329
p03777
C++
#include <bits/stdc++.h> #include <numeric> #include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ char a,b,x; cin >> a >> b; if(a=='H') x=b; else if(a=='D'&&b=='H') x='D'; else x='H' cout << x << endl; }
a.cc: In function 'int main()': a.cc:13:15: error: expected ';' before 'cout' 13 | else x='H' | ^ | ; 14 | cout << x << endl; | ~~~~
s630802171
p03777
C++
#include <iostream> using namespace std; int main() { char a, b; cin >> a >> b; if(a == b) cout << 'H' else cout << 'D'; }
a.cc: In function 'int main()': a.cc:8:25: error: expected ';' before 'else' 8 | if(a == b) cout << 'H' | ^ | ; 9 | else cout << 'D'; | ~~~~
s064178515
p03777
C++
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <string> #include <list> #include <queue> using namespace std; int inf = (1 << 30); int mod = 1e9 + 7; int64_t inf64 = (1LL << 60); template <typename T> T gcd(T a, T b) { if(b == 0) return a; else return gcd(b, ...
a.cc: In function 'int main()': a.cc:47:13: error: 'H' was not declared in this scope 47 | if(a == H && b == H) cout << "H" << endl; | ^ a.cc:48:28: error: 'D' was not declared in this scope 48 | else if(a == H && b == D) cout << "D" << endl; | ^
s638646400
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { char a, b; cin >> a >> b; if((a == "H" && b == "H") || (a == "D" && b == "D")){ cout << "H" << endl; } else{ cout << "D" << endl; } }
a.cc: In function 'int main()': a.cc:8:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if((a == "H" && b == "H") || (a == "D" && b == "D")){ | ~~^~~~~~ a.cc:8:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if((a == "H" && ...
s089583506
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { char a, b; int ans; cin >> a >> b; if (a=='H'){ ans=1 } else{ ans=2 } if (b=='H'){ ans=ans*1 } else{ ans=ans*2 } if (ans==1 || ans==4){ cout >> "H" >> endl; } else{ cout >> "D" >> endl; } }
a.cc: In function 'int main()': a.cc:9:10: error: expected ';' before '}' token 9 | ans=1 | ^ | ; 10 | } | ~ a.cc:12:10: error: expected ';' before '}' token 12 | ans=2 | ^ | ; 13 | } | ~ a.cc:15:14: error...
s748297640
p03777
C++
#include <iostream> #include <algorithm> #include <math.h> #include <stdio.h> using namespace std; int main(){ char a, b; cin>a>>b; if(a==b){ cout<<"H"<<endl; } else{ cout<<"D"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:8: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 9 | cin>a>>b; | ~~~^~~~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:9:8: note: candidate: 'o...
s619234902
p03777
C++
#include <iostream> #include <string> using namespace std; int main() { char a, b; cin >> a >> b; if(a == 'H') else if(b == 'H') b = 'D'; else b = 'H'; cout << b << endl; }
a.cc: In function 'int main()': a.cc:8:3: error: expected primary-expression before 'else' 8 | else if(b == 'H') b = 'D'; | ^~~~
s451193800
p03777
C++
#include <iostream> using namespace std; int main() { char a, b; cin >> a >> b; if(a == 'H') else if(b == 'H') b = 'D'; else b = 'H'; cout << b << endl; }
a.cc: In function 'int main()': a.cc:7:3: error: expected primary-expression before 'else' 7 | else if(b == 'H') b = 'D'; | ^~~~