submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s539897525
p03777
C++
#include <iostream> #include <string> using namespace std; int main(){ string a,b; cin>>a>>b; if(a=="H"){ cout<<b<<endl; return 0; }else{ if(b=="H"){ cout<<"D"<<endl; }else { cout<<"H"<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:6:11: note: to match this '{' 6 | int main(){ | ^
s228105763
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b;cin<<a<<b; if(a == b) cout<<'H'<<endl; else cout<<'D'<<endl; }
a.cc: In function 'int main()': a.cc:5:14: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 5 | int a,b;cin<<a<<b; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>...
s440372757
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ char A,B; cin >> A >> B; if(A==B){ cout << H << endl; } else{ cout << D << endl; } }
a.cc: In function 'int main()': a.cc:8:13: error: 'H' was not declared in this scope 8 | cout << H << endl; | ^ a.cc:11:13: error: 'D' was not declared in this scope 11 | cout << D << endl; | ^
s095338089
p03777
C++
#include <iostream> using namespace std; int main(void){ int a, b; cin >> a >> b; if(a==H,b==D) cout << "D" << endl; else if (a==D,b==H) cout << "D" << endl; else cout << "H" << endl; }
a.cc: In function 'int main()': a.cc:6:11: error: 'H' was not declared in this scope 6 | if(a==H,b==D) | ^ a.cc:6:16: error: 'D' was not declared in this scope 6 | if(a==H,b==D) | ^
s708703937
p03777
C++
#include <iostream> using namespace std; int main(void){ int a, b; cin >> a >> b; if(a==b) cout << "H" << endl; else if(a==H,b==D) cout << "D" << endl; else cout << "D" << endl; }
a.cc: In function 'int main()': a.cc:8:16: error: 'H' was not declared in this scope 8 | else if(a==H,b==D) | ^ a.cc:8:21: error: 'D' was not declared in this scope 8 | else if(a==H,b==D) | ^
s136587332
p03777
C++
#include <iostream> using namespace std; int main(void){ int a, b; cin >> a >> b; if(a==b) cout << "H" << endl; else if(a==H,b==D) cout << "D" << endl; else if cout << "D" << endl; }
a.cc: In function 'int main()': a.cc:8:16: error: 'H' was not declared in this scope 8 | else if(a==H,b==D) | ^ a.cc:8:21: error: 'D' was not declared in this scope 8 | else if(a==H,b==D) | ^ a.cc:11:9: error: expected '(' before 'cout' 11 | cout...
s246744006
p03777
C++
#include<iostream> #include<bits/stdc++.h> using namespace std; int main() { int a,b; cin >> a >> b; if(a == "H") { if(b == "H") { cout << "H"; } else { cout << "D"; } } else { if(b == "H") ...
a.cc: In function 'int main()': a.cc:13:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | if(a == "H") | ~~^~~~~~ a.cc:15:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 15 | if(b == "H") | ~~^~~~~~ a.cc...
s771310683
p03777
C
#include<stdio.h> int main() { char a,b; scanf("%c%c",&a,&b); if(a=='H')printf("%c\n",b); else if((a=='D')&&(b=='H'))printf("D\n"); else if((a=='D')&&(b=='D'))printf("H\n"); retunr 0; }
main.c: In function 'main': main.c:13:2: error: 'retunr' undeclared (first use in this function) 13 | retunr 0; | ^~~~~~ main.c:13:2: note: each undeclared identifier is reported only once for each function it appears in main.c:13:8: error: expected ';' before numeric constant 13 | retunr 0; | ...
s782810183
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { char a,b; cin >> a >>b; if(a==b){ cout << 'H' << endl; else{ cout << 'F' << endl; } }
a.cc: In function 'int main()': a.cc:9:3: error: expected '}' before 'else' 9 | else{ | ^~~~ a.cc:7:11: note: to match this '{' 7 | if(a==b){ | ^
s340198178
p03777
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); char a=sc.next().charAt(0),b=sc.next().charAt(0); int na=0;nb=0; if(a=='H'){ na=1; }else{na=-1;} if(b=='D'){ nb=1; }else{nb=-1;} if(a*b>0){ System.out...
Main.java:8: error: cannot find symbol int na=0;nb=0; ^ symbol: variable nb location: class Main Main.java:13: error: cannot find symbol nb=1; ^ symbol: variable nb location: class Main Main.java:14: error: cannot find symbol }else{nb=-1;} ^ symbol: variable nb...
s253023754
p03777
C++
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vec; typedef vector<vec> mat; typedef pair<ll,ll> pll; const ll mod=1e9+7; //const ll mod=998244353; const ll inf=1LL<<61; int main() { char a,b; cin >> a >> b; if((a=='H'&&b=='H'||(a=='D'&&b=='D')) { cout << "H" << endl; ...
a.cc: In function 'int main()': a.cc:14:40: error: expected ';' before '{' token 14 | if((a=='H'&&b=='H'||(a=='D'&&b=='D')) { | ^~ | ; a.cc:17:3: error: expected primary-expression before 'else' 17 | else cout << "D" << ...
s364645311
p03777
C++
#include <iostream> #include <bitset> #include <vector> #include <string> #include <algorithm> #include <set> #include <map> using namespace std; using ll = long long int; using dd = long double; const ll MOD = 1e9 + 7; vector<string> dfs(string s, ll depth, vector<char> symbol) { vector<string> ret; if (depth...
a.cc: In function 'int main()': a.cc:56:11: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 56 | if (a == 'H' && b == 'D') { | ~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx...
s437510798
p03777
C++
#include <iostream> #include <map> #include <algorithm> #include <vector> #include <iomanip> #include <sstream> #include <cmath> #include <math.h> #include <string> using namespace std; typedef long long ll; typedef double d; typedef int i; int main() { ios::sync_with_stdio(false); cin.tie(0); char a , b; ...
a.cc: In function 'int main()': a.cc:20:38: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'char') 20 | if ( a == 'D' || b == 'D' ) cout >> 'D'; | ~~~~ ^~ ~~~ | | | | ...
s217008445
p03777
C++
#include <bits/stdc++.h> using namespace std; int main () { char a, b; cin >> a >> b; if (a == 'H' && b== 'H') { cout << "H" << endl; } else if (a=='H' && b=='D') cout << 'D' << endl; else if (b == 'D' && b == 'D') cout << 'H' << endl; else if (b == 'D' && b == 'H') cout << 'D' << endl else assert(false...
a.cc: In function 'int main()': a.cc:15:36: error: expected ';' before 'else' 15 | cout << 'D' << endl | ^ | ; 16 | else assert(false); | ~~~~
s484272810
p03777
C++
#include <bits/stdc++.h> using namespace std; #define ll long long int #define rep(i, n) for(int i = 0; i < n; i++) #define sort(v) sort((v).begin(), (v).end()) using vi = vector<int>; const int MOD = 1e9+7; bool IsPrime(int num){ if (num < 2) return false; else if (num == 2) return true; else if (num %...
a.cc: In function 'int main()': a.cc:22:14: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 22 | if(a == 'H'&&b=='H') cout<<"H"<<endl; | ~ ^~ ~~~ | | | | | char | s...
s979452672
p03777
C++
include <bits/stdc++.h> using namespace std; #define ll long long int #define rep(i, n) for(int i = 0; i < n; i++) #define sort(v) sort((v).begin(), (v).end()) using vi = vector<int>; const int MOD = 1e9+7; bool IsPrime(int num){ if (num < 2) return false; else if (num == 2) return true; else if (num % ...
a.cc:1:1: error: 'include' does not name a type 1 | include <bits/stdc++.h> | ^~~~~~~ a.cc:7:12: error: 'vector' does not name a type 7 | using vi = vector<int>; | ^~~~~~ a.cc: In function 'bool IsPrime(int)': a.cc:14:22: error: 'sqrt' was not declared in this scope; did you mean 'sort'? ...
s715745698
p03777
C++
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define PI 3.14159265358979323846 constexpr int INF = numeric_limits<int>::max() / 2; constexpr long long INFL = numeric_limits<long long>::max() / 2; constexpr int MOD = 1000000007; using Graph = vector<vector<int>>; ...
a.cc: In function 'int main()': a.cc:18:15: error: expected ';' before 'cout' 18 | if((a==b ) cout << 'H' << endl; | ^~~~~ | ; a.cc:19:5: error: expected primary-expression before 'else' 19 | else cout << 'D' << endl; | ^~~~ a.cc:18:36: error: expected ')'...
s527486262
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=='D'&&b=='D'){ cout<<"H"<<endl; } else if(a=='H'&&b=='D'){ cout<<"D"<<endl; } else if(a=='D'&&b=='H'){ cout<<"D"<<endl; }
a.cc: In function 'int main()': a.cc:18:4: error: expected '}' at end of input 18 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s257372630
p03777
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String a = sc.nextInt(); String b = sc.nextInt(); if(a.equals("H")){ System.out.println(b); } if(a.equals("D") && b.equals("D"...
Main.java:5: error: incompatible types: int cannot be converted to String String a = sc.nextInt(); ^ Main.java:6: error: incompatible types: int cannot be converted to String String b = sc.nextInt(); ^ 2 errors
s618880668
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=='D' && b=='D'){ cout << 'H'; }else{ cout < 'D'; } }
a.cc: In function 'int main()': a.cc:11:10: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'char') 11 | cout < 'D'; | ~~~~ ^ ~~~ | | | | | char | std::ostream {aka std::basic_ostream<char>} a.cc:11:10: note:...
s759650873
p03777
C++
#include <bits/stdc++.h> #define range(i, l, r) for(long long int (i) = (l); (i) < (r); (i)++) #define reversed_range(i, l, r) for (long long int (i) = (r) - 1; (i) >= l; (i)--) using namespace std; template <typename T> using vec = vector<T>; using lint = long long; using ulint = unsigned long long; using pint = pair<...
a.cc: In function 'int main()': a.cc:97:73: error: expected primary-expression before '?' token 97 | cout << ((a == 'H' and b == 'H') or (a == 'D' and b == 'D') ? 'H' : ? 'D') << "\n"; | ^ a.cc:97:78: error: expected ':' before ')' tok...
s875072661
p03777
C++
#include<bits/stdc++.h> using namespace std; int main() { char a, b; cin >> a >> b; map<char, char> d; d['H'] = 'D'; d[D] = 'H'; cout << ((a == 'H') ? b : d.at(b)) << endl; }
a.cc: In function 'int main()': a.cc:4:64: error: 'D' was not declared in this scope 4 | char a, b; cin >> a >> b; map<char, char> d; d['H'] = 'D'; d[D] = 'H'; | ^
s881051084
p03777
C++
#include<bits/stdc++.h> using namespace std; int main){ char a,b;cin>>a>>b; cout<<(a==b?'H':'D'); }
a.cc:3:9: error: expected initializer before ')' token 3 | int main){ | ^
s775634780
p03777
C++
#pragma region #include <bits/stdc++.h> using namespace std; inline void ci(void){ return; } template <typename First, typename... Rest> void ci(First& first, Rest&... rest){ cin >> first; ci(rest...); return; } inline void co(void){ cout << "\n"; return; } template <typename First, typename... Rest> void c...
a.cc: In function 'int main()': a.cc:66:12: error: expected ';' before '}' token 66 | co('D') | ^ | ; 67 | } | ~
s623738150
p03777
C++
#include <iostream> #include <string> using namespace std; int main(){ string a,b; cin >> a >> b; if(a == 'H' and b == 'H') cout << 'H' << endl; if(a == 'H' and b == 'D') cout << 'D' << endl; if(a == 'D' and b == 'H') cout << 'D' << endl; if(a == 'D' and b == 'D') cout << 'H' << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 8 | if(a == 'H' and b == 'H') cout << 'H' << endl; | ~ ^~ ~~~ | | | | | char | std::string {aka std::__...
s602316805
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a,b; cin>>a>>b; if(a=='H'){ cout<<b<<endl; } if(a=='D'&&b=='H'){ cout<<'D'<<endl; } if(a=='D'&&b=='D'){ cout<<'H'<<endl; } }
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'){ | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} In file includ...
s066634950
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:9:60: error: expected ')' before '{' token 9 | if ( ( a == 'H' && b == 'H' ) || ( a == 'D' && b == 'D' ){ | ~ ^ | ) a.cc:15:1: error: expected primar...
s414061590
p03777
C++
#include<iostream> using namespace std; int main(){ char a,b; cin >> a >> b; if(a == 'H') cout << d << endl; else cout << (a=='H'?'D':'H') << endl; }
a.cc: In function 'int main()': a.cc:5:24: error: 'd' was not declared in this scope 5 | if(a == 'H') cout << d << endl; | ^
s426853623
p03777
C++
#include<iostream> using namespace std; int main(){ char a,b; cin >> a >> b; if(a == 'H') cout << d << endl; else cout << (d=='H'?'D':'H') << endl; }
a.cc: In function 'int main()': a.cc:5:24: error: 'd' was not declared in this scope 5 | if(a == 'H') cout << d << endl; | ^ a.cc:6:17: error: 'd' was not declared in this scope 6 | else cout << (d=='H'?'D':'H') << endl; | ^
s649466286
p03777
C++
#include<iostream> using namespace std; int main() { char a, b; cin >> a >> b; if(b == 'H') { if(a == 'H') cout << "H"; else << "D"; } if(b == 'D') { if(a == 'D') cout << "H"; else cout << "D"; } return 0; }
a.cc: In function 'int main()': a.cc:11:10: error: expected primary-expression before '<<' token 11 | else << "D"; | ^~
s128538237
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=='D' && b=='D') cout<<'H'<<endl; else if(a=='D' && b=='H') cout<<'D'<<endl; else if(a=='H' && b=='D') cout<<'D'<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 7 | if(a=='H' && b=='H') | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} In fi...
s845886769
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=='D' && b=='D') cout<<'H'<<endl; else if(a=='D' && b=='H') cout<<'D'<<endl; else if(a=='H' && b=='D') cout<<'D'<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: expected ';' before 'if' 6 | cin>>a>>b | ^ | ; 7 | if(a=='H' && b=='H') | ~~ a.cc:9:3: error: 'else' without a previous 'if' 9 | else if(a=='D' && b=='D') | ^~~~ a.cc:9:12: error: no match for '...
s272655570
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=='D' && b=='D') cout<<'H'<<endl; else if(a=='D' && b=='H') cout<<'D'<<endl; else if(a=='H' && b=='D') cout<<'D'<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: expected ';' before 'if' 6 | cin>>a>>b | ^ | ; 7 | if(a=='H' && b=='H') | ~~ a.cc:9:3: error: 'else' without a previous 'if' 9 | else if(a=='D' && b=='D') | ^~~~ a.cc:9:12: error: no match for '...
s483960009
p03777
C++
#include<bits/stdc++.h> using namespace std; int main() { char a,b; cin>>a>>b; 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' ; return 0; }
a.cc: In function 'int main()': a.cc:9:11: error: lvalue required as left operand of assignment 9 | if(a=='H' && b="H") | ~~~~~~~^~~~ a.cc:11:11: error: lvalue required as left operand of assignment 11 | if(a=='H' && b="D") | ~~~~~~~^~~~ a.cc:13:19: error: lvalue required as left operand of ass...
s868174266
p03777
C++
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> #define IO(i, o) freopen(i, "r", stdin), freopen(o, "w", stdout) using namespace std; using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set; m...
a.cc: In function 'int main()': a.cc:18:55: error: lvalue required as left operand of assignment 18 | cout << (((a == 'H' && b == 'H') || (a == 'D' && b = 'D')) ? "H\n" : "D\n"); | ~~~~~~~~~^~~~
s662953475
p03777
C++
#include<iostream> using namespace std; #define f(i,a,b) for(int i=(int)(a);i<=(int)(b);i++) #define char_f(i,a) for(int i=(int)(a);(char)s[i]!='\0';i++) #define rf(i,a,b) for(int i=(int)(a);i>=(int)(b);i--) #define llf(i,a,b) for(long long int i=(long long int)(a);i<=(long long int)(b);i++) #define llrf(i,a,b) for(l...
a.cc: In function 'int main()': a.cc:20:16: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 20 | #define b begin() | ^~ a.cc:102:26: note: in expansion of macro 'b' 102 | char s[100000],a,b; | ^ a.cc:20:16: note: r...
s858152580
p03777
C++
#include<iostream> using namespace std; #define f(i,a,b) for(int i=(int)(a);i<=(int)(b);i++) #define char_f(i,a) for(int i=(int)(a);(char)s[i]!='\0';i++) #define rf(i,a,b) for(int i=(int)(a);i>=(int)(b);i--) #define llf(i,a,b) for(long long int i=(long long int)(a);i<=(long long int)(b);i++) #define llrf(i,a,b) for(l...
a.cc:71:11: error: 'acos' was not declared in this scope 71 | double PI=acos(-1); | ^~~~ a.cc: In function 'int main()': a.cc:20:16: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 20 | #define b begin() | ^~ a.cc:102:26: note: in expan...
s407080805
p03777
C++
#include<bits\stdc++.h> using namespace std; #define f(i,a,b) for(int i=(int)(a);i<=(int)(b);i++) #define char_f(i,a) for(int i=(int)(a);(char)s[i]!='\0';i++) #define rf(i,a,b) for(int i=(int)(a);i>=(int)(b);i--) #define llf(i,a,b) for(long long int i=(long long int)(a);i<=(long long int)(b);i++) #define llrf(i,a,b) ...
a.cc:1:9: fatal error: bits\stdc++.h: No such file or directory 1 | #include<bits\stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s916191652
p03777
C++
#include <bits/stdc++> using namespace std; int main(){ string a,b; cin>>a>>b; if(a==b){ cout<<"H"<<endl; } else{ cout<<"D"<<endl; } }
a.cc:1:10: fatal error: bits/stdc++: No such file or directory 1 | #include <bits/stdc++> | ^~~~~~~~~~~~~ compilation terminated.
s092002048
p03777
C++
#include <bits/stdc++.h> using namespace std; using ll=long long; const ll MOD=1000000007; int main() { stirng a,b; cin >> a >> b; if(a==b) cout << "H" << endl; else cout << "D" << endl; }
a.cc: In function 'int main()': a.cc:8:3: error: 'stirng' was not declared in this scope 8 | stirng a,b; | ^~~~~~ a.cc:9:10: error: 'a' was not declared in this scope 9 | cin >> a >> b; | ^ a.cc:9:15: error: 'b' was not declared in this scope 9 | cin >> a >> b; | ...
s304942167
p03777
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; using P = pair<int,int>; int main(void) { 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') cou...
a.cc: In function 'int main()': a.cc:12:11: error: 'H' was not declared in this scope 12 | cout << H << endl; | ^ a.cc:14:11: error: 'D' was not declared in this scope 14 | cout << D << endl; | ^ a.cc:16:12: error: 'D' was not declared in this scope 16 | cout << D << endl...
s284534365
p03777
C++
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; using P = pair<int,int>; int main(void) { 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') ...
a.cc: In function 'int main()': a.cc:17:25: error: expected ';' before 'cout' 17 | else (a=='D' && b =='D') | ^ | ; 18 | cout << 'H' << endl; | ~~~~
s811850107
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ char a,b; cin >> a >> b; if(a == 'D' && b == 'H'){ b == 'D'; } else if(a == 'D' && b == 'D'){ b == 'H' } printf("%c\n",b); return 0; }
a.cc: In function 'int main()': a.cc:11:13: error: expected ';' before '}' token 11 | b == 'H' | ^ | ; 12 | } | ~
s019578830
p03777
C++
#include <iostream> using namespacr std; int main () { char A,B ; cin>>A>>B; if (A==B) cout << "H"; else cout << "D" ; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'namespacr' 2 | using namespacr std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>A>>B; | ^~~ | std::cin In file included from a.cc:1: /usr/inclu...
s872806639
p03777
C++
include<iostream> using namespace std; int main(){ char 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; } return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:5:3: error: 'cin' was not declared in this scope 5 | cin>>a>>b; | ^~~ a.cc:7:15: error: 'cout' was not declared in this scope 7 | if(b=='H')cout<<'H'<<endl; | ...
s610168002
p03777
C++
int main() { char a, b; cin >> a >> b; if (a=='H' && b=='H') cout << "H\n"; else if (a=='H' && b=='D') cout << "D\n"; if (a=='D' && b=='H') cout << "D\n"; else if (a=='D' && b=='D') cout << "H\n"; }
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:27: error: 'cout' was not declared in this scope 4 | if (a=='H' && b=='H') cout << "H\n"; | ^~~~ a.cc:5:32: error: 'cout' was not declared in th...
s870957681
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 cout << 'H' << endl; }
a.cc: In function 'int main()': a.cc:8:21: error: lvalue required as left operand of assignment 8 | if( a = 'H' && b = 'H' ) cout << 'H' << endl; | ~~~~^~~~ a.cc:9:26: error: lvalue required as left operand of assignment 9 | else if( a = 'H' && b = 'D' ) cout << 'D' << endl...
s371218075
p03777
C++
#include <iostream> #include <cstdio> using namespace std; int main() { string a, b; cin >> a >> b; if ( equal(a,b) ){ cout<<'H'; }else cout<<'D'; return 0; }
a.cc: In function 'int main()': a.cc:7:14: error: no matching function for call to 'equal(std::string&, std::string&)' 7 | equal(a,b) | ~~~~~^~~~~ In file included from /usr/include/c++/14/string:51, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr...
s177490116
p03777
C++
#include <iostream> #include <cstdio> using namespace std; int main() { string a, b; cin >> a >> b; if ( a.equal(b) ){ cout<<'H'; }else cout<<'D'; return 0; }
a.cc: In function 'int main()': a.cc:7:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'equal' 7 | a.equal(b) | ^~~~~
s210973888
p03777
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string A,B; cin >> A >> B; if(A==H && B==H || A==H && B==D){ cout << B << endl; } else if(A==D && B==H){ cout << "D" << endl; } else{ cout << "H" << endl; } }
a.cc: In function 'int main()': a.cc:9:15: error: 'H' was not declared in this scope 9 | if(A==H && B==H || A==H && B==D){ | ^ a.cc:9:39: error: 'D' was not declared in this scope 9 | if(A==H && B==H || A==H && B==D){ | ^
s679025034
p03777
C
#include <stdio.h> int main(void) { char a, b; scanf("%c%c", &a, &b); if(a == 'H') { printf("%c", b); } else { if(b == 'H') { printf("D"); else { printf("H"); } } return 0; }
main.c: In function 'main': main.c:15:17: error: expected '}' before 'else' 15 | else { | ^~~~
s711412676
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { char a,b; cin>>a>>b; printf(a==b?"H","D"); }
a.cc: In function 'int main()': a.cc:7:28: error: expected ':' before ')' token 7 | printf(a==b?"H","D"); | ^ | : a.cc:7:28: error: expected primary-expression before ')' token
s920429985
p03777
C++
#include<bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); char a, b; cin >> a >> b; if(a == 'H') cout << b << endl; else cout << (b == 'H')? 'D': 'H'<< endl; return 0; }
a.cc: In function 'int main()': a.cc:13:33: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator<<' 13 | cout << (b == 'H')? 'D': 'H'<< endl; | ~~~^~~~~~~
s674987943
p03777
C
#include <bits/stdc++.h> #define rep(i,n) for(int64_t i=0;i < (int64_t)(n);i++) using namespace std; //////全探索したいときに開けよ//////// vector<vector<int>> fspattern; vector<int> fspattern_draft; int fspcnt = 0; void setfspattern_core(int floor,int number,int degree){ if(floor==degree){ fspattern.at(fspcnt) = fspattern...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s507646960
p03777
C++
import sys sys.setrecursionlimit(10 ** 6) int1 = lambda x: int(x) - 1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(ro...
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s091729308
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:10:27: error: 'A' was not declared in this scope 10 | if((a=='H'&&b=='H')||(A=='D'&&b=='D')){ | ^
s895713543
p03777
C++
ERROR: type should be string, got "https://atcoder.jp/contests/abc056/clarifications#include<stdio.h>\nint main()\n{\n int a,b;\n scanf(\"%c %c\",&a,&b);\n if(a==72){\n printf(\"%c\",b);\n }\n else if(a==68){\n if(b==72){\n printf(\"D\");\n }\n else{\n printf(\"H\");\n }\n }\n else {\n printf(\"\\n\");\n }\n return 0;\n}\n"
a.cc:1:1: error: 'https' does not name a type 1 | https://atcoder.jp/contests/abc056/clarifications#include<stdio.h> | ^~~~~
s745299889
p03777
C++
a, b = tuple(input().split()) def judge(): def sub_judge1(): if a == 'H': return True else: return False def sub_judge2(): if b == 'H': return True else: return False if sub_judge2(): return sub_judge1() else: ...
a.cc:1:1: error: 'a' does not name a type 1 | a, b = tuple(input().split()) | ^
s639943054
p03777
C++
#include <bits/stdc++.h> using namwspace 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=='H'){ cout<<'D'<<endl; } else if(b=='D'){ cout<<'H'<<endl; } } retu...
a.cc:2:7: error: expected nested-name-specifier before 'namwspace' 2 | using namwspace std; | ^~~~~~~~~ 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 /usr/include...
s874552619
p03777
C++
#include <stdlib.h> #include <bits/stdc++.h> #include <math.h> using namespace std; using ll=long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) inline constexpr ll gcd(ll a,ll b){if(!a||!b)return 0;while(b){ll c=b;b=a%b;a=c;}return a;} inline constexpr ll lcm(ll a,ll b){if(!a||!b)return 0;return a*b/gcd(a,...
a.cc: In function 'int main()': a.cc:31:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 31 | if(a=="D"){ | ~^~~~~ a.cc:32:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 32 | if(b=="D"){ | ~^~~~~ a.cc:39:7: error: I...
s070399197
p03777
C++
#include<bits/stdc++.h> using namespace std; { map<char, int> m; m["D"]=0;m["H"]=1; char a,b;cin>>a>>b; if((m[a]^m[b]))cout<<"H"; else cout<<"D"; }
a.cc:3:1: error: expected unqualified-id before '{' token 3 | { | ^
s011410088
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' << end; else cout << 'D' << endl; }else{ if(b=='H') cout << 'D' << endl; else cout << 'H' << endl; } }
a.cc: In function 'int main()': a.cc:9:40: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 9 | if(b=='H') cout << 'H' << end; | ~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/is...
s351494312
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; if(a=='H'){ if(b=='H') cout << 'H' << end; else cout << 'D' << endl; }else{ if(b=='H') cout << 'D' << endl; else cout << 'H' << endl; } }
a.cc: In function 'int main()': a.cc:9:40: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 9 | if(b=='H') cout << 'H' << end; | ~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/is...
s393512453
p03777
C++
#include <bits/stdc++.h> using namespace 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 (a == 'D' && b == 'D') cout << 'H' << endl; }
a.cc: In function 'int main()': a.cc:10:32: error: expected ';' before 'cout' 10 | else (a == 'D' && b == 'D') cout << 'H' << endl; | ^~~~~ | ;
s152208839
p03777
C++
#include <bits/stdc++.h> using namespace std; int main (){ string a,b; cin>>a>>b; if (a=='D'&&b=='D'||a=='H'&&b=='H')cout<<"H"; else if (a=='D'&&b=='H'||a=='H'&&b=='D')cout<<"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=='D'&&b=='D'||a=='H'&&b=='H')cout<<"H"; | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_...
s158012165
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { char T,D; cin>>T>>D; if(T=='H'&&D=='H'){cout<<'H'<<endl;} else if(T=='D'&&D=='H'){cout<<'D'<<endl;} else if(T=='D'&&D=='D'){cout<<'H'<<endl;} else if(T=='H'&&D=='D'){cout<<'D'<<endl;} cout<<ans<<endl; }
a.cc: In function 'int main()': a.cc:14:7: error: 'ans' was not declared in this scope; did you mean 'abs'? 14 | cout<<ans<<endl; | ^~~ | abs
s176471092
p03777
C++
// Created by conan1024hao in 2019. // Copyright © 2019 conan1024hao. All rights reserved. // 専用ライブラリです、自由にコピーして構いません。 // 感谢看我的代码!Wechat:conan1024hao QQ:810396815 #pragma GCC optimize ("O3") #include <iostream> #include <iomanip> #include <istream> #include <ostream> #include <sstream> #include <iterator> #include ...
a.cc:73:24: warning: missing terminating ' character 73 | cout<<'D'<<endl' | ^ a.cc:73:24: error: missing terminating ' character a.cc: In function 'int main()': a.cc:73:24: error: expected ';' before 'return' 73 | cout<<'D'<<endl' | ^ ...
s477280779
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ char a, b; cin >> a >> b; if(a == H) cout << b; else { if(b == H) cout << 'D' << endl; else cout << 'H' << endl; } }
a.cc: In function 'int main()': a.cc:9:11: error: 'H' was not declared in this scope 9 | if(a == H) cout << b; | ^
s270010561
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ char A, B; cin >> A >> B; if (A=='H'){ cout << B << end; } else { if (B=='H'){ cout << 'D' << endl; } else { cout << 'H' << endl; } } }
a.cc: In function 'int main()': a.cc:10:15: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 10 | cout << B << end; | ~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/istream:41, from /usr/include/c++/...
s105046388
p03777
C++
#include <iostream> #include<algorithm> using namespace std; int main(void){ string a,b; cin>>a>>b; if(a==H) cout<<"H"<<endl; else(a==D) cout<<"D"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'H' was not declared in this scope 7 | if(a==H) cout<<"H"<<endl; | ^ a.cc:8:9: error: 'D' was not declared in this scope 8 | else(a==D) cout<<"D"<<endl; | ^
s822512476
p03777
C++
#include <iostream> #include<algorithm> using namespace std; int main(void){ string a,b; cin>>a>>b; if(a==H) cout<<"H"<<endl; else(a==D) cout<<"D"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'H' was not declared in this scope 7 | if(a==H) cout<<"H"<<endl; | ^ a.cc:8:9: error: 'D' was not declared in this scope 8 | else(a==D) cout<<"D"<<endl; | ^
s985163674
p03777
C
#include<stdio.h> int main() { char a, b; scanf_s("%s %s",&a,&b); if (a=='H'&&b=='H') { printf("H"); } else if( a == 'D' && b == 'D') { printf("H"); } else { printf("D"); } return 0; }
main.c: In function 'main': main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 6 | scanf_s("%s %s",&a,&b); | ^~~~~~~ | scanf
s407831446
p03777
C++
#include <iostream> #include <locale> using namespace std; int main(void){ // Your code here! char a,b; cin >> a >> b; if(a==H){ cout<< b <<endl; } else{ if(b==H){ cout<< D <<endl; } else{ cout<< H <<endl; } } }
a.cc: In function 'int main()': a.cc:8:11: error: 'H' was not declared in this scope 8 | if(a==H){ | ^ a.cc:13:20: error: 'D' was not declared in this scope 13 | cout<< D <<endl; | ^
s823842946
p03777
C++
#include <iostream> #include <vector> #include <algorithm> #include <string.h> #include <iomanip> #include <map> #include <cstdlib> #include <cctype> #include <ctype.h> #define ll long long char toupper(char c); char toupper(char c) { return (c - 0x20); } using namespace std; int main() { char a, b; cin >>...
a.cc: In function 'int main()': a.cc:21:17: error: 'd' was not declared in this scope 21 | cin >> a >> d; | ^
s096943540
p03777
C++
#include <iostream> #include <vector> #include <algorithm> #include <string.h> #include <iomanip> #include <map> #include <cstdlib> #include <cctype> #include <ctype.h> #define ll long long char toupper(char c); char toupper(char c) { return (c - 0x20); } ll GetDigit(ll num) { char a, d; cin >> a >> d; ...
a.cc: In function 'long long int GetDigit(long long int)': a.cc:19:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 19 | cin >> a >> d; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern is...
s463092900
p03777
C++
#include <iostream> #include <vector> #include <algorithm> #include <string.h> #include <iomanip> #include <map> #include <cstdlib> #include <cctype> #include <ctype.h> #define ll long long char toupper(char c); char toupper(char c) { return (c - 0x20); } ll GetDigit(ll num) { char a, b; cin >> a >> d; ...
a.cc: In function 'long long int GetDigit(long long int)': a.cc:19:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 19 | cin >> a >> d; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern is...
s587966031
p03777
Java
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String a = sc.next(); Atring b = sc.next(); if(a.equals("H") || b.equals("H")) System.out.println("H"); if(a.equals("H") || b.equals("D")) System.out.println("D"); if(a.equals("D") || b....
Main.java:8: error: cannot find symbol Atring b = sc.next(); ^ symbol: class Atring location: class Main 1 error
s075087088
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:4:11: error: expected initializer before '.' token 4 | string a.b; | ^ a.cc:5:10: error: 'a' was not declared in this scope 5 | cin >> a >> b; | ^ a.cc:5:15: error: 'b' was not declared in this scope 5 | cin >> a >> b; | ...
s632492888
p03777
C++
#include <iostram> 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:1:10: fatal error: iostram: No such file or directory 1 | #include <iostram> | ^~~~~~~~~ compilation terminated.
s360661581
p03777
C++
#include<stdio.h> main() { char x,y; scanf("%c %c",&x,&y); if(a==b) printf("H"); else printf("D"); }
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main() | ^~~~ a.cc: In function 'int main()': a.cc:6:12: error: 'a' was not declared in this scope 6 | if(a==b) | ^ a.cc:6:15: error: 'b' was not declared in this scope 6 | if(a==...
s462822401
p03777
C++
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(),(x).end() #define Sort(x) sort((x).begin(), (x).end()) #define Reverse(x) reverse((x).begin(), (x).end()) #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define REP(i, m, n) for(int i = m; i < n; i++) #define INF INT_MAX #define MOD 100000000...
a.cc: In function 'int main()': a.cc:29:10: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 29 | if (a=='H'){cout << b << endl;} | ~^~~~~ | | | | | char | std::string {aka std::__cxx11...
s513235067
p03777
C++
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(),(x).end() #define Sort(x) sort((x).begin(), (x).end()) #define Reverse(x) reverse((x).begin(), (x).end()) #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define REP(i, m, n) for(int i = m; i < n; i++) #define INF INT_MAX #define MOD 100000000...
a.cc: In function 'int main()': a.cc:28:10: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 28 | if (a=='H'){cout << b << endl;} | ~^~~~~ | | | | | char | std::string {aka std::__cxx11...
s203842578
p03777
C++
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(),(x).end() #define Sort(x) sort((x).begin(), (x).end()) #define Reverse(x) reverse((x).begin(), (x).end()) #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define REP(i, m, n) for(int i = m; i < n; i++) #define INF INT_MAX #define MOD 100000000...
a.cc: In function 'int main()': a.cc:28:10: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 28 | if (a=='H'){cout << b << endl;} | ~^~~~~ | | | | | char | std::string {aka std::__cxx11...
s064987776
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:12: error: 'H' was not declared in this scope 6 | if (a == H && b == H || a == D && b == D ) cout << 'H' << endl; | ^ a.cc:6:32: error: 'D' was not declared in this scope 6 | if (a == H && b == H || a == D && b == D ) cout << 'H' << endl; | ...
s348093850
p03777
C++
#include <vector> #include <algorithm> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { char a, b; cin >> a >> b; if (((a == 'H') && (b == 'H')) || ((a == 'D') && (b == 'D'))) { cout << 'H' << '\n'; } else { cout << 'D' << '\n'; } return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'cin' was not declared in this scope 10 | cin >> a >> b; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <algorithm> +++ |+#include <iostream> 3 ...
s467919129
p03777
C++
#include <vector> #include <algorithm> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) int main() { char a, b; cin >> a >> b; if (((a == 'H') && (b == 'H')) || ((a == 'D') && (b == 'D'))) { cout << 'H' << '\n'; } else { cout << 'D' << '\n'; } return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'cin' was not declared in this scope 10 | cin >> a >> b; | ^~~ a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 2 | #include <algorithm> +++ |+#include <iostream> 3 ...
s257344860
p03777
C++
puts [:H,:D][gets.split.uniq.size-1]
a.cc:1:1: error: 'puts' does not name a type 1 | puts [:H,:D][gets.split.uniq.size-1] | ^~~~
s392128989
p03777
C++
#include<iostream> using namespace std; char H, D, a, b; cin >> a >> b >> endl; int main() { 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 (a==D && b==D) {cout << "H" <<endl;} return 0; }
a.cc:5:1: error: 'cin' does not name a type 5 | cin >> a >> b >> endl; | ^~~ a.cc: In function 'int main()': a.cc:11:24: error: expected ';' before '{' token 11 | else (a==D && b==D) {cout << "H" <<endl;} | ^~ | ;
s198606892
p03777
C++
#include<iostream> using namespace std; char H, D, a, b; cin >> a >> endl; cin >> b >> endl; int main() { 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 (a==D && b==D) {cout << "H" <<endl;} return 0; }
a.cc:5:1: error: 'cin' does not name a type 5 | cin >> a >> endl; | ^~~ a.cc:6:1: error: 'cin' does not name a type 6 | cin >> b >> endl; | ^~~ a.cc: In function 'int main()': a.cc:12:24: error: expected ';' before '{' token 12 | else (a==D && b==D) {cout << "H" <<endl;} | ...
s209261330
p03777
C++
#include<iostream> using namespace std; char H, D, a, b; cin >> a >> endl; cin >> b >> endl; int main() { 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 (a==D && b==D) cout << "H" <<endl; return 0; }
a.cc:5:1: error: 'cin' does not name a type 5 | cin >> a >> endl; | ^~~ a.cc:6:1: error: 'cin' does not name a type 6 | cin >> b >> endl; | ^~~ a.cc: In function 'int main()': a.cc:12:24: error: expected ';' before 'cout' 12 | else (a==D && b==D) cout << "H" <<endl; | ...
s870920735
p03777
C++
#include<iostream> using namespace std; char H, D, a, b; cin >> a >> endl; cin >> b >> endl; int main() { if (a == H && b == H) cout << "H" << endl; else if (a==H && b==D) cout << "D" << endl; else if (a==D && b==H) cout << "H" << endl; else (a==D && b==D) cout << "H" <<endl; return 0; }
a.cc:5:1: error: 'cin' does not name a type 5 | cin >> a >> endl; | ^~~ a.cc:6:1: error: 'cin' does not name a type 6 | cin >> b >> endl; | ^~~ a.cc: In function 'int main()': a.cc:12:24: error: expected ';' before 'cout' 12 | else (a==D && b==D) cout << "H" <<endl; | ...
s767790330
p03777
C++
#include<iostream> using namespace std; char H, D, a, b; char cin >> a >> endl; char cin >> b >> endl; int main() { if (a == H && b == H) cout << "H" << endl; else if (a==H && b==D) cout << "D" << endl; else if (a==D && b==H) cout << "H" << endl; else (a==D && b==D) cout << "H" <<endl; return 0; }
a.cc:5:10: error: expected initializer before '>>' token 5 | char cin >> a >> endl; | ^~ a.cc:6:10: error: expected initializer before '>>' token 6 | char cin >> b >> endl; | ^~ a.cc: In function 'int main()': a.cc:12:24: error: expected ';' before 'cout' 12 | else (a==D && ...
s006436247
p03777
C++
#include<iostream> using namespace std; char H, D, a, b; cin >> a >> endl; cin >> b >> endl; int main() { if (a == H && b == H) cout << "H" << endl; else if (a==H && b==D) cout << "D" << endl; else if (a==D && b==H) cout << "H" << endl; else (a==D && b==D) cout << "H" <<endl; return 0; }
a.cc:5:1: error: 'cin' does not name a type 5 | cin >> a >> endl; | ^~~ a.cc:6:1: error: 'cin' does not name a type 6 | cin >> b >> endl; | ^~~ a.cc: In function 'int main()': a.cc:12:24: error: expected ';' before 'cout' 12 | else (a==D && b==D) cout << "H" <<endl; | ...
s208226279
p03777
C++
#include<iostream> using namespace std; char H, D, a, b; cin >> a >> endl; cin >> b >> endl; int main() { if (a == H and b == H) cout << "H" << endl; else if (a==H and b==D) cout << "D" << endl; else if (a==D and b==H) cout << "H" << endl; else (a==D and b==D) cout << "H" <<endl; return 0; }
a.cc:5:1: error: 'cin' does not name a type 5 | cin >> a >> endl; | ^~~ a.cc:6:1: error: 'cin' does not name a type 6 | cin >> b >> endl; | ^~~ a.cc: In function 'int main()': a.cc:12:25: error: expected ';' before 'cout' 12 | else (a==D and b==D) cout << "H" <<endl; | ...
s272153610
p03777
C++
#include<iostream> using namespace std; char H, D, a, b; cin >> a >> endl; cin >> b >> endl; if (a == H and b == H) cout << "H" << endl; else if (a==H and b==D) cout << "D" << endl; else if (a==D and b==H) cout << "H" << endl; else (a==D and b==D) cout << "H" <<endl;
a.cc:5:1: error: 'cin' does not name a type 5 | cin >> a >> endl; | ^~~ a.cc:6:1: error: 'cin' does not name a type 6 | cin >> b >> endl; | ^~~ a.cc:8:1: error: expected unqualified-id before 'if' 8 | if (a == H and b == H) cout << "H" << endl; | ^~ a.cc:9:1: error: expected unqualified-id...
s089355333
p03777
C++
#include <bits/stdc++.h> using namespace std: int main() { char a, b; cin >> a >> b; cout << (a == b ? 'H' : 'D') << '\n'; }
a.cc:2:20: error: expected ';' before ':' token 2 | using namespace std: | ^ | ; a.cc:2:20: error: expected unqualified-id before ':' token
s873561023
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ char A,B; cin>>A>>B; if(A='H' && B='H') { cout<<"H"<<endl; } if(A='D' && B='D') { cout<<"H"<<endl; } if(A='H' && B='D') { cout<<"D"<<endl; } if(A='D' && B='H') { cout<<"D"<<endl; } }
a.cc: In function 'int main()': a.cc:7:12: error: lvalue required as left operand of assignment 7 | if(A='H' && B='H') { | ~~~~^~~~ a.cc:10:12: error: lvalue required as left operand of assignment 10 | if(A='D' && B='D') { | ~~~~^~~~ a.cc:13:12: error: lvalue required as left operan...
s356716127
p03777
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ string a,b; cin>>a>>b; (a[0]==b[0])? cout<<"H":cout<<"D" return 0; }
a.cc: In function 'int main()': a.cc:9:36: error: expected ';' before 'return' 9 | (a[0]==b[0])? cout<<"H":cout<<"D" | ^ | ; 10 | 11 | return 0; | ~~~~~~
s066017504
p03777
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ string a,b; cin>>a>>b; (a[0]=='H' && b[0]=='H')? cout<<"H":cout<<"D" return 0; }
a.cc: In function 'int main()': a.cc:9:48: error: expected ';' before 'return' 9 | (a[0]=='H' && b[0]=='H')? cout<<"H":cout<<"D" | ^ | ; 10 | 11 | return 0; | ~~~~~~ ...
s333774542
p03777
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ string a,b; cin>>a>>b; (a[0]='H' && b[0]='H')? cout<<"H":cout<<"D" return 0; }
a.cc: In function 'int main()': a.cc:9:13: error: lvalue required as left operand of assignment 9 | (a[0]='H' && b[0]='H')? cout<<"H":cout<<"D"