submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s001777394 | 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:17:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
17 | if(a=="H"&&b=="H")cout<<"H";
| ~^~~~~
a.cc:17:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
17 | if(a=="H"&&b=="H")cout<... |
s720352679 | 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>... |
s441958041 | p03777 | C++ | #include <iostream>
#include <algorithm>
#include <string>
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:9:25: error: expected ';' before '}' token
9 | else cout << "D" << endl
| ^
| ;
10 | }
| ~
|
s364280825 | p03777 | C++ | use std::env;
use std::io::*;
use std::str::*;
fn read<T: FromStr>() -> T {
let stdin = stdin();
let s = stdin.bytes().map(|c| c.unwrap() as char)
.skip_while(|c| c.is_whitespace())
.take_while(|c| !c.is_whitespace())
.collect::<String>();
s.parse::<T>().ok().unwrap()
}
fn main() {... | a.cc:1:1: error: 'use' does not name a type
1 | use std::env;
| ^~~
a.cc:2:1: error: 'use' does not name a type
2 | use std::io::*;
| ^~~
a.cc:3:1: error: 'use' does not name a type
3 | use std::str::*;
| ^~~
a.cc:5:1: error: 'fn' does not name a type
5 | fn read<T: FromStr>() -> T {
... |
s845424627 | p03777 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String a = sc.next();
String b = sc.next();
if(a == "H")System.out.println(b);
else if(a == "D" && b == "H")System.println("D");
else System.out.println("H");
}
} | Main.java:8: error: cannot find symbol
else if(a == "D" && b == "H")System.println("D");
^
symbol: method println(String)
location: class System
1 error
|
s692347229 | p03777 | C | #include <stdio.h>
int main(){
char a,b;
scanf("%s %s",&a,&b);
if(a==b){
printf("H")
}else{
printf("D")
}
} | main.c: In function 'main':
main.c:6:28: error: expected ';' before '}' token
6 | printf("H")
| ^
| ;
7 | }else{
| ~
main.c:8:28: error: expected ';' before '}' token
8 | ... |
s189102662 | p03777 | C++ | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String args[]) {
FastReader sc = new FastReader();
String a = sc.next();
String b = sc.next();
if (a.equals("H")... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.BufferedReader;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.IOException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fm... |
s072141393 | p03777 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<utility>
#define REP(i,n) for(int i = 0;i < (n);i++)
#define pb push_back
using namespace std;
const int INF = 1e9;
typedef long long ll;
int main(){
int x,y;
string s,t;
cin >> s >> t;
x = 1;
if(s == "D")
x *= -1;
if(t =... | a.cc: In function 'int main()':
a.cc:26:12: error: expected '}' at end of input
26 | return 0;
| ^
a.cc:12:11: note: to match this '{'
12 | int main(){
| ^
|
s089812666 | p03777 | Java | import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
public class Main {
static PrintWriter out;
static InputReader ir;
static void solve() {
out.println(rec(conv(ir.next().charAt(0)) ^ conv(ir.next(... | Main.java:158: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:159: error: class, interface, enum, or record expected
import java.io.InputStream;
^
Main.java:160: error: class, interface, enum, or record expected
import java.io.PrintWriter;
^
Main.java:161: error: class, interf... |
s002508207 | p03777 | C++ | #include <bits/stdc++.h>
int main(){
std::string a, b;
std::cin >> a >> b;
if(a == 'H' || b == 'H') std::cout << "H\n";
else if(a == 'D' || b == 'H') std::cout << "H\n";
else std::cout << "D\n";
return 0;
}
| a.cc: In function 'int main()':
a.cc:7:10: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
7 | if(a == 'H' || b == 'H') std::cout << "H\n";
| ~ ^~ ~~~
| | |
| | char
| std::string {ak... |
s890803909 | p03777 | C++ | #include <bits/stdc++.h>
#include <cmath>
#define out(n) std::cout << "n\n"
int main(){
std::string a, b;
std::cin >> a >> b;
if(a == 'H' || b == 'H') out(H);
else if(a == 'D' || b == 'H') out(H);
else out(D);
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:10: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
10 | if(a == 'H' || b == 'H') out(H);
| ~ ^~ ~~~
| | |
| | char
| std::string {aka std::__cx... |
s272547437 | p03777 | C++ | #include <stdio.h>
int main(void){char a, b;scanf("%c %c", &a, &b);if(a == 'H'){printf("%c\n", b);}else if(b == 'H'){printf("B\n");}else{printf("H"\n);}return 0;} | a.cc:3:129: error: stray '\' in program
3 | int main(void){char a, b;scanf("%c %c", &a, &b);if(a == 'H'){printf("%c\n", b);}else if(b == 'H'){printf("B\n");}else{printf("H"\n);}return 0;}
| ... |
s239578893 | p03777 | C++ | #include <iostream>
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:5:20: error: 'A' was not declared in this scope
5 | char a,b; cin >> A >> b;
| ^
|
s105076362 | p03777 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int a, b;
bool ans;
cin >> a >> b;
ans = (b == 'H' ? true : false);
if (a == 'D') ans != ans;
cout << (ans == true ? "H" ? "D") << endl;
}
| a.cc: In function 'int main()':
a.cc:10:37: error: expected ':' before ')' token
10 | cout << (ans == true ? "H" ? "D") << endl;
| ^
| :
a.cc:10:37: error: expected primary-expression before ')' token
a.cc:10:37: error: expected ... |
s721383659 | p03777 | C++ | #include <bits/stdc++.h>
using namespace std;
struct edge {int /*from,*/to,cost;};
typedef long long ll;
typedef pair<int,int> P;
typedef pair<pair<int,int>,int> PP;
typedef vector<int> VI;
typedef vector<long long int> VL;
typedef vector<edge> VE;
static const int MOD = 1000000007;
static const int INF = 2147483647;... | a.cc: In function 'int main()':
a.cc:42:19: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
42 | (a==b) ? putc("H") : putc("D");
| ^~~
| |
| const char*
a.cc:42:18: error: too few arguments to function 'int putc(int, FIL... |
s547046541 | p03777 | C++ | #include <iostream>
using namespace std;
#define PrintLn(X) cout << X << endl
#define Rep(i, n) for(int i = 0; i < (int)(n); ++i)
int main(void)
{
char a, b;
cin >> a >> b;
PrintLn(a == b ? 'H' : 'D');
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:19: error: no match for 'operator==' (operand types are 'std::basic_ostream<char>' and 'char')
11 | PrintLn(a == b ? 'H' : 'D');
| ^~ ~
| |
| char
a.cc:4:28: note: in definition of macro 'Pri... |
s021975271 | p03777 | C++ | int main(){
char a,b;
scanf("%c%c",&a,&b);
if(a=='H'&&b=='H')printf("H\n");
else if(a=='D'&&b=='D')printf("H\n");
else printf("D\n");
} | a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
3 | scanf("%c%c",&a,&b);
| ^~~~~
a.cc:4:27: error: 'printf' was not declared in this scope
4 | if(a=='H'&&b=='H')printf("H\n");
| ^~~~~~
a.cc:1:1: note: 'printf' ... |
s562099355 | p03777 | C++ | A,B = input().split()
if A == B:
print('H')
else:
print('D') | a.cc:1:1: error: 'A' does not name a type
1 | A,B = input().split()
| ^
|
s608715872 | p03777 | C | #include<stdio.h>
int main(void){
char a,b;
scanf("%s %s",&a,&b);
if( a == H || a == D && b == H || b == D ){
if( a == H && b == H){
printf("H");
}
else if( a == H && b == D){
printf("D");
}
else if( a == D && b == H){
prin... | main.c: In function 'main':
main.c:10:14: error: 'H' undeclared (first use in this function)
10 | if( a == H || a == D && b == H || b == D ){
| ^
main.c:10:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:24: error: 'D' undeclared (first use ... |
s230931586 | p03777 | C++ | s = input()
if s == "H H":
print("H")
elif s == "D H":
print("D")
elif s == "D D":
print("H")
else:
print("D") | a.cc:1:1: error: 's' does not name a type
1 | s = input()
| ^
|
s915799575 | p03777 | C | #include <stdio.h>
#include<string.h>
int main(void){
char a,b;
scanf("%c%c",&a,&b);
if(a=='H'&&b=='H')print("H\n");
else if(a=='D'&&b=='D')printf("H\n");
else printf("D\n");
return 0;
}
| main.c: In function 'main':
main.c:6:23: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
6 | if(a=='H'&&b=='H')print("H\n");
| ^~~~~
| printf
|
s311742628 | p03777 | C++ | MOD=1000000007
def solve():
a,b=map(str,input().split())
if a=='H':
print(b)
else:
if b=='H':
print('D')
else:
print('H')
if __name__ == "__main__":
solve() | a.cc:1:1: error: 'MOD' does not name a type
1 | MOD=1000000007
| ^~~
|
s195704430 | p03777 | C++ | #include <iostream>
int main()
{
| a.cc: In function 'int main()':
a.cc:4:2: error: expected '}' at end of input
4 | {
| ~^
|
s951878663 | p03777 | C++ | data = input().split()
if data[0] == 'D' :
if data[1] == 'D' :
data[1] = 'H'
else :
data[1] = 'D'
print(data[1]) | a.cc:1:1: error: 'data' does not name a type
1 | data = input().split()
| ^~~~
|
s622313646 | p03777 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define print(x) cout<<x<<endl;
int main() {
string a, b;
cin >> a, b;
if (a = "H"&&b = "H")print("H");
else if (a = "H"&&b = "D")print("D");
else if (a = "D"&&b = "D")print("H");
else if (a = "D"&&b = "H")print("D");
} | a.cc: In function 'int main()':
a.cc:9:20: error: no match for 'operator&&' (operand types are 'const char [2]' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
9 | if (a = "H"&&b = "H")print("H");
| ~~~^~~
| | |
| | std::str... |
s138015260 | p03777 | C++ |
#include<iostream>
int main() {
int W, a, b;
std::cin >> W >> a >> b;
int bigger = a => b ?? a : b;
int smaller = a > b ?? b : a;
if(bigger - (smaller + W) =< 0){
std::cout << 0;
}else{
std::cout << bigger - (smaller + W);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:19: error: expected primary-expression before '>' token
7 | int bigger = a => b ?? a : b;
| ^
a.cc:7:24: error: expected primary-expression before '?' token
7 | int bigger = a => b ?? a : b;
| ^
a.cc:7:31: error: exp... |
s287939483 | p03777 | C++ | #include<iostream>
char rev(char c){
if(c=='H'){
return 'D'
}else{
return 'H'
}
}
int main() {
char a, b;
std::cin >> a >> b;
if(a=='H'){
std::cout << b;
}else{
std::cout << rev(b);
}
return 0;
}
| a.cc: In function 'char rev(char)':
a.cc:4:15: error: expected ';' before '}' token
4 | return 'D'
| ^
| ;
5 | }else{
| ~
a.cc:6:15: error: expected ';' before '}' token
6 | return 'H'
| ^
| ;
7... |
s140864519 | p03777 | C++ | #include<iostream>
char rev(char c){
if(c=='H'){
return 'D'
}else{
return 'H'
}
}
void main() {
char a, b;
std::cin >> a >> b;
if(a=='H'){
std::cout << b;
}else{
std::cout << rev(b);
}
}
| a.cc: In function 'char rev(char)':
a.cc:4:15: error: expected ';' before '}' token
4 | return 'D'
| ^
| ;
5 | }else{
| ~
a.cc:6:15: error: expected ';' before '}' token
6 | return 'H'
| ^
| ;
7... |
s729970970 | p03777 | C++ | #include<iosteam>
char rev(char c){
if(c=='H'){
return 'D'
}else{
return 'H'
}
}
void main() {
char a, b;
std::cin >> a >> b;
if(a=='H'){
std::cout << b;
}else{
std::cout << rev(b);
}
}
| a.cc:1:9: fatal error: iosteam: No such file or directory
1 | #include<iosteam>
| ^~~~~~~~~
compilation terminated.
|
s781679537 | p03777 | Java | import java.util.Scanner;
public 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.println(b);
}else if(b = H) {
System.out.println(D);
}else {
System.... | Main.java:10: error: cannot find symbol
if(a = H) {
^
symbol: variable H
location: class Main
Main.java:10: error: incompatible types: String cannot be converted to boolean
if(a = H) {
^
Main.java:12: error: cannot find symbol
}else if(b = H) {
^
symbol: variab... |
s706111227 | p03777 | Java | import java.util.Scanner;
public 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.println(b);
}else if(b = "H") {
System.out.println("D");
}else {
S... | Main.java:10: error: incompatible types: String cannot be converted to boolean
if(a = "H") {
^
Main.java:12: error: incompatible types: String cannot be converted to boolean
}else if(b = "H") {
^
2 errors
|
s135536932 | p03777 | Java | import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
char a = sc.nextLine();
char b = sc.nexrLine();
if(a = "H")
System.out.println(b);
else if(b = "H")
System.out.println("D");
else
System.out... | Main.java:7: error: incompatible types: String cannot be converted to char
char a = sc.nextLine();
^
Main.java:8: error: cannot find symbol
char b = sc.nexrLine();
^
symbol: method nexrLine()
location: variable sc of type Scanner
Main.java:10: error: incompatible typ... |
s047538627 | p03777 | Java | import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
char a = sc.nextLine();
char b = sc.nexrLine();
if(a = "H") {
System.out.println(b);
}else if(b = "H") {
System.out.println("D");
}else {
Syste... | Main.java:7: error: incompatible types: String cannot be converted to char
char a = sc.nextLine();
^
Main.java:8: error: cannot find symbol
char b = sc.nexrLine();
^
symbol: method nexrLine()
location: variable sc of type Scanner
Main.java:10: error: incompatible typ... |
s516048794 | p03777 | Java | import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
char a = sc.nextLine();
char b = sc.nexrLine();
if(a = "H") {
System.out.println(b);
}else if(b = "H") {
System.out.println("D");
else
System.o... | Main.java:14: error: 'else' without 'if'
else
^
1 error
|
s328647058 | p03777 | Java | import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
char a = sc.nextLine();
char b = sc.nexrLine();
if(a = "H") {
System.out.println(b);
}else if(b = "H") {
System.out.println("D");
else
System.out... | Main.java:14: error: 'else' without 'if'
else
^
Main.java:17: error: reached end of file while parsing
}
^
2 errors
|
s488984045 | p03777 | C | #include <stdio.h>
int main (void)
{
int a,b,in;
in=scanf("%d%d",&a,&b);
if("a==b"){
printf("H");}
elif ("a=H && b=D"){
printf("H");}
else
{printf("D");}
return 0;
} | main.c: In function 'main':
main.c:9:1: error: implicit declaration of function 'elif' [-Wimplicit-function-declaration]
9 | elif ("a=H && b=D"){
| ^~~~
main.c:9:20: error: expected ';' before '{' token
9 | elif ("a=H && b=D"){
| ^
| ;
|
s833917342 | p03777 | C | #include <stdio.h>
int main (void)
{
int a,b;
in=scanf("%d%d",&a,&b);
if("a==b"){
printf("H");}
else {
printf("D");}
return 0;
} | main.c: In function 'main':
main.c:5:1: error: 'in' undeclared (first use in this function); did you mean 'int'?
5 | in=scanf("%d%d",&a,&b);
| ^~
| int
main.c:5:1: note: each undeclared identifier is reported only once for each function it appears in
|
s958948369 | p03777 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a,t;
cin>>a>>t;
if(a=="H"&&t=="H"){
cout<<"H"<<endl;
}
if(a=="D"&&t=="H"){
cout<<"D"<<endl;
}
if(a=="H"&&t=="D"){
cout<<"D"<<endl;
}
if(a=="D"&&t=="D"){
cout<<"H"<<endl;
}
return 0; | a.cc: In function 'int main()':
a.cc:19:18: error: expected '}' at end of input
19 | return 0;
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s922807649 | p03777 | C++ | #include <iostream>
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:5:9: 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; ... |
s944243483 | p03777 | Java | import java.util.Scanner;
public class Sample {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
String a = scan.next();
String b =scan.next();
int c = 0;
int d = 0;
if(a.equals("H")){
c =0;
} else if(a.equals("D")){
c = 1;
}
if(b.equals("H")){
... | Main.java:2: error: class Sample is public, should be declared in a file named Sample.java
public class Sample {
^
1 error
|
s830081860 | p03777 | C++ | #include <iostream>
#include <algorithm>
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:6:2: 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/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to st... |
s292392293 | p03777 | C++ | #include <iostream>
#include <algorithm>
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:6:2: 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/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to sta... |
s634578884 | p03777 | C++ | #include <cstdio>
#include <algorithm>
char a,b;
int main(){
scanf("%s",&a);
scanf("%s",&b);
int x,y;
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:24: error: 'cout' was not declared in this scope
9 | if(a=='H' && b=='H') cout << 'H';
| ^~~~
a.cc:10:24: error: 'cout' was not declared in this scope
10 | if(a=='H' && b=='D') cout << 'D';
| ^~~~
a.cc:11:24: err... |
s793317981 | p03777 | C++ | a,b = map(int, raw_input().split())
if a == "H":
print b
if a == "D":
if b == "H":
print "D"
else:
print "H" | a.cc:1:1: error: 'a' does not name a type
1 | a,b = map(int, raw_input().split())
| ^
|
s044098419 | p03777 | C++ | using System;
using System.Linq;
using System.Numerics;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Diagnostics;
using System.Text.RegularExpressions;
namespace CsTest
{
class Program
{
static void Main()
{
int[] a... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Linq;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Numerics;
... |
s814644796 | 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;}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:22: error: 'H' was not declared in this scope
7 | if(a==b){cout << H << endl;}
| ^
a.cc:8:18: error: 'D' was not declared in this scope
8 | else{cout << D << endl;}
| ^
|
s004693406 | p03777 | C++ | 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:4:12: error: extended character ’ is not valid in an identifier
4 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’;
| ^
a.cc:4:15: error: extended character ’ is not valid in an identifier
4 | if ( a == ’H ’ && b == ’H ’) cout << ’H ’;
| ^
a.cc:4:25: error: extended charac... |
s426581773 | p03777 | C++ | #include<iostream>
using namespace std;
int main()
{
char a,b;
cin>>a>>b;
while(a!='H'||a!='D'||b!='H'||b!='D')
{
cin>>a>>b;
}
if(a=='H')
{
cout<<b;
}
if(a=='D')
{
if(b=='H')
{ cout<< a; }
else
... | a.cc:25:1: error: 'Submission' does not name a type
25 | Submission
| ^~~~~~~~~~
|
s972843720 | p03777 | C++ | #include<iostream>
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
while(a!='H'||a!='D'||b!='H'||b!='D')
{
cin>>a>>b;
}
if(a=='H')
{
cout<<b;
}
if(a=='D')
{
if(b=='H')
{ cout<< a; }
else... | a.cc: In function 'int main()':
a.cc:7:14: error: no match for 'operator!=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
7 | while(a!='H'||a!='D'||b!='H'||b!='D')
| ~^~~~~
| | |
| | char
| std::s... |
s024348654 | p03777 | C++ | #include<iostream>
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
while(a!='H'||a!='D'||b!='H'||b!='D')
{
cin>>a>>b;
}
if(a=='H')
{
cout<<b;
}
if(a=='D')
{
if(b=='H')
{ cout<< a; }
else... | a.cc: In function 'int main()':
a.cc:7:14: error: no match for 'operator!=' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
7 | while(a!='H'||a!='D'||b!='H'||b!='D')
| ~^~~~~
| | |
| | char
| std::s... |
s839031811 | p03777 | C++ | #include<iostream>
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
while(a!='H||a!='D'||b!='H||b!='D')
{
cin>>a>>b;
}
if(a=='H)
{
cout<<b;
}
if(a=='D')
{
if(b=='H')
{ cout<< a; }
else
... | a.cc:7:16: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
7 | while(a!='H||a!='D'||b!='H||b!='D')
| ^~~~~~~~~
a.cc:7:25: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
7 | while(a!='H||a!='D'||b!='H||b!='D')
... |
s442000523 | p03777 | C++ | #include<iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
while(a!="H"||a!="D"||b!="H"||b!="D")
{
cin>>a>>b;
}
if(a=="H")
{
cout<<b;
}
if(a=="D")
{
if(b=="H")
{ cout<< a; }
else
... | a.cc: In function 'int main()':
a.cc:7:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | while(a!="H"||a!="D"||b!="H"||b!="D")
| ~^~~~~
a.cc:7:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | while(a!="H"||a!="D... |
s928796857 | p03777 | C++ | #include<iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
while(a!="H"||a!="D"||b!="H"||b!="D")
{
cin>>a>>" ">>b;
}
if(a=="H")
{
cout<<b;
}
if(a=="D")
{
if(b=="H")
{ cout<< a; }
el... | a.cc: In function 'int main()':
a.cc:7:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | while(a!="H"||a!="D"||b!="H"||b!="D")
| ~^~~~~
a.cc:7:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
7 | while(a!="H"||a!="D... |
s887660327 | p03777 | C++ |
#include<iostream>
int main()
{
int a,b;
cin>>a>>b;
while(a!="H"||a!="D"||b!="H"||b!="D")
{
cin>>a>>" ">>b;
}
if(a=="H")
{
cout<<b;
}
if(a=="D")
{
if(b=="H")
{ cout<< a; }
else
{cout... | a.cc: In function 'int main()':
a.cc:6:7: 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:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< ... |
s176284914 | p03777 | C++ | while(a!="H"||a!="D"||b!="H"||b!="D")
{
cin>>a>>" ">>b;
}
if(a=="H")
{
cout<<b;
}
if(a=="D")
{
if(b=="H")
{ cout<< a; }
else
{cout<<"H";}
}
| a.cc:1:6: error: expected unqualified-id before 'while'
1 | while(a!="H"||a!="D"||b!="H"||b!="D")
| ^~~~~
a.cc:5:7: error: expected unqualified-id before 'if'
5 | if(a=="H")
| ^~
a.cc:9:7: error: expected unqualified-id before 'if'
9 | if(a=="D")
| ^~
|
s875997527 | p03777 | C++ | #include<iostream>
using namespace std;
int main()
{
int a,int b;
cin>>a>>b;
if(a!="H"||a!="D"||b!="H"||b!="D")
{
cin>>a>>" ">>b;
}
if(a=="H")
{
cout<<b;
}
if(a=="D")
{
if(b=="H")
{ cout<< a; }
el... | a.cc: In function 'int main()':
a.cc:6:13: error: expected unqualified-id before 'int'
6 | int a,int b;
| ^~~
a.cc:7:15: error: 'b' was not declared in this scope
7 | cin>>a>>b;
| ^
a.cc:9:11: error: ISO C++ forbids comparison between pointer and integer [-fperm... |
s571261823 | p03777 | C++ |
#include<iostream>
using namespace std;
int main()
{
int a,int b;
cin>>a>>" ">>b;
scanf();
if(a!="H"||a!="D"||b!="H"||b!="D")
{
cin>>a>>" ">>b;
}
if(a=="H")
{
cout<<b;
}
if(a=="D")
{
if(b=="H")
{ cout<< a; }
... | a.cc: In function 'int main()':
a.cc:7:13: error: expected unqualified-id before 'int'
7 | int a,int b;
| ^~~
a.cc:8:13: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'const char [2]')
8 | cin>>a>... |
s077582139 | p03777 | C++ | #include<iostream>
#include<cmath>
#include<algorithm>
using namespace std
int main()
{
int a,b,w;
cin>>w>>a>>b;
cout<<min(fabs(b-a),fabs(b-a-w));
return 0;
} | a.cc:4:20: error: expected ';' before 'int'
4 | using namespace std
| ^
| ;
5 | int main()
| ~~~
|
s903058998 | p03777 | C++ | #include<iostream>
#include<cmath>
#include<algorithm>
using namespace
int main()
{
int a,b,w;
cin>>w>>a>>b;
cout<<max(fabs(b-a),fabs(b-a-w));
return 0;
} | a.cc:5:1: error: expected identifier before 'int'
5 | int main()
| ^~~
a.cc:4:16: error: expected ';' before 'int'
4 | using namespace
| ^
| ;
5 | int main()
| ~~~
a.cc: In function 'int main()':
a.cc:8:4: error: 'cin' was not declared in th... |
s519026761 | p03777 | C++ | #include<iostream>
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:5:4: 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... |
s864595173 | p03777 | C++ | #include<iostream>
int main()
{
char a,b;
scanf("%c%c",&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:7:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | cout<<b<<endl;
| ^~~~
| std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ... |
s214209068 | p03777 | C++ | #include<stdio.h>
#include<iostream.h>
using namespace;
void main()
{
char a,char b;
cin>>a>>" ">>b;
if(a!="H"||a!="D"||b!="H"||b!="D")
{
cin>>a>>" ">>b;
}
if(a=="H")
{
cout<<b;
}
if(a=="D")
{
if(b=="H")
{ cout<<... | a.cc:2:9: fatal error: iostream.h: No such file or directory
2 | #include<iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s181319732 | p03777 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char a[] = sc.next().toCharArray();
char b[] = sc.next().toCharArray();
if(a[0]==b[0]){
System.out.println("H");
}else{
System.out.println("D");
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s104052424 | p03777 | C++ | #include <iostream>
using namespace std;
void main()
{
char a,b;
cin>>a>>b;
if (a == b)
{
cout<<"H"<<endl;
}else{
cout<<"D"<<endl;
}
} | a.cc:5:1: error: '::main' must return 'int'
5 | void main()
| ^~~~
|
s492489834 | p03777 | Java | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String a =sc.next();
String 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.equals("H"))Syste... | Main.java:7: error: illegal start of expression
if(a.equals("H")%%b.equals("H"))System.out.println("H");
^
Main.java:8: error: illegal start of expression
if(a.equals("H")%%b.equals("D"))System.out.println("D");
^
Main.java:9: error: illegal start of expression
if(a.equals("D... |
s667470169 | p03777 | Java | import java.util.*;
public class Main {
public static void main(String[] args)
Scanner sc = new Scanner(System.in);
int x =sc.nextInt();
if(x<1200)System.out.println("ABC");
}else{
System.out.println("ARC");
}
}
} | Main.java:3: error: ';' expected
public static void main(String[] args)
^
Main.java:6: error: illegal start of type
if(x<1200)System.out.println("ABC");
^
Main.java:6: error: illegal start of type
if(x<1200)System.out.println("ABC");
^
Main.java:6: error: <identifier> ex... |
s215827374 | p03777 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
String a =sc.next();
String 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.equa... | Main.java:7: error: illegal start of expression
if(a.equals("H")%%b.equals("H"))System.out.println("H");
^
Main.java:8: error: illegal start of expression
if(a.equals("H")%%b.equals("D"))System.out.println("D");
^
Main.java:9: error: illegal start of expression
if(a.equals("D... |
s170460097 | p03777 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
String a =sc.next();
String 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.eq... | Main.java:7: error: illegal start of expression
if(a.equals("H")%%?b.equals("H"))System.out.println("H");
^
Main.java:7: error: illegal character: '\u3000'
if(a.equals("H")%%?b.equals("H"))System.out.println("H");
^
Main.java:7: error: ';' expected
if(a.equals("H")%%?b.equal... |
s729171504 | p03777 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
String a =sc.next();
String b =sc.next();
if(a.equals("H")%%b.equals("H"))System.out.println("H");
if(a.equals("H")%%b.equals("D"))System.out.println(... | Main.java:7: error: illegal start of expression
if(a.equals("H")%%b.equals("H"))System.out.println("H");
^
Main.java:8: error: illegal start of expression
if(a.equals("H")%%b.equals("D"))System.out.println("D");
^
Main.java:9: error: illegal start of express... |
s287341470 | p03777 | Java | import java.util.Scanner;
public class HonestOrDishonest {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int a = Integer.parseInt(scn.next());
int b = Integer.parseInt(scn.next());
int H = Integer.parseInt(scn.next());
int D = Integer.parseInt(scn.next());
if ( a == H &... | Main.java:3: error: class HonestOrDishonest is public, should be declared in a file named HonestOrDishonest.java
public class HonestOrDishonest {
^
1 error
|
s619937080 | p03777 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int a =sc.nextInt();
int b =sc.nextInt();
if(a=="H" %% b=="H")System.out.println("H");{
if(a=="H" %% b=="D")System.out.println("D");{
if(a=="D"... | Main.java:7: error: illegal start of expression
if(a=="H" %% b=="H")System.out.println("H");{
^
Main.java:8: error: illegal start of expression
if(a=="H" %% b=="D")System.out.println("D");{
^
Main.java:9: error: illegal start of expression
if(a=="D" %% b=="H")Sys... |
s288028854 | p03777 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int a =sc.nextInt();
int b =sc.nextInt();
if(a=="H" %% b=="H")System.out.println("H");
if(a=="H" %% b=="D")System.out.println("D");
if(a=="D" %... | Main.java:7: error: illegal start of expression
if(a=="H" %% b=="H")System.out.println("H");
^
Main.java:8: error: illegal start of expression
if(a=="H" %% b=="D")System.out.println("D");
^
Main.java:9: error: illegal start of expression
if(a=="D" %% b=="H")Syste... |
s141656385 | p03777 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int a =sc.nextInt();
int b =sc.nextInt();
if(a=="H" %% b=="H")System.out.println("H");
if(a=="H" %% b=="D")System.out.println("D");
if(a=="D" %... | Main.java:7: error: illegal start of expression
if(a=="H" %% b=="H")System.out.println("H");
^
Main.java:8: error: illegal start of expression
if(a=="H" %% b=="D")System.out.println("D");
^
Main.java:9: error: illegal start of expression
if(a=="D" %% b=="H")Syste... |
s730626301 | p03777 | Java | import java.util.*;
public class ABC056_A {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
String a=sc.next(),b=sc.next();
if(a.equals("H")&&b.equals("H"))System.out.println("H");
else if(a.equals("H")&&b.equals("D"))System.out.println("D");
else if(a.equals("D")&&b.equals("H"))S... | Main.java:2: error: class ABC056_A is public, should be declared in a file named ABC056_A.java
public class ABC056_A {
^
1 error
|
s717752295 | p03777 | Java | import java.util.*;
public class ABC056_A {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
if(sc.next().equals("H")&&sc.next().equals("H"))System.out.println("H");
if(sc.next().equals("H")&&sc.next().equals("D"))System.out.println("D");
if(sc.next().equals("D")&&sc.next().equals("H... | Main.java:2: error: class ABC056_A is public, should be declared in a file named ABC056_A.java
public class ABC056_A {
^
1 error
|
s350546665 | p03777 | Java | package spring21;
import java.util.*;
public class ABC056_A {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
if(sc.next().equals("H")&&sc.next().equals("H"))System.out.println("H");
if(sc.next().equals("H")&&sc.next().equals("D"))System.out.println("D");
if(sc.next().equals("D")&&s... | Main.java:3: error: class ABC056_A is public, should be declared in a file named ABC056_A.java
public class ABC056_A {
^
1 error
|
s900525029 | p03777 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
char a, b;
cin >> a;
cin >> b;
cout << ((a=='D' ? 1 : 0)^(b=='D' ? 1 : 0)) ? 'D' : 'H' << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:58: error: invalid operands of types 'char' and '<unresolved overloaded function type>' to binary 'operator<<'
8 | cout << ((a=='D' ? 1 : 0)^(b=='D' ? 1 : 0)) ? 'D' : 'H' << endl;
| ~~~~^~~~~~~
|
s170898957 | p03777 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
char a, b;
cin >> a;
cin >> b;
cout << (a=='D' ? 1 : 0)^(b=='D' ? 1 : 0) ? 'D' : 'H' << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:26: error: no match for 'operator^' (operand types are 'std::basic_ostream<char>' and 'int')
8 | cout << (a=='D' ? 1 : 0)^(b=='D' ? 1 : 0) ? 'D' : 'H' << endl;
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
| | |
| std::ba... |
s241064690 | p03777 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
char a, b;
cin >> a;
cin >> b;
cout << (a=='D')^(b=='D') ? 'D' : 'H' << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:18: error: no match for 'operator^' (operand types are 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'bool')
8 | cout << (a=='D')^(b=='D') ? 'D' : 'H' << endl;
| ~~~~~~~~~~~~~~~~^~~~~~~~~
| | |
| | ... |
s811523714 | p03777 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(void){
string a, b;
cin >> a;
cin >> b;
cout << ((((a=='D' ? 1 : 0)+(b=='D' ? 1 : 0))&1) ? 'D' : 'H') << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:15: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'char')
8 | cout << ((((a=='D' ? 1 : 0)+(b=='D' ? 1 : 0))&1) ? 'D' : 'H') << endl;
| ~^~~~~
| | |
| | ... |
s761788375 | p03777 | C++ | #include<bites/stdc++.h>
using namespace std;
int main(void){
string a, b;
cin >> a;
cin >> b;
cout << ((((a=='D' ? 1 : 0)+(b=='D' ? 1 : 0))&1) ? 'D' : 'H') << endl;
return 0;
} | a.cc:1:9: fatal error: bites/stdc++.h: No such file or directory
1 | #include<bites/stdc++.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s777952012 | p03777 | Java | package spring21;
public class ABC056_A {
public static void main(String[] args){
char a='D',b='H';
if(a=='H'&&b=='H')System.out.println("H");
if(a=='H'&&b=='D')System.out.println("D");
if(a=='D'&&b=='H')System.out.println("D");
if(a=='D'&&b=='D')System.out.println("H");
}
} | Main.java:3: error: class ABC056_A is public, should be declared in a file named ABC056_A.java
public class ABC056_A {
^
1 error
|
s102007698 | p03777 | Java | package spring21;
public class ABC056_A {
public static void main(String[] args){
char a='D',b='H';
if(a=='H'&&b=='H')System.out.println("H");
if(a=='H'&&b=='D')System.out.println("D");
if(a=='D'&&b=='H')System.out.println("D");
if(a=='D'&&b=='D')System.out.println("H");
}
} | Main.java:3: error: class ABC056_A is public, should be declared in a file named ABC056_A.java
public class ABC056_A {
^
1 error
|
s399610753 | p03777 | Java | public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
String a = sc.next() ;
String b = sc.next() ;
char A = a.charAt(0);
char B = b.charAt(0);
if(A == 'H' && B == 'H'){
System.out.println('H');
}
if(A == 'H' && B =... | Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s004548927 | p03777 | Java | public class A11 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
String a = sc.next() ;
String b = sc.next() ;
char A = a.charAt(0);
char B = b.charAt(0);
if(A == 'H' && B == 'H'){
System.out.println('H');
}
if(A == 'H' && B ==... | Main.java:1: error: class A11 is public, should be declared in a file named A11.java
public class A11 {
^
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class A11
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);... |
s101077778 | p03777 | Java | public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
String a = sc.next() ;
String b = sc.next() ;
char A = a.charAt(0);
char B = b.charAt(0);
if(A == 'H' && B == 'H'){
System.out.println('H');
}
if(A == 'H' && B =... | Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s079212639 | p03777 | C++ | inpt = raw_input().split()
if inpt[0] == 'H':
print inpt[1]
elif inpt[0] == 'D':
if inpt[1] == 'H':
print 'D'
elif inpt[1] == 'D':
print 'H' | a.cc:1:1: error: 'inpt' does not name a type; did you mean 'int'?
1 | inpt = raw_input().split()
| ^~~~
| int
|
s577107784 | p03777 | C++ | a, b = input().split()
if a == b:
print("H")
else:
print("D") | a.cc:1:1: error: 'a' does not name a type
1 | a, b = input().split()
| ^
|
s866263068 | p03777 | C++ | #include<iostream>
int main(){
string 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:5:3: error: 'string' was not declared in this scope
5 | string a,b;
| ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream... |
s813589890 | p03777 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve()
{
char a, b;
cin >> a >> b;
if( a == "H" ){
cout << b << "\n";
}
else {
b == "H"? cout << "D\n" : cout << "H\n";
}
}
int main() {
solve();
return 0;
}
| a.cc: In function 'void solve()':
a.cc:9:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
9 | if( a == "H" ){
| ~~^~~~~~
a.cc:13:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
13 | b == "H"? cout << "D\n" : cout << "H\n";... |
s228500637 | p03777 | C++ | #include <iostream>
using namespace std;
int main(){
long long int X;
int sum=0;
cin>>X;
for(int i=1 ;; i++){ //i=0だとわかりにくい
sum+=i;
if(sum>=X){
break;
}
cout<<i;
}
... | a.cc:1:2: error: extended character is not valid in an identifier
1 | #include <iostream>
| ^
a.cc:1:2: error: invalid preprocessing directive #include\U00003000
1 | #include <iostream>
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:11: error: 'cin' was not declared in this scope
6 | ... |
s065112130 | p03777 | C++ | #include <iostream>
using namespace std;
int main(){
long long int X;
int sum=0;
cin>>X;
for(int i=1 ; ; i++){ //i=0だとわかりにくい
sum+=i;
if(sum>=X){
break;
}
cout<<i<<endl;
... | a.cc:1:2: error: extended character is not valid in an identifier
1 | #include <iostream>
| ^
a.cc:1:2: error: invalid preprocessing directive #include\U00003000
1 | #include <iostream>
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:11: error: 'cin' was not declared in this scope
6 | ... |
s487186644 | p03777 | Java | public class Judge{
public static void main(String[] args){
String a = new java.util.Scanner( System.in ).nextLine();
String b = new java.util.Scanner( System.in ).nextLine();
if( a.equals("H")){
if( b.equals("H")){
System.out.println("H");
}
if( b.equals("D")){
System.out.println("D");
}
... | Main.java:1: error: class Judge is public, should be declared in a file named Judge.java
public class Judge{
^
1 error
|
s342436224 | p03777 | Java | package AtCoder;
import java.util.*;
public class NarrowRectanglesEasy {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int W=sc.nextInt();
int a=sc.nextInt();
int b=sc.nextInt();
int z=Math.abs(a-b);
if(z<=W) {
z=0;
}else{
z=z-W;... | Main.java:3: error: class NarrowRectanglesEasy is public, should be declared in a file named NarrowRectanglesEasy.java
public class NarrowRectanglesEasy {
^
1 error
|
s400328783 | p03777 | C++ | #include<bits/stdc++.h>
using namespace std;
main(){
char a,b;
cin>>a;
if(a=='H'){
cin>>b;
cout<<b<<endl;
}
else{
cin>>b;
if(b=="H")cout<<"D"<<endl;
else cout<<"H"<<endl;
}
} | a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
3 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:12:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
12 | if(b=="H")cout<<"D"<<endl;
| ~^~~~~
|
s386056602 | p03777 | Java | import java.util.Scanner;
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String x = "";
x = s.next();
char[] c = new char[2];
c[0] = x.charAt(0);
c[1] = x.charAt(1);
if(c[0] == c[1]){
System.out.println('H');
} else {
System.out.println('D');
}
}
| Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
1 error
|
s750770886 | p03777 | Java | import java.util.Scanner;
public class Go {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String x = "";
x = s.next();
char[] c = new char[2];
c[0] = x.charAt(0);
c[1] = x.charAt(1);
if(c[0] == c[1]){
System.out.println('H');
} else {
System.out.println('D');... | Main.java:3: error: class Go is public, should be declared in a file named Go.java
public class Go {
^
1 error
|
s154505628 | p03777 | Java | public class Go {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String x = "";
x = s.next();
char[] c = new char[2];
c[0] = x.charAt(0);
c[1] = x.charAt(1);
if(c[0] == c[1]){
System.out.println('H');
} else {
System.out.println('D');
}
}
} | Main.java:1: error: class Go is public, should be declared in a file named Go.java
public class Go {
^
Main.java:4: error: cannot find symbol
Scanner s = new Scanner(System.in);
^
symbol: class Scanner
location: class Go
Main.java:4: error: cannot find symbol
Scanner s = new Scanner(System.in);
... |
s080747257 | p03777 | Java | public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String x = "";
x = s.next();
char[] c = new char[2];
c[0] = x.charAt(0);
c[1] = x.charAt(1);
if(c[0] == c[1]){
System.out.println('H');
} else {
System.out.println('D');
}
} | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
1 error
|
s551919076 | p03777 | C++ | #include<cstdilo>
int main(){
char w[2] = { 'H', 'D' };
char in1, in2;
int a = 0;
scanf("%c %c", &in1, &in2);
if(in1 == 'D') a++;
if(in2 == 'D') a = (a+1)%2;
if(a == 0) printf("H");
if(a == 1) printf("D");
return 0;
} | a.cc:1:9: fatal error: cstdilo: No such file or directory
1 | #include<cstdilo>
| ^~~~~~~~~
compilation terminated.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.