submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s848793227
p03777
C++
package main import ( "fmt" ) func main() { var a, b string fmt.Scanf("%s %s", &a, &b) if (a == "H" && b == "H") || (a == "D" && b == "D") { fmt.Println("H") } else { fmt.Println("D") } }
a.cc:1:1: error: 'package' does not name a type 1 | package main | ^~~~~~~
s923718341
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 if(a=="D" && b=="H")cout<<"D"; else cout<<"D"; }
a.cc: In function 'int main()': a.cc:7:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if(a=="H" && b=="H")cout<<"H"; | ~^~~~~ a.cc:7:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 7 | if(a=="H" && b=="H")cout<<"H"; | ...
s854814528
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 cout<<'D'<<ednl; } else{ if(b=='H') cout<<'D'<<endl; else cout<<'H'<<endl; } }
a.cc: In function 'int main()': a.cc:11:18: error: 'ednl' was not declared in this scope 11 | cout<<'D'<<ednl; | ^~~~
s016137585
p03777
C++
#include<iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if(a=='D'){ if(b=='D')cout<<'H'<<endl; else cout<<'D'<<endl; } else{ if(b=='D')cout<<'D'>>endl; else cout<<'H'<<endl; } }
a.cc: In function 'int main()': a.cc:11:24: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 11 | if(b=='D')cout<<'D'>>endl; | ~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/string:55, from ...
s203456534
p03777
C++
#include <iostream> using namespace std; #include <string> 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'; cout << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:24: error: lvalue required as left operand of assignment 10 | else if(a=='D' && b = 'D') cout << 'H'; | ~~~~~~~^~~~
s649935206
p03777
C++
#include<iostream> using namespace std; int main(){ char a,b; cin>>a>>b; cout<<(a==b?"H":"D")<<endl; retrun 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'retrun' was not declared in this scope 9 | retrun 0; | ^~~~~~
s831638986
p03777
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<n;i++) long long inf=(long long)1E17; #define i_7 (long long)(1E9+7) long mod(long a){ long long c=a%i_7; if(c>=0)return c; return c+i_7; } using namespace std; long long gcd(long long a, long long b){ if(a<b){ swap(a,b); } if(a%b==0){ re...
a.cc:85:3: error: expected unqualified-id before 'return' 85 | return 0; | ^~~~~~ a.cc:86:1: error: expected declaration before '}' token 86 | } | ^
s312215879
p03777
C++
#include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; int main() { char a, b; cin >> a >> b; if (a=="H"||(a=="D"&&b=="D")) { cout << "H" << endl; } else { cout << "D" << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | if (a=="H"||(a=="D"&&b=="D")) { | ~^~~~~ a.cc:13:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | if (a=="H"||(a=="D"...
s131627354
p03777
C++
#include <cstdio> using namespace std; int main() { int a,b,c; scanf("%c %c", &a, &b); if(a==H){ printf("%c", b); } if(a==D){ if(b==C){ printf("D"); } else { printf("H"); } } }
a.cc: In function 'int main()': a.cc:9:15: error: 'H' was not declared in this scope 9 | if(a==H){ | ^ a.cc:12:15: error: 'D' was not declared in this scope 12 | if(a==D){ | ^ a.cc:13:23: error: 'C' was not declared in this scope 13 | if(...
s109349900
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:1:1: error: 'include' does not name a type 1 | include<bits/stdc++.h> | ^~~~~~~ a.cc: In function 'int main()': a.cc:6:3: error: 'cin' was not declared in this scope 6 | cin >> a >> b; | ^~~ a.cc:9:5: error: 'cout' was not declared in this scope 9 | cout << 'H' << endl; | ...
s539250118
p03777
C++
¥#include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int main(){ char a,b; cin>>a>>b; if(a=='H'&&b=='H') cout<<'H'<<endl; else if(a=='D'&&b=='D') cout<<'H'<<endl; else{ cout<<'D'<<endl; } }
a.cc:1:1: error: extended character ¥ is not valid in an identifier 1 | ¥#include<iostream> | ^ a.cc:1:2: error: stray '#' in program 1 | ¥#include<iostream> | ^ a.cc:1:1: error: '\U000000a5' does not name a type 1 | ¥#include<iostream> | ^ In file included from /usr/include/c++/14/bits/c...
s577259904
p03777
C++
#include <iostream> #include <string> #include <vector> #include <stack> #include <map> #include <set> #include <algorithm> #include <numeric> #include <math.h> #include <stdio.h> #include <ctype.h> #include <ios> #include <iomanip> using namespace std; #define N_MAX (100000) #define LL_MAX_NUM (1LL<<60) #define IN...
a.cc: In function 'int main()': a.cc:26:19: error: 'N' was not declared in this scope 26 | vector<int> A(N,0); | ^
s528455995
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'; } else{ cout<<'H'; } }
a.cc: In function 'int main()': a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s349786733
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ cnar 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:5:5: error: 'cnar' was not declared in this scope; did you mean 'char'? 5 | cnar a, b; | ^~~~ | char a.cc:6:12: error: 'a' was not declared in this scope 6 | cin >> a >> b; | ^ a.cc:6:17: error: 'b' was not declared in this scope ...
s917219851
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(void){ char a[2]; int cnt=0; cin>>a>>a[1]; for(int i=0;i<2;i++){ if(a[i]=='H') cnt++; } cout<<(cnt%2==0)?"H":"D"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:13:29: error: invalid operands of types 'const char [2]' and '<unresolved overloaded function type>' to binary 'operator<<' 13 | cout<<(cnt%2==0)?"H":"D"<<endl; | ~~~^~~~~~
s904359614
p03777
C++
#include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <iostream> #include <bitset> #include <deque> #include <list> #include <map> #include <set> #include <queue> #include <stack> #include <vector> #include <algorithm> #include <iterator> #include <string> #include <cctype> using namespace s...
a.cc: In function 'int main()': a.cc:23:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 23 | if(A=="H"){ | ~^~~~~ a.cc:28:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 28 | if (B=="H"){ | ~^~~~~
s568996393
p03777
C++
#include<bits/stdc++.h> using namespace std; int void(){ string a,b; cin>>a>>b; if(a==b) cout<<"H"<<endl; else cout<<"D"<<endl; }
a.cc:4:10: error: expected unqualified-id before ')' token 4 | int void(){ | ^
s865239030
p03777
C++
#include<bits/stcd++.h> using namespace std; int void(){ string a,b; cin>>a>>b; if(a==b) cout<<"H"<<endl; else cout<<"D"<<endl; }
a.cc:1:9: fatal error: bits/stcd++.h: No such file or directory 1 | #include<bits/stcd++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s764863895
p03777
C++
# coding: utf-8 a, b = map(str, input().split()) print('H' if a == b else 'D')
a.cc:1:3: error: invalid preprocessing directive #coding 1 | # coding: utf-8 | ^~~~~~ a.cc:2:1: error: 'a' does not name a type 2 | a, b = map(str, input().split()) | ^
s199676752
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a, b; bool at = ( a == 'H'); bool top = (b == 'H'); if (at && top) { cout << 'H' << endl; }else if (at || top); { cout << 'D' << endl; }else{ cout << 'H' << endl; } }
a.cc: In function 'int main()': a.cc:13:10: error: 'else' without a previous 'if' 13 | }else{ | ^~~~
s348033890
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ char a, b; bool at = ( a == 'H'); bool top = (b == 'H'); if (at && top) { cout << 'H' < endl; }else if (at || top); { cout << 'D' << endl; }else{ cout << 'H' << endl; } }
a.cc: In function 'int main()': a.cc:9:29: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 9 | cout << 'H' < endl; | ~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/regex:68, ...
s050429566
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a, b; bool at = ( a == "H"); bool top = (b == "H"); if (at && top) { cout << "H" < endl; }else if (at || top); { cout << "D" << endl; }else{ cout << "H" << endl; } }
a.cc: In function 'int main()': a.cc:9:29: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 9 | cout << "H" < endl; | ~~~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/regex:68, ...
s498014457
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a, b; bool at = ( a == "H"); bool top = (b == "H"); if (at && top) { cout << "H" < endl; }else if (at || top); { cout << "D" << endl; }else{ cout << "H" << endl; } }
a.cc: In function 'int main()': a.cc:5:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 5 | bool at = ( a == "H"); | ~~^~~~~~ a.cc:6:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 6 | bool top = (b == "H"...
s939452909
p03777
C++
#include<bits/stdc++.h> using namespace std; int main(){ string a,b; cin>>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 ’; }
a.cc:7:11: error: extended character ’ is not valid in an identifier 7 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’; | ^ a.cc:7:14: error: extended character ’ is not valid in an identifier 7 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’; | ^ a.cc:7:24: error: extended character ...
s318227090
p03777
C++
#include<iostream> #include<string> #include <algorithm> using namespace std; int main() { string a, b; cin >> a >> b; if(b == 'H'){ if(a == 'H'){ cout << 'H' << endl; }else{ cout << 'D' << endl; } }else if(b == 'D'){ if(a == 'H'){ cout << 'D' << endl; }else{ cout <<...
a.cc: In function 'int main()': a.cc:10:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 10 | if(b == 'H'){ | ~ ^~ ~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} In fi...
s272348619
p03777
C++
060C #include <iostream> #include <iomanip> #include <algorithm> #include <vector> #include <string> #include <map> #include <math.h> #include <deque> using ll = long long; using namespace std; int main(){ char a, b; cin >> a >> b; if((a=='H' && b=='H')||(a=='D' && b=='D')) cout << 'H' << endl; else c...
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 060C | ^~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, ...
s897612807
p03777
C
#include <stdio.h> int main(){ char a[2]; char b[2]; if(a == b){ printf("H¥n"); }else{ printf("D¥n"); } }
main.c:1:10: error: stray '\343' in program 1 | <U+FF03>include<U+3000><stdio.h> | ^~~~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | #include <stdio.h> | ^
s605372178
p03777
C
#include <stdio.h> int main(){ char a[2]; char b[2]; if(a == b){ printf("H¥n"); }else{ printf("D¥n"); } }
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | #include <stdio.h> | ^
s795462712
p03777
C++
#include<cstdio> #include<iostream> #include<string> using namespace std; int main(void) { string a, b; cin >> a >> b; if (a == "H") { if (b == "H")cout << "H\n"; else cout << "D\n"; }elss{ if (b == "H")cout << "D\n"; else cout << "H\n"; } return 0; }
a.cc: In function 'int main()': a.cc:16:10: error: 'elss' was not declared in this scope 16 | }elss{ | ^~~~
s955939724
p03777
C++
#include<iostream> using namespace std; int main(void) { char a,b; cin << a << b; if(a == 'H') { if(b == 'H') { cout >> "H"; } else { cout >> "D"; } } else { if(b =- 'H') { cout >> "D"; ...
a.cc: In function 'int main()': a.cc:7:9: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char') 7 | cin << a << b; | ~~~ ^~ ~ | | | | | char | std::istream {aka std::basic_istream<char>} a.cc:7:9: note: c...
s558436837
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=='H'&&b=='D'){ cout << "D" << endl; } if(a=='D'&&b=='H'){ cout << "D" << endl; } if(a=='D'&&b=='D'){ cout << "H" << endl; } }
a.cc:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include < bits/stdc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s328158570
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=='H'&&b=='D'){ cout << "D" << endl; } if(a=='D'&&b=='H'){ cout << "D" << endl; } if(a=='D'&&b=='D'){ cout << "H" << endl; } }
a.cc:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include < bits/stdc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s504406106
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; } if(a=='H'&&b=='D'){ cout << "D" << 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:8:7: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 8 | if(a=='H'&&b=='H'){ | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<char>} In fil...
s496147334
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; } if(a=='H'&&b=='D'){ cout << "D" << endl; } if(a=='D'&&b=='H'){ cout << "D" << endl; } if(a=='D'&&b=='D'){ cout << "H" << endl; } }
a.cc:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include < bits/stdc++.h> | ^~~~~~~~~~~~~~~~ compilation terminated.
s422224464
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ string a, b; cin >> a >> b; if(((a=='H')+(b=='H'))%2==0){ cout << 'H' << endl; }else{ cout << 'D' << endl; } }
a.cc: In function 'int main()': a.cc:7:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 7 | if(((a=='H')+(b=='H'))%2==0){ | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_st...
s665178633
p03777
C
#include<iostream> using namespace std; int main(){ int i,j,n,N; char a,b; cin>>a>>b; if(a=='H'){ if(b=='H'){ cout<<"H"; }else{ cout<<"D"; } }else{ if(b=='H'){ cout<<"D"; }else{ cout<<"H"; } } return 0; }
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s757109906
p03777
C++
#include<iostream> using namespace std; int main(){ char a, b; cin >> a >> b; if(a == 'D'){ if(b == 'H'){ cout << "D" << endl; } else { cout << "H" << enld; } } else { if(b == 'H'){ cout << "H" << endl; } else { cout << "D" << endl; } } }
a.cc: In function 'int main()': a.cc:12:22: error: 'enld' was not declared in this scope 12 | cout << "H" << enld; | ^~~~
s475092754
p03777
C++
#include <iostream> using namespace std; int main(){ int N; int k; cin >> N; for (int i=1;;i++) { int l1=((i*(i+1))/2) - N; if(l1 >= 0){ k = i; break;} } cout <<k;
a.cc: In function 'int main()': a.cc:16:12: error: expected '}' at end of input 16 | cout <<k; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s291058574
p03777
C++
#include <iostream> using namespace std; int main(){ int N; int k; cin >> N; for (int i=1;;i++) { int l1=i*(i+1) - N; if(l1 >= 0){ k = i; break;} cout <<k; }
a.cc: In function 'int main()': a.cc:17:4: error: expected '}' at end of input 17 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s073403817
p03777
C++
#include<iostream> using namespace std; 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; } } }
a.cc:15:1: error: expected declaration before '}' token 15 | } | ^
s002489757
p03777
C
#include <stdio.h> int main (){ char a,b; int p,q; scanf ("%c%c",&a,&b); if(a=='H'){ p=0; } else (a=='D'){ p=1; } if(b=='H'){ q=0; } else (b=='D'){ q=1; } if(p+q%2==0){ printf ("H"); } else { printf ("D"); } return 0; }
main.c: In function 'main': main.c:9:16: error: expected ';' before '{' token 9 | else (a=='D'){ | ^ | ;
s979733757
p03777
C++
#include<iostream> #include<string> #include<vector> #include<iomanip> #include<algorithm> #include<queue> #include<stack> #include<map> using namespace std; #define ll long long int main(){ str a,b; cin >> a >> b; if(a==b)cout<<"H";else cout <<"D"; return 0; }
a.cc: In function 'int main()': a.cc:12:5: error: 'str' was not declared in this scope; did you mean 'std'? 12 | str a,b; | ^~~ | std a.cc:13:12: error: 'a' was not declared in this scope 13 | cin >> a >> b; | ^ a.cc:13:17: error: 'b' was not declared in this scope ...
s796492903
p03777
C++
#include <iostream> using namespace std; int main() { char a, b; cin >> a >> b; if (a == 'H') { cout << b << end; } else if (a == 'D') { if (b == 'H') cout << 'D' << endl; else cout << 'H' << endl; } }
a.cc: In function 'int main()': a.cc:8:15: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>') 8 | cout << b << end; | ~~~~~~~~~~^~~~~~ In file included from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/incl...
s402594536
p03777
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.nextLine(); String b = sc.nextLine(); if(a.equals("H")){ if(b.equals("D")){System.out.print("D");} if(b.equals("H")){System.out.print("...
Main.java:13: error: illegal start of type }if(a.equals("D")){ ^ Main.java:13: error: <identifier> expected }if(a.equals("D")){ ^ Main.java:13: error: illegal start of type }if(a.equals("D")){ ^ Main.java:19: error: class, interface, enum, or rec...
s461421726
p03777
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.nextLine(); String b = sc.nextLine(); if(a.equals("H")){ if(b.equals("D")){system.out.print("D");} if(b.equals("H")){system.out.print("...
Main.java:13: error: illegal start of type }if(a.equals("D")){ ^ Main.java:13: error: <identifier> expected }if(a.equals("D")){ ^ Main.java:13: error: illegal start of type }if(a.equals("D")){ ^ Main.java:19: error: class, interface, enum, or rec...
s840249842
p03777
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.nextLine(); String b = sc.nextLine(); if(a.equals("H")){ system.out.print(b); }if(a.equals("D")){ if(b.equals("H")){syste...
Main.java:10: error: package system does not exist system.out.print(b); ^ Main.java:12: error: package system does not exist if(b.equals("H")){system.out.print("D");} ^ Main.java:13: error: package system does not exist if(b.equals("D")){sy...
s951523318
p03777
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.nextLine(); String b = sc.nextLine(); if(a.charAt(0)=='H'){ system.out.print(b.charAt(0)); }if(a.charAt(0)=='D'){ if(b.charAt(0)==...
Main.java:10: error: package system does not exist system.out.print(b.charAt(0)); ^ Main.java:13: error: package system does not exist system.out.print('H'); ^ Main.java:15: error: package system does not exist system.out.print('D'); ^ 3 erro...
s219346346
p03777
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String a = sc.nextLine(); String b = sc.nextLine(); if(a=='H'){ system.out.print(b); }if(a=='D'){ if(b=='D'){ system.out.print('H'); ...
Main.java:9: error: bad operand types for binary operator '==' if(a=='H'){ ^ first type: String second type: char Main.java:10: error: package system does not exist system.out.print(b); ^ Main.java:11: error: bad operand types for binary operator '==' }if(a=='D'){ ...
s363534400
p03777
Java
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char a = sc.nextCara(); char b = sc.nextCara(); if(a=='H'){ system.out.print(b); }if(a=='D'){ if(b=='D'){ system.out.print('H'); ...
Main.java:6: error: cannot find symbol char a = sc.nextCara(); ^ symbol: method nextCara() location: variable sc of type Scanner Main.java:7: error: cannot find symbol char b = sc.nextCara(); ^ symbol: method nextCara() location: variable sc of type Scan...
s494971119
p03777
C++
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char a = sc.nextCara(); char b = sc.nextCara(); if(a=='H'){ system.out.print(b); }if(a=='D'){ if(b=='D'){ system.out.print('H'); ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:11: error: expected ':' before 'static' 4 | public static void main(String[] args) { | ^~~~~~~ | : a.cc:4:29: error: ...
s878433684
p03777
C++
#include <iostream> char a,b; int main(){ cin >> a >> b; cout << (a==b? "H":"D") << endl; }
a.cc: In function 'int main()': a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 4 | 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 t...
s879078024
p03777
C++
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define ff first #define ss second #define sz size #define FOR(i,a,b) for(int i=a;i<b;i++) #define FORN(i,a,b) for(int i=a;i<=b;i++) #define FORRN(i,a,b) for (int i = (a); i >= (b); i--) #define FORR(i,a,b) for (int i = (a); i > (b...
a.cc: In function 'int main()': a.cc:26:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 26 | if(a=='H' && b=='H') | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_string<c...
s594427278
p03777
C
#include<stdio.h> char A, B; int main(){ a=getchar(); getchar(); b=getchar(); if(a==b){ putchar('H'); }else{ putchar('D'); } }
main.c: In function 'main': main.c:4:3: error: 'a' undeclared (first use in this function) 4 | a=getchar(); | ^ main.c:4:3: note: each undeclared identifier is reported only once for each function it appears in main.c:6:3: error: 'b' undeclared (first use in this function) 6 | b=getchar(); | ...
s576737047
p03777
C++
#include<iostream> using namespace std; char a,b int main() { cin>>a>>b; if(a==b) cout<<'H'<<endl; else cout<<'D'<<endl; return 0; }
a.cc:4:1: error: expected initializer before 'int' 4 | int main() | ^~~
s428127774
p03777
C++
#include<iostream> using namespace std; int main(){ string str1; cin >> str1; if(str[0] == 'H'){ string str2; cin >> str2; if(str2[0] == 'H'){ cout << "H" << endl; } else{ cout << "D" << endl; } } else{ string str2; ...
a.cc: In function 'int main()': a.cc:8:8: error: 'str' was not declared in this scope; did you mean 'str1'? 8 | if(str[0] == 'H'){ | ^~~ | str1
s017964881
p03777
C
#include<stdio.h> int main(){ char a[2], b[2]; int judge; scanf("%s %s", a, b); if(a[0] == 'H'){ if(b[0] == 'H'){ judge = 1; } else { judge = 0; } } else { if(b[0] == 'H'){ judge = 0; } else { judge = 1; } } if(judge == 1){ printf("H\n"); } e...
main.c: In function 'main': main.c:26:15: error: stray '\' in program 26 | printf("D"\n); | ^ main.c:26:15: error: expected ')' before 'n' 26 | printf("D"\n); | ~ ^~ | )
s695518476
p03777
C++
#include <iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if(a=='H'){ if(b=='H'){ cout<<'H'; return 0; } else { cout<<'D'; return 0; } } else{ if(b='H'){ cout<<'D'; return0; } else cout<<'H'; } return 0; }
a.cc: In function 'int main()': a.cc:19:1: error: 'return0' was not declared in this scope 19 | return0; | ^~~~~~~
s735712454
p03777
C++
#include <iostram> using namespace std; int main(){ char a,b; cin>>a>>b; if(a=='H'){ if(b=='H'){ cout<<'H'; return 0; } else { cout<<'D'; return 0; } } else{ if(b='H'){ cout<<'D'; return0; } else cout<<'H'; } return 0; }
a.cc:1:10: fatal error: iostram: No such file or directory 1 | #include <iostram> | ^~~~~~~~~ compilation terminated.
s435414441
p03777
C++
#include<iostream> using namespace std; int main(){ char a,b; cin>>a>>b; if(a='H' && b='H'){cout<<'H'<<endl;} if(a='D' && b='H'){cout<<'D'<<endl;} if(a='H' && b='D'){cout<<'D'<<endl;} if(a='D' && b='D'){cout<<'H'<<endl;} }
a.cc: In function 'int main()': a.cc:8:12: error: lvalue required as left operand of assignment 8 | if(a='H' && b='H'){cout<<'H'<<endl;} | ~~~~^~~~ a.cc:9:10: error: lvalue required as left operand of assignment 9 | if(a='D' && b='H'){cout<<'D'<<endl;} | ~~~~^~~~ a.cc:10:12: error: lva...
s734195269
p03777
C++
#include <bits/stdc++.h> using namespace std; int main() { char a, b; cin >> a >> b; cout << (a == b) ? 'H' : 'D' << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:34: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator<<' 7 | cout << (a == b) ? 'H' : 'D' << endl; | ~~~~^~~~~~~
s433900599
p03777
C++
#include<bits/stdc++.h> #include<string> using namespace std; string a, b; int main(){ cin >> a >> b; if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ cout << "H" << endl; } else if((a = 'H' && b = 'D') || (a = 'D' && b = 'H')){ cout << "D" << endl; } }
a.cc: In function 'int main()': a.cc:7:15: error: no match for 'operator&&' (operand types are 'char' and 'std::string' {aka 'std::__cxx11::basic_string<char>'}) 7 | if((a = 'H' && b ='H') ||(a = 'D' && b = 'D')){ | ~~~ ^~ ~ | | | | char std::string {aka std:...
s946831884
p03777
C++
#include<bits/stdc++.h> #include<string> using namespace std; string a, b; int main(){ cin >> a >> b; if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ cout << "H" << endl; } else if((a == 'H' && b == 'D') || (a == 'D' && b == 'H')){ cout << "D" << endl; } }
a.cc: In function 'int main()': a.cc:7:9: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 7 | if((a == 'H' && b =='H') ||(a == 'D' && b == 'D')){ | ~ ^~ ~~~ | | | | | char | std::string {ak...
s498780305
p03777
C++
#include<iostream> #include<string> #include<algorithm> #include<vector> #include<iomanip> #include<math.h> #include<complex> #include<queue> #include<deque> #include<stack> #include<map> #include<set> #include<bitset> using namespace std; #define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i ) #define rep(i,n) REP(i...
a.cc: In function 'int main()': a.cc:31:12: error: expected primary-expression before '<<' token 31 | else << 'D' << endl; | ^~
s290305416
p03777
C++
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using veci = vector<int>; using vecll = vector<ll>; #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) #define FOR(i,a,b) for(int i = (a);i < (b); ++i) #define REP(i,n) for(int i= 0;i<(int)(n);++i) #defin...
a.cc: In function 'int main()': a.cc:33:16: error: lvalue required as left operand of assignment 33 | if( (a=='H'&& b='H') || (a=='D'&& b=='D') ){ | ~~~~~~^~~~
s357096395
p03777
C
#include <stdio.h> int main() { char a,b; char H,D; scanf("%c %c",&a,&b); if ( a=='H' ) { if (b=='H'){ printf("H\n",); } else { printf("D\n"); } }else if (a=='D') { if (b=='H') { printf("D\n"); } else { printf("H\n"); } } return 0; ...
main.c: In function 'main': main.c:10:29: error: expected expression before ')' token 10 | printf("H\n",); | ^
s603037445
p03777
C
#include <stdio.h> int main() { int a,b; int H,D; scanf("%d %d",&a,&b); if ( a==‘H ’ ) { if (b==‘H ’){ printf("H\n"); } else { printf("D\n"); } }else if (a==‘D ’) { if (b==‘H ’) { printf("D\n"); } else { printf("H\n"); } } return 0;...
main.c: In function 'main': main.c:8:13: error: stray '\342' in program 8 | if ( a==<U+2018>H <U+2019> ) { | ^~~~~~~~ main.c:8:16: error: stray '\342' in program 8 | if ( a==<U+2018>H <U+2019> ) { | ^~~~~~~~ main.c:9:19: error: stray '\342' in program 9 ...
s545784419
p03777
C++
#import<iostream> main(){char a,b;std::cin>>a>>b;std::cout<<'H'^a^b;}
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<iostream> | ^~~~~~ a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){char a,b;std::cin>>a>>b;std::cout<<'H'^a^b;} | ^~~~ a.cc: In function 'int main()': a.cc:2:46: erro...
s871931370
p03777
C++
#include <iostream> #include <algorithm> #include <cmath> #include <limits> #include <vector> #include <cstdio> #include <bits/stdc++.h> #include <set> #include <map> #include <stdio.h> #include <string.h> #include <stack> #include <queue> #include <deque> #include <numeric> #include<bits/stdc++.h> #include <utility> ...
a.cc: In function 'int main()': a.cc:40:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 40 | if((a=="H" && b=="H") || (a=="D" && b=="D")){ | ~^~~~~ a.cc:40:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 40 | if((a=="H" && b=="H") ||...
s960341134
p03777
C++
#include <iostream> using namespace std; int main() { char a,b,ans; int x,y; cin>>a>>b; x=a-65; y=b-65; if (x==y) ans="H"; else ans="D"; cout<<ans; return 0; }
a.cc: In function 'int main()': a.cc:10:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive] 10 | if (x==y) ans="H"; | ^~~ | | | const char* a.cc:11:14: error: invalid conversion from 'const char*' to 'char' [-fpermissiv...
s692021570
p03777
C
main(a,b){char a,b;scanf("%c %c",&a,&b);puts(a==b?"H":"D");}
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int] 1 | main(a,b){char a,b;scanf("%c %c",&a,&b);puts(a==b?"H":"D");} | ^~~~ main.c: In function 'main': main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int] main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int] main.c:1:16:...
s913061656
p03777
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { char a,b; cin >> a >> b; if(a == 'H') cout << b << endl; else (a == 'D'){ if(b == 'H') cout << 'D' << endl; else cout << 'H' << endl; } }
a.cc: In function 'int main()': a.cc:10:18: error: expected ';' before '{' token 10 | else (a == 'D'){ | ^ | ;
s518486004
p03777
C++
#include<iostream> #include<cmath> #include<stdio.h> 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:13:1: error: expected primary-expression before '}' token 13 | } | ^
s235051931
p03777
C++
#include<iostream> using namespace std; int main(void) { 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:15:33: error: 'D' was not declared in this scope 15 | cout << D << endl; | ^ a.cc:18:33: error: 'H' was not declared in this scope 18 | cout << H << endl; | ...
s611937823
p03777
C++
#include <iostream> #include <cstdio> using namespace std; int main() { char a,b; cin<<a<<b; if(a==b)printf("H"); else printf("D"); return 0; }
a.cc: In function 'int main()': a.cc:7:8: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'char') 7 | cin<<a<<b; | ~~~^~~ | | | | | char | std::istream {aka std::basic_istream<char>} a.cc:7:8: note: candidate: ...
s456547113
p03777
Java
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String a = sc.next(); String b = sc.next(); if(a.charAt(0)=='H'){ System.out.print(b); } else{ String ans; if(b.charAt('H'...
Main.java:13: error: incompatible types: char cannot be converted to boolean if(b.charAt('H')) ans = "D"; ^ 1 error
s085118555
p03777
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int 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"; }
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") cout << "H"; | ~^~~~~ a.cc:8:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout << "H";...
s928207863
p03777
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b; cin >> a >> b; if(a=="H" && b=="H") cout << "H" endl; if(a=="H" && b=="D") cout << "D" endl; if(a=="D" && b=="H") cout << "D" endl; if(a=="D" && b=="D") cout << "H...
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") cout << "H" endl; | ~^~~~~ a.cc:8:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout <<...
s945443632
p03777
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; 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" ...
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") cout << "H" << endl; | ~^~~~~ a.cc:8:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout...
s073798239
p03777
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; 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" ...
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") cout << "H" << endl; | ~^~~~~ a.cc:8:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout...
s962393364
p03777
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b; cin >> a,b; if(a=="H" && b=="H") cout << "H" << endl; if(a=="H" && b=="D") cout << "D" << endl; if(a=="D" && b=="H") cout << "D" << endl; if(a=="D" && b=="D") cout...
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") cout << "H" << endl; | ~^~~~~ a.cc:8:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout...
s739284525
p03777
C++
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);i++) const int MOD=(int)1e9+7; using namespace std; int main(){ int a,b; cin >> a,b; if(a=="H" && b=="H") cout << "H" <<endl; if(a=="H" && b=="D") cout << "D" <<endl; if(a=="D" && b=="H") cout << "D" <<endl; if(a=="D" && b=="D") cout <<...
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") cout << "H" <<endl; | ~^~~~~ a.cc:8:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 8 | if(a=="H" && b=="H") cout ...
s258316339
p03777
C++
#include<bits/stdc++.h> using namespace std; int main() { cin>>n>>m; if (n==m) cout<<"H"<<endl; else cout<<"D"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:10: error: 'n' was not declared in this scope; did you mean 'yn'? 5 | cin>>n>>m; | ^ | yn a.cc:5:13: error: 'm' was not declared in this scope; did you mean 'tm'? 5 | cin>>n>>m; | ^ | tm
s224146702
p03777
C++
#include<iostream> //白日依山尽 #define usn using namespace #define it int main() //黄河入海流 #define ci(i,n) cin>>i>>n #define co(ans) cout<<ans<<endl #define st string //欲穷千里目 usn; it {st i,n; ci(i,n); if(i=="H") {co(n); } else {if(n=="H") co("D"); else co("H"); } return 0; }
a.cc:10:4: error: expected identifier before ';' token 10 | usn; | ^ a.cc: In function 'int main()': a.cc:8:12: error: 'string' was not declared in this scope 8 | #define st string | ^~~~~~ a.cc:12:2: note: in expansion of macro 'st' 12 | {st i,n; | ^~ a.cc:8:12: note: suggest...
s154445513
p03777
C++
#include<iostream> //白日依山尽 #define usn using namespace #define it int main() //黄河入海流 #define ci(i,n) cin>>i>>n #define co(ans) cout<<ans<<endl #define st string //欲穷千里目 usn; it {st i,n; ci(i,n); if(i=="H") {co(n); } else {if(n=="H") co("D"); else co("H"); } return 0; }
a.cc:10:4: error: expected identifier before ';' token 10 | usn; | ^ a.cc: In function 'int main()': a.cc:8:12: error: 'string' was not declared in this scope 8 | #define st string | ^~~~~~ a.cc:12:2: note: in expansion of macro 'st' 12 | {st i,n; | ^~ a.cc:8:12: note: suggest...
s365403997
p03777
C++
#include<iostream> //白日依山尽 #define usn using namespace #define it int main() //黄河入海流 #define ci(i,n) cin>>i>>n #define co(ans) cout<<ans<<endl #define st string //欲穷千里目 usn; it {st i,n; ci(i,n); if(i=='H') {co(n); } else {if(n=='H') co("D"); else co("H"); } return 0; }
a.cc:10:4: error: expected identifier before ';' token 10 | usn; | ^ a.cc: In function 'int main()': a.cc:8:12: error: 'string' was not declared in this scope 8 | #define st string | ^~~~~~ a.cc:12:2: note: in expansion of macro 'st' 12 | {st i,n; | ^~ a.cc:8:12: note: suggest...
s885993411
p03777
C++
#include<stdio.h> int main() { char a,b; scanf("%c %c",&a,&b); if(a==b)printf("D\n"); else printf("H\n") return 0; }
a.cc: In function 'int main()': a.cc:7:23: error: expected ';' before 'return' 7 | else printf("H\n") | ^ | ; 8 | return 0; | ~~~~~~
s127675623
p03777
C++
#include <bits/stdc++.h> using namespace std; string a, b; int main(){ con>>a>>b; if(a == b){ cout<<"H"<<endl; }else{ cout<<"D"<<endl; } }
a.cc: In function 'int main()': a.cc:6:3: error: 'con' was not declared in this scope; did you mean 'cos'? 6 | con>>a>>b; | ^~~ | cos
s620120907
p03777
C++
#include<iostream> using namespace std; char a,b int main() { cin>>a>>b; if(a==b)cout<<"H"<<endl; else cout<<"D"<<endl; return 0; }
a.cc:4:1: error: expected initializer before 'int' 4 | int main() | ^~~
s396699064
p03777
C++
#pr\ #include <cstdio> #include <cstdlib> using namespace std; char a,b; int main() { scanf("%c %c",&a,&b); if(a==b) puts("H"); else puts("D"); return 0; }
a.cc:1:2: error: invalid preprocessing directive #pr 1 | #pr\ 2 | #include <cstdio> a.cc: In function 'int main()': a.cc:8:5: error: 'scanf' was not declared in this scope 8 | scanf("%c %c",&a,&b); | ^~~~~ a.cc:10:9: error: 'puts' was not declared in this scope 10 | puts("H"); ...
s087401874
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ char a,b; cin >> a >> b; if (a=='H'){ cout << b << endl; } else { if (b=='H'){ cout << a << endl; } else { cout << b << endl; } } } #include <bits/stdc++.h> using namespace std; int main(){ char a,b; cin >> a >> b; if (a=='H'){ cout << b << endl; } else { i...
a.cc:22:5: error: redefinition of 'int main()' 22 | int main(){ | ^~~~ a.cc:4:5: note: 'int main()' previously defined here 4 | int main(){ | ^~~~
s864232471
p03777
C++
#include <iostream> int main(void){ char a,b; cin >> a >> b; cout << (a-b?'D':'H') << endl; return 0; }
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 t...
s980109886
p03777
C++
#include<bits/stdc++.h> char a,b; int main() { std::cin>>a>>b; if(a!=b)std::cout<<"D"<<endl; else std::cout<<"H"<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:29: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 6 | if(a!=b)std::cout<<"D"<<endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/istream:41, from ...
s934009070
p03777
C++
#include<bits/stdc++.h> string a,b; int main() { std::cin>>a>>b; if(a!=b)std::cout<<"D"<<endl; else std::cout<<"H"<<endl; return 0; }
a.cc:2:1: error: 'string' does not name a type; did you mean 'stdin'? 2 | string a,b; | ^~~~~~ | stdin a.cc: In function 'int main()': a.cc:5:15: error: 'a' was not declared in this scope 5 | std::cin>>a>>b; | ^ a.cc:5:18: error: 'b' was not declared in this scope 5 | ...
s990291064
p03777
C++
#include<bits/stdc++.h> using namespace std; char ch,ch1; int main() { cin>>ch>>ch1; if(ch==ch1)cuot<<'H';else cout<<'D'; return 0; }
a.cc: In function 'int main()': a.cc:7:20: error: 'cuot' was not declared in this scope 7 | if(ch==ch1)cuot<<'H';else cout<<'D'; | ^~~~
s440510995
p03777
C++
#include<iostream> using namespace std; int main(void) { string a, b; cin >> a >> b; string ans; if (a=='H') cout << b << endl; else if (b=='D') cout << 'H' << endl; else cout << 'D' << endl; }
a.cc: In function 'int main()': a.cc:9:8: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char') 9 | if (a=='H') cout << b << endl; | ~^~~~~ | | | | | char | std::string {aka std::__cxx11::basic_strin...
s709658914
p03777
C++
#include <bits/stdc++.h> #define o(output) cout << output << endl using namespace std; string s,t,u; int a,b,c,d; int l[13]={0,1,3,1,2,1,2,1,1,2,1,2,1}; char A,B,C; priority_queue<int,vector<int>,greater<int> >small; int main(){ cin >>A>>B; if(A-B=0)o("H"); else o("D"); }
a.cc: In function 'int main()': a.cc:15:7: error: lvalue required as left operand of assignment 15 | if(A-B=0)o("H"); | ~^~
s312753392
p03777
C++
#include <iostream> using namespace std; int main() { char a; char b; cin >> a; cin >> b; if (a == 'D'){ if (b == 'D'){ cout << "H" << endl;} else{ cout << "D" << endl;} else{ if (b == 'D'){ cout << "D" << endl;} else{ cout << "H" << endl;...
a.cc: In function 'int main()': a.cc:14:5: error: expected '}' before 'else' 14 | else{ | ^~~~ a.cc:9:18: note: to match this '{' 9 | if (a == 'D'){ | ^ a.cc:20:2: error: expected '}' at end of input 20 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main...
s313807168
p03777
C++
#include <iostream> using namespace std; int main() { char at, top; cin >> at >> top; if (at == 'H') cout << top << endl; else { cout << top == 'H' ? 'D' : 'H' << endl; } }
a.cc: In function 'int main()': a.cc:7:17: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'char') 7 | cout << top == 'H' ? 'D' : 'H' << endl; | ~~~~~~~~~~~ ^~ ~~~ | | | | | char | std::basic_ostream<char> ...
s586380352
p03777
C++
#include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b; if(a=='H'&&b=='H'){ c='H'; } else if(a=='H'&&b=='D'){ c='D' } else if(a=='D'&&b=='H'){ c='D' } else{ c='H' } cout<<c<<endl; }
a.cc: In function 'int main()': a.cc:11:10: error: expected ';' before '}' token 11 | c='D' | ^ | ; 12 | } | ~ a.cc:14:10: error: expected ';' before '}' token 14 | c='D' | ^ | ; 15 | } | ~ a.cc:17:10: erro...
s121504933
p03777
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <functional> #include <queue> #include <set> #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define rep1(i,n) for(int i=1;i<=(int)(n);i++) using namespace std; typedef long long int lli; int main(){ char a.b; cin>>a>>b; if(a=='H'&...
a.cc: In function 'int main()': a.cc:15:15: error: expected initializer before '.' token 15 | char a.b; | ^ a.cc:16:14: error: 'a' was not declared in this scope 16 | cin>>a>>b; | ^ a.cc:16:17: error: 'b' was not declared in this scope 16 | cin>>a>...