submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s390313406 | p03697 | C++ | def solve():
a,b=map(int,input().split())
if a+b>=10:
print("error")
else:
print(a+b)
if __name__ == "__main__":
solve() | a.cc:1:1: error: 'def' does not name a type
1 | def solve():
| ^~~
|
s108408704 | p03697 | C++ | open Printf
open Scanf
let () =
let solve a b =
let x = a + b in
if x >= 10 then "error" else x |> string_of_int in
scanf "%d %d\n" solve |> printf "%s\n"
| a.cc:1:1: error: 'open' does not name a type
1 | open Printf
| ^~~~
|
s785550606 | p03697 | C++ | asdfjklasdilfasdjkkasdjfkjlasdjkflasdkjlfkjasldfkjlaseiuruaasdfsadfasdfasedfasdf | a.cc:1:1: error: 'asdfjklasdilfasdjkkasdjfkjlasdjkflasdkjlfkjasldfkjlaseiuruaasdfsadfasdfasedfasdf' does not name a type
1 | asdfjklasdilfasdjkkasdjfkjlasdjkflasdkjlfkjasldfkjlaseiuruaasdfsadfasdfasedfasdf
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
s866904168 | p03697 | C++ | #include <stdio.h>
#include <string.h>
int main()
{
char s[30];
int a[26]={0};
// scanf("%s",s);
gets(s);
int n=strlen(s);
for(int i=0;i<n;i++)
a[s[i]-'a']++;
int dif=0;
for(int i=0;i<26;i++)
if(a[i]>1){
dif=1; break;
}
if(dif==0)
printf("yes");
else
printf("no");
return 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(s);
| ^~~~
| getw
|
s945037206 | p03697 | C++ | #include <stdio.h>
#include <string.h>
int main()
{
char s[30];
int a[26]={0};
// scanf("%s",s);
gets(s);
int n=strlen(s);
for(int i=0;i<n;i++)
a[s[i]-'a']++;
int dif=0;
for(int i=0;i<26;i++)
if(a[i]>1){
dif=1; break;
}
if(dif==0)
printf("yes");
else
printf("no");
return 0;
} | a.cc: In function 'int main()':
a.cc:9:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(s);
| ^~~~
| getw
|
s350384246 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
c=a+b;
if(c>=10) cout<<"error";
else cout<<c;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'c' was not declared in this scope
6 | c=a+b;
| ^
|
s384182796 | p03697 | C++ | import java.util.Scanner
fun main(args: Array<String>) {
val cin = Scanner(System.`in`)
val a = cin.nextInt()
val b = cin.nextInt()
if (a + b in 0..9) {
println(a + b)
} else {
println("error")
}
cin.close()
} | a.cc:4:28: error: stray '`' in program
4 | val cin = Scanner(System.`in`)
| ^
a.cc:4:31: error: stray '`' in program
4 | val cin = Scanner(System.`in`)
| ^
a.cc:8:16: error: too many decimal points in number
8 | if (a + b in 0..9) {
... |
s403444123 | p03697 | C++ |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
if ((A + B) < 10) {
System.out.println(A+B);
}
else
System.out.println("err... | a.cc:2:1: error: 'import' does not name a type
2 | import java.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s064683148 | p03697 | C++ | #include<iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
if(a+b<10)
cout<<a+b<<endl;
else
cout<<"error"<<endl;
return 0;
| a.cc: In function 'int main()':
a.cc:12:10: error: expected '}' at end of input
12 | return 0;
| ^
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s161002168 | p03697 | C++ | #include<iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
if(a+b<10)
cout<<a+b<<endl;
else
cout<<"error"<<endl
return 0;
} | a.cc: In function 'int main()':
a.cc:11:20: error: expected ';' before 'return'
11 | cout<<"error"<<endl
| ^
| ;
12 | return 0;
| ~~~~~~
|
s095141816 | p03697 | C++ | #include <iostream>
#include <set>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int N, A, B; cin >> N >> A >> B;
int hits = 0;
vector<int> healths;
while(N--)
{
int num; cin >> num;
healths.push_back(num);
}
sort(healths.begin(), healths.end(... | a.cc: In function 'int main()':
a.cc:22:17: error: 'ceil' was not declared in this scope
22 | hits += ceil((healths[i]-healths[i-1])/(A-B));
| ^~~~
|
s778583856 | p03697 | C++ | #include <iostream>
using namespace std;
int main(void){
int a, b;
cin << a << " " << b;
int out = a + b;
if(out < 10)
cout << out;
else
cout << "error";
return 0;
} | 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 'int')
7 | cin << a << " " << b;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:7:9: no... |
s322896410 | p03697 | C++ | #include <cassert>
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
/*
//#if __cplusplus >= ... | a.cc:118:13: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
118 | else cout<'error'<<endl;
| ^~~~~~~
a.cc: In function 'void solve()':
a.cc:118:20: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
118 | ... |
s577774247 | p03697 | C++ | /*
ID:greenty2
LANG:C++
TASK:
*/
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
if(a+b>=10)
{
cout<<error<<endl;
}
else
{
cout<<a+b<<endl;
}
} | a.cc: In function 'int main()':
a.cc:14:23: error: 'error' was not declared in this scope; did you mean 'perror'?
14 | cout<<error<<endl;
| ^~~~~
| perror
|
s708433631 | p03697 | C++ | a, b = gets.strip.split.map(&:to_i)
c = a + b
puts c >= 10 ? 'error' : c | a.cc:5:16: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
5 | puts c >= 10 ? 'error' : c
| ^~~~~~~
a.cc:1:1: error: 'a' does not name a type
1 | a, b = gets.strip.split.map(&:to_i)
| ^
|
s957093182 | p03697 | C | #include <stdio.h>
int main(){
int n, i, j, work=0, sum, s[150];
scanf("%d", &n);
for (i=0;i<n;i++)
{
scanf("%d", &s[i]);
sum+=s[i];
}
i=0;
for(i=0;i<n;i++){
for(j=1;j<=;j++){
if(s[i]>s[j]){
work=s[i];
s[i]=s[j];
s[]j=work;
}
}
}
while(1){
if(su... | main.c: In function 'main':
main.c:13:16: error: expected expression before ';' token
13 | for(j=1;j<=;j++){
| ^
main.c:17:11: error: expected expression before ']' token
17 | s[]j=work;
| ^
|
s740949494 | p03697 | C | #include <iostream>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
if (A + B < 10){
cout << A + B << endl;
}else{
cout << "error" << endl;
}
return 0;
}
| main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s908671346 | p03697 | C++ | #include<stdio.h>
int main(){
int a,b;
int c;
c=a+b;
if(c<10){
printf("%d\n",c);
}else{
printf("%s",error);
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:15: error: 'error' was not declared in this scope; did you mean 'perror'?
9 | printf("%s",error);
| ^~~~~
| perror
|
s665150725 | p03697 | C++ | #include<stdio.h>
2.int main(){
3. int a,b;
4. int c;
5. c=a+b;
6. if(c<10){
7. printf("%d\n",c);
8. }else{
9. printf("%s",error);
10. }
11. return 0;
12.}
| a.cc:2:1: error: expected unqualified-id before numeric constant
2 | 2.int main(){
| ^~~~~
|
s589285439 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
if( a + b > 10 ){
cout << "error" << endl;
break;
}else{
cout << a + b << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:10:14: error: break statement not within loop or switch
10 | break;
| ^~~~~
|
s251522100 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
if( a + b > 10 ){
cout << "error" << endl;
break;
}
cout << a + b << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:10:14: error: break statement not within loop or switch
10 | break;
| ^~~~~
|
s095134183 | p03697 | C++ |
#include <iostream>
#ifdef LOCAL
#define debugEcho(expr) cout << expr << "\n";
#else
#define debugEcho(expr)
#endif
using namespace std;
#define at ,<=,
#define to ,<,
#define in ,
#define forrange(...) forrange1(forrange2, (__VA_ARGS__))
#define forrange1(X, A) X A
#define forrange2(i, s, op, e) for (int i = ... | a.cc:29:1: error: expected declaration before '}' token
29 | }
| ^
|
s949956138 | p03697 | C | #include<stdio.h>
int main(void){
int A,B;
scanf("%d %d",&A,&B);
if(A+B<10){
printf("%d\n",A+B);
else{
printf("error\n");
}
return 0;
} | main.c: In function 'main':
main.c:7:9: error: expected '}' before 'else'
7 | else{
| ^~~~
|
s290069941 | p03697 | C | #include<stdio.h>
int main(void){
int A,B;
scanf("%d %d",%A,%B);
if(A+B<10){
printf("%d",A+B);
}else{
printf("error");
}
return 0;
} | main.c: In function 'main':
main.c:4:23: error: expected expression before '%' token
4 | scanf("%d %d",%A,%B);
| ^
|
s731436701 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
int a, b, c;
cin >> a >> b;
a+b=c;
if( c > 10 ){
cout << "error" << endl;
}
cout << c << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:8:10: error: lvalue required as left operand of assignment
8 | a+b=c;
| ~^~
|
s118989892 | p03697 | Java | import java.util.*;
public class Main{
public static void main (String [] args){
Scanner in =new Scanner(System.in);
int a=0;b=0;
a=in.nextInt();
b=in.nextInt();
if(a+b>=10) System.out.println("error");
else System.out.println(a+b);
}
} | Main.java:5: error: cannot find symbol
int a=0;b=0;
^
symbol: variable b
location: class Main
Main.java:7: error: cannot find symbol
b=in.nextInt();
^
symbol: variable b
location: class Main
Main.java:8: error: cannot find symbol
if(a+b>=10) System.out.println("erro... |
s890693422 | p03697 | C | #include<stdio.h>
int main(void){
int A,B;
scanf("%d %d",%A,%B);
if(A+B<10){
printf("%d",A+B);
else{
printf("error");
}
return 0;
} | main.c: In function 'main':
main.c:4:19: error: expected expression before '%' token
4 | scanf("%d %d",%A,%B);
| ^
main.c:7:5: error: expected '}' before 'else'
7 | else{
| ^~~~
|
s407945610 | p03697 | Java | import java.io.*;
import java.util.*;
import java.math.BigInteger;
public class CB063B {
public static void main(String[] args) {
InputReader in = new InputReader(System.in);
PrintWriter w = new PrintWriter(System.out);
int sum=in.nextInt()+in.nextInt();
if (sum>=10)
w.println("error");
... | Main.java:4: error: class CB063B is public, should be declared in a file named CB063B.java
public class CB063B {
^
1 error
|
s732298036 | p03697 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc= new Scanner(System.in);
int N=sc.nextInt();
int M=sc.nextInt();
int sum=N+M;
if (sum<10)
{System.out.println(sum);}
else
{System.out.println("error");}
}
| Main.java:14: error: reached end of file while parsing
}
^
1 error
|
s360040950 | p03697 | Java | import java.util.Scanner;
public class Restricted {
public static void main(String[] args){
Scanner sc= new Scanner(System.in);
int N=sc.nextInt();
int M=sc.nextInt();
int sum=N+M;
if (sum<10)
{System.out.println(sum);}
else
{System.out.println("error");}
}
}
| Main.java:3: error: class Restricted is public, should be declared in a file named Restricted.java
public class Restricted {
^
1 error
|
s285102200 | p03697 | C++ | #include<bit/stdc++.h>
using namespace std;
int main ()
{
int a,b;
cin>>a>>b;
if((a+b)>=10) cout<<"error"<<endl;
else cout<<a+b<<endl;
return 0;
}
| a.cc:1:9: fatal error: bit/stdc++.h: No such file or directory
1 | #include<bit/stdc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s191801523 | p03697 | C++ | #include<iostream>
using namespace std;
int a,b;
int main(){
cin >>a>>b;
if (a+b>=10){
cout<<"error"<<endl;
return 0;
}
cout <<a+b<<end;
return 0;
} | a.cc: In function 'int main()':
a.cc:12:11: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
12 | cout <<a+b<<end;
| ~~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/1... |
s817246505 | p03697 | C++ | #include <cstdio>
int main()
{
int a, b;
scanf("%d %d", &a, %b);
if (a + b > 9)
printf("error\n");
else
printf("%d\n", a + b);
} | a.cc: In function 'int main()':
a.cc:6:24: error: expected primary-expression before '%' token
6 | scanf("%d %d", &a, %b);
| ^
|
s314162233 | p03697 | C++ | A,B=map(int,input().split())
if A+B>=10:
print("error")
else:
print(A+B) | a.cc:1:1: error: 'A' does not name a type
1 | A,B=map(int,input().split())
| ^
|
s524119304 | p03697 | Java |
package abc075;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class MainA {
public static void main(String[] args) throws IOException {
BufferedReader input =new BufferedReader (new InputStreamReader (System.in));
String str = input.readLine( );
String[] ... | Main.java:8: error: class MainA is public, should be declared in a file named MainA.java
public class MainA {
^
1 error
|
s067714800 | p03697 | C++ | #include<iosream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
if(a+b>=10) cout<<"error"<<endl;
else cout<<a+b<<endl;
return 0;
}
| a.cc:1:9: fatal error: iosream: No such file or directory
1 | #include<iosream>
| ^~~~~~~~~
compilation terminated.
|
s073143299 | p03697 | C++ | #include<iostream>
int main()
{
int a,b,c;
cin<<a<<b;
c=a+b;
if(c>=10)cout<<"error";
else cout<<c;
} | a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin<<a<<b;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard... |
s442274459 | p03697 | C++ | #include <iostream>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
cout << (A + B < 10) ? A + B : "error" << endl;
} | a.cc: In function 'int main()':
a.cc:8:44: error: invalid operands of types 'const char [6]' and '<unresolved overloaded function type>' to binary 'operator<<'
8 | cout << (A + B < 10) ? A + B : "error" << endl;
| ~~~~~~~~^~~~~~~
|
s419831950 | p03697 | C |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
int main(){
int a, b;
scanf(" %d %d", &a, &b);
if(a + b >=10){
printf("error");
else{
printf("%d", a+b);
}
return 0;
}
| main.c: In function 'main':
main.c:12:5: error: expected '}' before 'else'
12 | else{
| ^~~~
|
s935294584 | p03697 | C++ | #include <cstdio>
#include <stdio.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <vector>
#include <iostream.h>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int ... | a.cc:7:10: fatal error: iostream.h: No such file or directory
7 | #include <iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s553698460 | p03697 | C++ | #include<stdio.h>
#include<conio.h>
#include<iostream>
using namespace std;
int main(void)
{
int x,y;
cin >> x;
cin >> y;
if (x + y >= 10) {
cout << "error" << endl;
}
else {
cout << x + y << endl;
}
return(0);
} | a.cc:2:9: fatal error: conio.h: No such file or directory
2 | #include<conio.h>
| ^~~~~~~~~
compilation terminated.
|
s180731321 | p03697 | C |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
int main(){
int a, b;
scanf(" %d %d", &a, &b);
if(a + b >=10){
printf("error");
else{
printf("%d", a+b);
}
return 0;
}
}
| main.c: In function 'main':
main.c:12:5: error: expected '}' before 'else'
12 | else{
| ^~~~
main.c: At top level:
main.c:17:1: error: expected identifier or '(' before '}' token
17 | }
| ^
|
s675867528 | p03697 | C++ | (defun solver ()
(let ((a (read)) (b (read)))
(if (>= (+ a b) 10)
(format t "error~%")
(format t "~A~%" (+ a b)))))
(solver) | a.cc:1:7: error: expected ')' before 'solver'
1 | (defun solver ()
| ~ ^~~~~~~
| )
|
s663252070 | p03697 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int a, b;
cin >> a >> b;
cout << (a + b >= 10? "error": a + b) << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:10:23: error: operands to '?:' have different types 'const char*' and 'int'
10 | cout << (a + b >= 10? "error": a + b) << endl;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~
|
s309309393 | p03697 | C |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
int main(){
long long int a, b;
scanf(" %d %d", &a, &b);
if(a + b >=10){
printf("error");
else{
printf("%d", a+b);
}
return 0;
}
}
| main.c: In function 'main':
main.c:12:5: error: expected '}' before 'else'
12 | else{
| ^~~~
main.c: At top level:
main.c:17:1: error: expected identifier or '(' before '}' token
17 | }
| ^
|
s415114971 | p03697 | C++ |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if(a+b>=10){
System.out.println("error");
}else{
... | a.cc:2:1: error: 'import' does not name a type
2 | import java.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s576549697 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
| a.cc: In function 'int main()':
a.cc:4:2: error: expected '}' at end of input
4 | {
| ~^
|
s764128249 | p03698 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string s;
for(int i = 0;i < s.size();i++){
for(int j = 0;j < s.size();j++){
if(s.at(i) == s.at(j){
cout << "no";
break;
}
}
if(i == s.at(s.size() - 1)){
cout << "yes";
break;
}
... | a.cc: In function 'int main()':
a.cc:9:26: error: expected ')' before '{' token
9 | if(s.at(i) == s.at(j){
| ~ ^
| )
a.cc:13:8: error: expected primary-expression before '}' token
13 | }
| ^
|
s599869748 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = 1; i < (int)(n+1); i++)
int main() {
string S;
cin>>S;
bool a=false;
sort(S.begin(),S.end());
int a=S.size();
rep(i,a){... | a.cc: In function 'int main()':
a.cc:12:9: error: conflicting declaration 'int a'
12 | int a=S.size();
| ^
a.cc:10:10: note: previous declaration as 'bool a'
10 | bool a=false;
| ^
|
s477705809 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
string ans="yes";
for(int j=0;j<S.size()-1;j++){
for(int i=j+1;i<S.size()-1;i++){
if(S.at(j)==S.at(i)){
ans="no"
break;
}
}
}
cout <<ans<<endl;
}
| a.cc: In function 'int main()':
a.cc:11:13: error: expected ';' before 'break'
11 | ans="no"
| ^
| ;
12 | break;
| ~~~~~
|
s285936559 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
string ans="yes"
for(int j=0;j<S.size()-1;j++){
for(int i=j+1;i<S.size()-1;i++){
if(S.at(j)==S.at(i)){
ans="no"
break;
}
}
}
cout <<ans<<endl;
} | a.cc: In function 'int main()':
a.cc:8:1: error: expected ',' or ';' before 'for'
8 | for(int j=0;j<S.size()-1;j++){
| ^~~
a.cc:8:13: error: 'j' was not declared in this scope
8 | for(int j=0;j<S.size()-1;j++){
| ^
|
s219592140 | p03698 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#define pi 3.14159265358979323846264338327950
int main() {
std::string s; std::cin >> s;
std::string d = s;
std::unique(d.begin(), d.end());
if (d.size() == s.size())std::cout << "yes" << endl;
el... | a.cc: In function 'int main()':
a.cc:14:20: warning: ignoring return value of '_FIter std::unique(_FIter, _FIter) [with _FIter = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >]', declared with attribute 'nodiscard' [-Wunused-result]
14 | std::unique(d.begin(), d.end());
| ~~~... |
s386444972 | p03698 | C | #include <unistd.h>
void ft_putchar(char c)
{
char result;
result = write(1, &c, 1);
}
void ft_putstr(char *str)
{
while(*str)
ft_putchar(*(str++));
}
int main()
{
int i;
int j;
char *c;
(void)ac;
read(0, c, 30);
i = 0;
while (c[i])
{
j = i + 1;
while (c[j])
{
... | main.c: In function 'main':
main.c:21:9: error: 'ac' undeclared (first use in this function); did you mean 'c'?
21 | (void)ac;
| ^~
| c
main.c:21:9: note: each undeclared identifier is reported only once for each function it appears in
|
s944985181 | p03698 | C | #include <unistd.h>
void ft_putchar(char c)
{
char result;
result = write(1, &c, 1);
}
void ft_putstr(char *str)
{
while(*str)
ft_putchar(*(str++));
}
int main()
{
int i;
int j;
char c;
(void)ac;
read(S, c, 30);
i = 0;
while (c[i])
{
j = i + 1;
while (c[j])
{
... | main.c: In function 'main':
main.c:21:9: error: 'ac' undeclared (first use in this function); did you mean 'c'?
21 | (void)ac;
| ^~
| c
main.c:21:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:8: error: 'S' undeclared (first use in th... |
s373624279 | p03698 | C | #include <unistd.h>
void ft_putchar(char c)
{
char result;
result = write(1, &c, 1);
}
void ft_putstr(char *str)
{
while(*str)
ft_putchar(*(str++));
}
int main(int ac, char **av)
{
int i;
int j;
(void)ac;
i = 0;
while (av[1][i])
{
j = i + 1;
while (av[1][j])
{
if... | main.c:41:6: error: redefinition of 'ft_putchar'
41 | void ft_putchar(char c)
| ^~~~~~~~~~
main.c:3:6: note: previous definition of 'ft_putchar' with type 'void(char)'
3 | void ft_putchar(char c)
| ^~~~~~~~~~
main.c:47:6: error: redefinition of 'ft_putstr'
47 | void ft_putstr(char *str)
... |
s295428498 | p03698 | C | #include <stdio.h>
int main(int argc, char *argv[])
{
int i = 0;
int j;
(void)argc;
while (*argv[1][i])
{
j = i;
while (argv[1][j])
{
if (argv[1][j] == argv[1][i])
{
printf("no");
return (0);
}
j++;
}
i++;
}
printf("yes");
return (0);
}
| main.c: In function 'main':
main.c:9:10: error: invalid type argument of unary '*' (have 'int')
9 | while (*argv[1][i])
| ^~~~~~~~~~~
|
s484952881 | p03698 | C | int main()
{
int i;
int j;
i = 0;
while (S[i])
{
j = i + 1;
while (S[j])
{
if (S[i] = S[j])
{
putstr("no");
return ;
}
j++;
}
i++;
}
putstr("yes");
return;
} | main.c: In function 'main':
main.c:7:10: error: 'S' undeclared (first use in this function)
7 | while (S[i])
| ^
main.c:7:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:13: error: implicit declaration of function 'putstr' [-Wimplicit-function-de... |
s750415015 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll ;
typedef double db;
const double pi = 3.141592654;
#define pb push_back
#define forab(i,a,b) for(int i=(a);i<=(b);i++)
#define CIN ios_base::sync_with_stdio(0); cin.tie(0)
#define pcase(z,x) printf("Case %ld: %lld\n",z,x)
#define nw ... | a.cc: In function 'int main()':
a.cc:21:9: error: 'else' without a previous 'if'
21 | else cout<<"yes";
| ^~~~
|
s345210866 | p03698 | Java | import java.util.*; import java.io.*; import java.math.*;
public class Main{
//Don't have to see. start------------------------------------------
static class InputIterator{
ArrayList<String> inputLine = new ArrayList<String>(1024);
int index = 0; int max; String read;
InputIterator(){
BufferedReader br = ne... | Main.java:72: error: incompatible types: ArrayList<String> cannot be converted to ArrayList<Integer>
ArrayList<Integer> s = nextCharArray();
^
Main.java:75: error: incompatible types: Integer cannot be converted to String
set.add(s.get(i));
^
Note: Main.java us... |
s674961014 | p03698 | C++ | cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder
kaedetoyokura@KaedenoMacBook-Air ~ % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder
4 3
1 2
2 3
1 4
2
2
1
kaedetoyokura@KaedenoMacBook-Air Desktop % cd "... | a.cc:2:14: error: stray '@' in program
2 | kaedetoyokura@KaedenoMacBook-Air ~ % cd "/Users/kaedetoyokura/Desktop/" && g++ atcoder.cpp -o atcoder && "/Users/kaedetoyokura/Desktop/"atcoder
| ^
a.cc:10:14: error: stray '@' in program
10 | kaedetoyokura@KaedenoMacBook-Air Desktop % cd "/Users/kaed... |
s997443821 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll =long long;
#define all(v) v.begin(),v.end()
int main() {
string S;
cin>>S;
set<char> A;
for(ll i=0;i<S.size();i++) {
if(A.count(S[i]) {
cout<<"no"<<endl;
return 0;
}
A.insert(S[i]);
}
cout<<"yes"<<endl;
} | a.cc: In function 'int main()':
a.cc:11:17: error: expected ';' before '{' token
11 | if(A.count(S[i]) {
| ^~
| ;
a.cc:15:18: error: expected ')' before ';' token
15 | A.insert(S[i]);
| ^
| )
a.cc:11:3: note: to match thi... |
s726477682 | p03698 | C | #include<iostream>
#include<string>
#include<set>
using namespace std;
int main(){
string s;
set<char> set;
cin >> s;
for (int i=0; i<s.size(); i++){
set.insert(s[i]);
}
if (set.size() == s.size()) cout << "yes" << endl;
else cout << "no" << endl;
return 0;
} | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s863610975 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s; cin >> s;
map<int, int>mp;
for(int i = 0; i < s.size(); ++i){
mp[s[i]-'a']++;
if(mps[i]-'a' > 1) {
cout << "no" << endl;
return 0;
}
}
cout << "yes" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:8: error: 'mps' was not declared in this scope; did you mean 'mp'?
9 | if(mps[i]-'a' > 1) {
| ^~~
| mp
|
s859403731 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数
int lcm(int ... | a.cc: In function 'int main()':
a.cc:66:25: error: expected ';' before 'y'
66 | tie ( x,y) = p.at(i)
| ^
| ;
67 | y++ ;
| ~
a.cc:72:25: error: expected ';' before 'if'
72 | tie ( x,y) = p.at(i)
| ... |
s843016320 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数
int lcm(int ... | a.cc: In function 'int main()':
a.cc:65:19: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<char, int> >, std::pair<char, int> >::value_type' {aka 'struct std::pair<char, int>'} has no member named 'at'
65 | p.at(s.at(i)).at(1)++ ;
| ^~
a.cc:68:17: error: '__gnu_cxx::__alloc_tr... |
s707379326 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数
int lcm(int ... | In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<char, int>':
/usr/... |
s581499093 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数
int lcm(int ... | In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<char, int>':
/usr/... |
s721300439 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数
int lcm(int ... | In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functional:64,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<char, int>':
/usr/... |
s973231868 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} //最大公約数
int lcm(int ... | a.cc: In function 'int main()':
a.cc:60:5: error: expected ',' or ';' before 'vector'
60 | vector < char , int > p(26);
| ^~~~~~
a.cc:62:5: error: 'p' was not declared in this scope
62 | p.at(i)= make_pair(a.at(i),0);
| ^
a.cc:65:5: error: 'p' was not declared in this scope
65 | ... |
s957809558 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> p[124,0];
string s;
cin >> s ;
for ( int i=0 ; i<s.size() ; i++){
p[(int)s.at(i)]++;
}
for ( int i=0 ; i<125 ; i++){
if (p[i]>2){
cout << "no" << endl;
return 0;
}
}
cout << "yes" << endl;
} | a.cc: In function 'int main()':
a.cc:5:20: error: expected ']' before ',' token
5 | vector<int> p[124,0];
| ^
| ]
a.cc:5:21: error: expected unqualified-id before numeric constant
5 | vector<int> p[124,0];
| ^
a.cc:9:5: error: 'p' w... |
s864050395 | p03698 | C++ | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;
int main() {
string s;
cin >> s;
sort(all(s));
for (int i = 1; i < n; i++) {
if (s[i - 1] == s[i]) {
cout << "no" << endl;
return 0;
}
}
cout << "yes" << en... | a.cc: In function 'int main()':
a.cc:11:23: error: 'n' was not declared in this scope
11 | for (int i = 1; i < n; i++) {
| ^
|
s782461733 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
#include <string.h>
int main()
{
char str[100];
int i,j,k,flag=1;
map<char,int> data;
gets(str);
for(i=0;i<strlen(str);i++)
{
data[str[i]]++;
}
for(i='a';i<'z';i++)
{
if(data[i]>1)
{
flag = 0;
break;
}
}
if(flag == 1) cout << "yes";
else... | a.cc: In function 'int main()':
a.cc:12:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | gets(str);
| ^~~~
| getw
|
s746377590 | p03698 | C | #include <stdio.h>
#include <string.h>
int main(void)
{
int i,n,a[26]={0};
char s[27];
sacnf("%s",s);
n=strlen(s);
for(i=0;i<n;i++)
a[s[i]-'a']++;
for(i=0;i<26;i++)
if(a[i]>1){
printf("yes");
... | main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
9 | sacnf("%s",s);
| ^~~~~
| scanf
|
s139633084 | p03698 | C | #include <stdio.h>
#include <string.h>
int main(void)
{
int i,n,a[26]={0};
char s[27];
sacnf("%s",s);
n=strlen(s);
for(i=0;i<n;i++)
a[s[i]-'a']++;
for(i=0;i<26;i++)
if(a[i]>1){
printf("yes");
... | main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
9 | sacnf("%s",s);
| ^~~~~
| scanf
|
s123512644 | p03698 | C | #include <stdio.h>
#include <string,h>
int main(void)
{
int i,n,a[26]={0};
char s[27];
sacnf("%s",s);
n=strlen(s);
for(i=0;i<n;i++)
a[s[i]-'a']++;
for(i=0;i<26;i++)
if(a[i]>1){
printf("yes");
... | main.c:2:10: fatal error: string,h: No such file or directory
2 | #include <string,h>
| ^~~~~~~~~~
compilation terminated.
|
s722627760 | p03698 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <cmath>
#include <string.h>
#include <string>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
string s;
cin >> s;
for (int i=0; i<s.length(); i++) {
... | a.cc: In function 'int main()':
a.cc:22:37: error: expected ';' before 'return'
22 | cout << "no" << '\n'
| ^
| ;
23 | return 0;
| ~~~~~~
|
s317440014 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
#define REP(i, n) for (LL i = 0; i < (LL)(n); i++)
#define FOR(i, m, n) for (LL i = m; i < n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define ALL(x) (x).begin(), (x).end()
#define SUM(x) accumulate(x.be... | a.cc: In function 'int main()':
a.cc:20:11: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsig... |
s836089988 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a,b;
cin >> a;
b = yes;
for(int i=0;i<a.size();i++){
if( a.at(i) == a.at(i+1) ){
b = no;
}
}
cout << b << endl;
}
| a.cc: In function 'int main()':
a.cc:9:8: error: 'yes' was not declared in this scope
9 | b = yes;
| ^~~
a.cc:15:11: error: 'no' was not declared in this scope
15 | b = no;
| ^~
|
s932514875 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
string a,b = yes;
cin >> a;
for(int i=0;i<a.at();i++){
if( a.at(i) == a.at(i+1) ){
b = no;
}
}
cout << b << endl;
}
| a.cc: In function 'int main()':
a.cc:6:17: error: 'yes' was not declared in this scope
6 | string a,b = yes;
| ^~~
a.cc:10:22: error: no matching function for call to 'std::__cxx11::basic_string<char>::at()'
10 | for(int i=0;i<a.at();i++){
| ~~~~^~
In file inclu... |
s742210511 | p03698 | C++ | #include<bts/stdc++.h>
using namespace std;
int main(){
string S; cin>>S;
int K=0;
sort(S.begin(),S.end());
for(int i=0; i<S.size()-1;i++){
if(S.at(i)!=S.at(i+1))
K++;
else continue;
}
if(K==S.size()-1)
cout<<"yes"<<endl;
else cout<<"no"<<endl;
} | a.cc:1:9: fatal error: bts/stdc++.h: No such file or directory
1 | #include<bts/stdc++.h>
| ^~~~~~~~~~~~~~
compilation terminated.
|
s392333494 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
string s;cin>>s;
int n = s.size();
sort(s,s+n);
rep(i,n-1)if(s[i+1]==s[i]){
cout<<"no"<<endl;
return 0;
}
cout<<"yes"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:13: error: no match for 'operator+' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
9 | sort(s,s+n);
| ~^~
| | |
| | int
| std::string {aka std::__cxx11::basic_string<c... |
s941048478 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string n;
cin >> n;
int k=n.size();
vector<char> vec(k+1);
for(int i=0;i<k;i++)
vec[i+1]=n[i];
bool A=true;
int s=1;
while(s <= k){
for(int i=0;i<k;i++){
if(vec[s]==n[i]){
A=false;
break;
}
s++;
}
... | a.cc: In function 'int main()':
a.cc:24:4: error: expected '}' at end of input
24 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s485922136 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using P = pair<int,string>;
int main() {
string s;
cin >> s;
set<char> a;
rep(i,n){
a.insert(s.at(i));
}
if(a.size() == s.size()) cout << "yes" << endl;
else cout << "no" << endl;
}
| a.cc: In function 'int main()':
a.cc:11:7: error: 'n' was not declared in this scope
11 | rep(i,n){
| ^
a.cc:3:45: note: in definition of macro 'rep'
3 | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
| ^
|
s584369282 | p03698 | C++ | #include<iostream>
using namespace std;
int main()
{
long long int a,b,c,x3=0,t;
string s;set<char>k;
cin>>s;
for(int i=0;i<s.size();i++){
k.insert(s[i]);}
if(k.size()==s.size())cout<<"yes";
else cout<<"no";
} | a.cc: In function 'int main()':
a.cc:7:14: error: 'set' was not declared in this scope
7 | string s;set<char>k;
| ^~~
a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
1 | #include<iostream>
+++ |+#include <set>
2 | using na... |
s700536139 | p03698 | C++ | #include<iostream>
using namespace std;
int main()
{
long long int a,b,c,x3=0,t;
string s;set<char>k;
cin>>s;
for(int i=0;i<s.size();i++){
k.insert(s[i]);
if(k.size()==s.size())cout<<"yes";
else cout<<"no";
} | a.cc: In function 'int main()':
a.cc:7:14: error: 'set' was not declared in this scope
7 | string s;set<char>k;
| ^~~
a.cc:2:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
1 | #include<iostream>
+++ |+#include <set>
2 | using na... |
s884931583 | p03698 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
#define MOD 1000000007
#define INF 1e9
#define All(x) (x).begin(), (x).end()
typedef long long ll;
using namespace std;
int main() {
string s;
cin>>s;
sort(All(s));
for(int i=0;i<N-1;i++){
if(s[i]==s[i+1]){
cout<<"no\n";
... | a.cc: In function 'int main()':
a.cc:14:17: error: 'N' was not declared in this scope
14 | for(int i=0;i<N-1;i++){
| ^
|
s400454913 | p03698 | C++ | #include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <iomanip>
#include <algorithm>
#include <sstream>
#include <string>
#include <math.h>
#include <set>
using namespace std;
typedef long long ll;
int main() {
ios::sync_with_stdio(false);
string s;
int a[26] = {};
cin >> s;
for (int i =... | a.cc: In function 'int main()':
a.cc:26:25: error: 'A' was not declared in this scope
26 | cout << "yes\n";A
| ^
|
s307329612 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
map<string,int>Map;
for(int i = 0; i < S.size(); i++) {
Map[S[i]]++;
}
for(int i = 0; i < S.size(); i++) {
if(Map[S[i]] > 1) {
cout << "no" << endl;
return 0;
}
}
... | a.cc: In function 'int main()':
a.cc:9:12: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
9 | Map[S[i]]++;
| ^
In file included from /usr/include/c++/... |
s580244435 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
map<string,int>Map;
for(int i = 0; i < S.size(); i++) {
map[S[i]]++;
}
for(int i = 0; i < S.size(); i++) {
if(map[S[i]] > 1) {
cout << "no" << endl;
return 0;
}
}
... | a.cc: In function 'int main()':
a.cc:9:14: error: expected ']' before '[' token
9 | map[S[i]]++;
| ^
| ]
a.cc:9:18: error: expected initializer before '++' token
9 | map[S[i]]++;
| ^~
a.cc:9:18: error: expected ';' before '++' token
a.... |
s900280799 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string S;
cin >> S;
map<string,int>Map;
for(int i = 0; i < S.size(); i++) {
map[S[i]]++;
}
for(int i = 0; i < S.size(); i++) {
if(map[i] > 1) {
cout << "no" << endl;
return 0;
}
}
co... | a.cc: In function 'int main()':
a.cc:9:14: error: expected ']' before '[' token
9 | map[S[i]]++;
| ^
| ]
a.cc:9:18: error: expected initializer before '++' token
9 | map[S[i]]++;
| ^~
a.cc:9:18: error: expected ';' before '++' token
a.... |
s864644467 | p03698 | C++ | #include <iostream>
#include <map>
#include <string>
using namespace std;
int main(){
string data;
cin>>data;
map<string,int> s;
for(int i=0;i<data.size();i++){
s[data[i]]=1;
}
if(data.size()==s.size()){
cout<<"yes"<<endl;
}
else if(data.size()!=s.size()){
cout<<"no"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:11:6: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
11 | s[data[i]]=1;
| ^
In file included from /usr/include/c++/14/map:63... |
s748057045 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
#define rep(i,a,b) for (int i = (a); i < (b); i++ )
typedef pair<int,int> P;
typedef long long ll;
const int INF = 100000000;
int main() {
string S;
cint >> S;
set<char> s;
rep(i,0,S.size()) {
s.insert(S[i]);
}... | a.cc: In function 'int main()':
a.cc:11:5: error: 'cint' was not declared in this scope; did you mean 'uint'?
11 | cint >> S;
| ^~~~
| uint
|
s171965227 | p03698 | C++ | //#include <tourist>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = 1e9;
const ll LINF = ll(1e18);
const int MOD = 1000000007;
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, ... | a.cc: In function 'int main()':
a.cc:57:18: error: expected ';' before 'if'
57 | m[s[i]]++
| ^
| ;
58 | if(m[s[i]]==2)return cout<<"no"<<"\n",0;
| ~~
|
s100908252 | p03698 | C++ | #include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const long long MOD=1e9+7;
int main() {
string s;
cin>>s;
vector<int> abc(26,0);
bool ans=true;
for(auto c:s){
abc[c-'a']++;
if(abs[c-'a']>1) ans=false;
}
if(ans) ... | a.cc: In function 'int main()':
a.cc:14:11: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
14 | if(abs[c-'a']>1) ans=false;
| ^
|
s537325826 | p03698 | C++ | #include<stdio.h>
#include<string.h>
int main()
{
char str[27];
int count=0,i,j, length;
gets(str);
length = strlen(str);
for(i=0; i<length; i++){
for(j=0; j<length; j++){
if(str[j]==str[i]) count++;
}
}
if(count>length) printf("no\n");
else printf("yes\n... | a.cc: In function 'int main()':
a.cc:9:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
9 | gets(str);
| ^~~~
| getw
|
s267175442 | p03698 | C++ | using System;
using System.Linq;
public class Program
{
static void Main()
{
char[] s1 = Console.ReadLine().ToCharArray();
var s2 = s1.Distinct();
Console.WriteLine(s1.Length == s2.Count() ? "yes" : "no");
}
} | 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:4:1: error: expected unqualified-id before 'public'
4 | public class Program
| ^~~~~~
|
s658596286 | p03698 | C++ | package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
func main() {
input := ReadLine()
chars := map[string]int{}
for _, v := range strings.Split(input, "") {
if _, exists := chars[v]; exists {
fmt.Println("no")
return
}
chars[v] = 1
}
fmt.Println("yes")
}
///////////////////////////... | a.cc:1:1: error: 'package' does not name a type
1 | package main
| ^~~~~~~
a.cc:28:1: error: 'func' does not name a type
28 | func fln(format string, elements ...interface{}) {
| ^~~~
a.cc:28:48: error: expected unqualified-id before ')' token
28 | func fln(format string, elements ...interface{}) ... |
s919192040 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
int size=s.size();
bool isidentical=false;
for(int i=0;i<size;i++){
for(int j=i;j<size;j++){
if(s.at(j)==s.at(i))isidentical=true;
}
}
if(is identical)cout<<"yes"<<endl;
else cout<<"no"<<endl;
} | a.cc: In function 'int main()':
a.cc:14:6: error: 'is' was not declared in this scope; did you mean 's'?
14 | if(is identical)cout<<"yes"<<endl;
| ^~
| s
a.cc:14:8: error: expected ')' before 'identical'
14 | if(is identical)cout<<"yes"<<endl;
| ~ ^~~~~~~~~~
| )
|
s286821207 | p03698 | C++ | #include<iostream>
#include<string.h>
using namespace std;
#define M 100
int main()
{
char str1[M],str2[M];
int res;
cin>>str1>>str2;
strrev(str2);
res=strcmp(str1, str2);
if(res == 0){
cout<<"YES"<<endl;
}
else{
cout<<"NO"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:13:5: error: 'strrev' was not declared in this scope; did you mean 'strsep'?
13 | strrev(str2);
| ^~~~~~
| strsep
|
s820215033 | p03698 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
cin.tie(0);
ios_base::sync_with_stdio(false);
string s;
cin>>s;
char c[30];
for(int i=0;i<s.length();i++){
c[i]=s[i];
}
sort(c,c+n);
int f=0;
for(int i=0;i<s.length()-1;i++){
if(c[i]==c[i+1]){
f++;
}
}
if(f){
cout<<... | a.cc: In function 'int main()':
a.cc:13:12: error: 'n' was not declared in this scope
13 | sort(c,c+n);
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.