submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s192613148 | p03697 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int a;
cin >> a;
int b;
cin >> b;
int c;
cin >> c;
int a;
cin >> a;
int b;
cin >> b;
if (a + b >= 10)
cout << "error" << endl;
else
cout << a + b << endl;
} | a.cc: In function 'int main()':
a.cc:14:21: error: redeclaration of 'int a'
14 | int a;
| ^
a.cc:6:13: note: 'int a' previously declared here
6 | int a;
| ^
a.cc:16:21: error: redeclaration of 'int b'
16 | int b;
| ^
a.cc:8:13: note: 'int b' previously declared here
8 | int b;
| ^
|
s425961971 | p03697 | C++ | #include <iostream>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if(a + b >= 10) {
cout << "error" << endl;
} else {
cout << a + b << endl;
}
} | a.cc: In function 'int main()':
a.cc:7:6: error: 'a' was not declared in this scope
7 | if(a + b >= 10) {
| ^
a.cc:7:10: error: 'b' was not declared in this scope
7 | if(a + b >= 10) {
| ^
|
s330790644 | p03697 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <stack>
#include <iomanip>
#include <queue>
#include <deque>
#include <sstream>
#include <stdio.h>
#include <string>
#include <cmath>
#include <map>
#include <utility>
using namespace std;
#define s(n) scanf("%d",&n)
#define sc(n) scanf("%c",&n)
#define ss(n) scanf("%s",&n)
#define MOD 1000000007
#define ll long long int
#define vi vector<int>
#define vii vector< vector<int> >
#define PI 3.1415926535897932384626433832795
int main() {
int a,b;
cin >> a >> b;
cout << (a+b > 9 ? "error" : (a+b));
return 0;
}
| a.cc: In function 'int main()':
a.cc:29:26: error: operands to '?:' have different types 'const char*' and 'int'
29 | cout << (a+b > 9 ? "error" : (a+b));
| ~~~~~~~~^~~~~~~~~~~~~~~~~
|
s674503069 | p03697 | C | #include <stdio.h>
int main() {
int i, j;
int tmp =0;
char str[26];
scanf("%s", str);
for(i = 0; < strlen(str); i++) {
for(j = i + 1; j < strlen(str); j++) {
if(str[i] == str[j]) {
tmp = 1;
}
}
}
if (tmp == 1) {
printf("no\n");
} else {
printf("yes\n");
}
return 0;
}
| main.c: In function 'main':
main.c:12:14: error: expected expression before '<' token
12 | for(i = 0; < strlen(str); i++) {
| ^
main.c:13:25: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
13 | for(j = i + 1; j < strlen(str); j++) {
| ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strlen'
1 | #include <stdio.h>
+++ |+#include <string.h>
2 |
main.c:13:25: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
13 | for(j = i + 1; j < strlen(str); j++) {
| ^~~~~~
main.c:13:25: note: include '<string.h>' or provide a declaration of 'strlen'
|
s121009700 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
sum = a+b;
if(sum>9){
cout<<"error";
}else{
cout<<sum;
}
} | a.cc: In function 'int main()':
a.cc:9:5: error: 'sum' was not declared in this scope
9 | sum = a+b;
| ^~~
|
s438207472 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
sum = a+b;
if(sum>=10){
cout<<"error";
}
cout<<sum;
} | a.cc: In function 'int main()':
a.cc:9:5: error: 'sum' was not declared in this scope
9 | sum = a+b;
| ^~~
|
s096873737 | 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())
| ^
|
s469050891 | p03697 | C++ | #include<bits/stdc++.h.>
using namespace std;
int main()
{
int a,b,c,d;
cin>>a>>b;
c=a+b;
if(c<10){
cout<<c<<endl;
}
else{
cout<<"error"<<endl;
}
return 0;
}
| a.cc:1:9: fatal error: bits/stdc++.h.: No such file or directory
1 | #include<bits/stdc++.h.>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s114753631 | p03697 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication
{
class Program
{
static void Main()
{
new Solution().answer();
}
}
class Solution
{
string[] input;
public Solution()
{
input = Console.ReadLine().Split(' ');
}
public void answer()
{
int A = Convert.ToInt32(input[0]);
int B = Convert.ToInt32(input[1]);
int C = A + B;
if (C < 10) { Console.WriteLine(C.ToString()); }
else { Console.WriteLine("error"); }
}
}
} | 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.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.Linq;
| ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
4 | using System.Text;
| ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
5 | using System.Threading.Tasks;
| ^~~~~~
a.cc:15:6: error: expected ';' after class definition
15 | }
| ^
| ;
a.cc: In static member function 'static void ConsoleApplication::Program::Main()':
a.cc:13:17: error: expected type-specifier before 'Solution'
13 | new Solution().answer();
| ^~~~~~~~
a.cc: At global scope:
a.cc:19:9: error: 'string' does not name a type
19 | string[] input;
| ^~~~~~
a.cc:21:15: error: expected ':' before 'Solution'
21 | public Solution()
| ^~~~~~~~~
| :
a.cc:26:15: error: expected ':' before 'void'
26 | public void answer()
| ^~~~~
| :
a.cc:35:6: error: expected ';' after class definition
35 | }
| ^
| ;
a.cc: In constructor 'ConsoleApplication::Solution::Solution()':
a.cc:23:13: error: 'input' was not declared in this scope; did you mean 'int'?
23 | input = Console.ReadLine().Split(' ');
| ^~~~~
| int
a.cc:23:21: error: 'Console' was not declared in this scope
23 | input = Console.ReadLine().Split(' ');
| ^~~~~~~
a.cc: In member function 'void ConsoleApplication::Solution::answer()':
a.cc:28:21: error: 'Convert' was not declared in this scope
28 | int A = Convert.ToInt32(input[0]);
| ^~~~~~~
a.cc:28:37: error: 'input' was not declared in this scope; did you mean 'int'?
28 | int A = Convert.ToInt32(input[0]);
| ^~~~~
| int
a.cc:32:27: error: 'Console' was not declared in this scope
32 | if (C < 10) { Console.WriteLine(C.ToString()); }
| ^~~~~~~
a.cc:32:47: error: request for member 'ToString' in 'C', which is of non-class type 'int'
32 | if (C < 10) { Console.WriteLine(C.ToString()); }
| ^~~~~~~~
a.cc:33:20: error: 'Console' was not declared in this scope
33 | else { Console.WriteLine("error"); }
| ^~~~~~~
|
s545551331 | p03697 | C++ | #include <stdio.h>
int main()
{
int A,B;
scanf("&d", &A);
scanf("&d", &B);
int total = 0;
total = a + b;
if(total < 10){
printf("%d\n",total);
}else{
printf("error");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:12: error: 'a' was not declared in this scope
9 | total = a + b;
| ^
a.cc:9:16: error: 'b' was not declared in this scope
9 | total = a + b;
| ^
|
s688584783 | p03697 | C++ | #include <iostream.h>
using namespace std
int main(){
int a b sum;
cin >> a >> b;
sum = a + b;
if(sum >=10){
cout << "error" << endl;
}else{
cout << sum << endl;
}
return 0;
} | a.cc:1:10: fatal error: iostream.h: No such file or directory
1 | #include <iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s008063338 | p03697 | Java | import java.util.*;
public class Restricted {
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("error");
}
else{
System.out.println(a+b);
}
}
}
| Main.java:2: error: class Restricted is public, should be declared in a file named Restricted.java
public class Restricted {
^
1 error
|
s158273999 | p03697 | Java | 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("error");
} else {
System.out.println(a + b);
}
}
} | Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:3: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s351662023 | p03697 | Java | import java.util.Scanner;
import java.util.Random;
import java.util.Arrays;
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("error");
} else {
System.out.println(a + b);
}
} | Main.java:16: error: reached end of file while parsing
}
^
1 error
|
s484525098 | p03697 | C++ | #include <iostream>
using namespace std;
int main()
{
int A,B,C;
cin>>A>>B;
C=A+B;
if( (C<10) cout << C<<endl;
else cout <<"error"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:12: error: expected ';' before 'cout'
9 | if( (C<10) cout << C<<endl;
| ^~~~~
| ;
a.cc:10:1: error: expected primary-expression before 'else'
10 | else cout <<"error"<<endl;
| ^~~~
a.cc:9:29: error: expected ')' before 'else'
9 | if( (C<10) cout << C<<endl;
| ~ ^
| )
10 | else cout <<"error"<<endl;
| ~~~~
|
s214268027 | p03697 | C++ | #include<stdio.h>
void main(){
int a, b;
scanf("%d %d", &a, &b);
if(a+b>=10) printf("%s\n", "Error");
else printf("%d\n", a+b);
} | a.cc:3:1: error: '::main' must return 'int'
3 | void main(){
| ^~~~
|
s908459318 | p03697 | C | include <stdio.h>
int main(){
int A,B;
scanf("%d%d",&A,&B);
if(A+B > 9){
printf("error\n");
}else{
printf("%d\n",A+B);
}
return 0;
}
| main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s659165528 | p03697 | C | #include <stdio.h>
int main(){
int A,B,num;
scanf("%d", &A);
scanf("%d", &B);
num = A + B;
if(num >= 10){
printf("error\n");
}else{
printf("%d"\n,num);
}
return 0;
} | main.c: In function 'main':
main.c:14:28: error: stray '\' in program
14 | printf("%d"\n,num);
| ^
main.c:14:28: error: expected ')' before 'n'
14 | printf("%d"\n,num);
| ~ ^~
| )
|
s037034988 | p03697 | C | #include <stdio.h>
int main(void){
int A,B;
scanf("%d %d",&A,&B);
if(A+B>10){
printf("error\n");
}else{
printf("%d\n",sum);
}
return 0;
}
| main.c: In function 'main':
main.c:8:31: error: 'sum' undeclared (first use in this function)
8 | printf("%d\n",sum);
| ^~~
main.c:8:31: note: each undeclared identifier is reported only once for each function it appears in
|
s822842057 | p03697 | C | #include <stdio.h>
int main(void) {
int a, b sum;
scanf("%d %d", &a, &b);
if(a>9 || a<1 || b>9 || b<1){
printf("error.\n");
return 1;
}
sum = a + b;
if(sum >= 10) printf("error");
else printf("%d",sum);
return 0;
} | main.c: In function 'main':
main.c:3:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sum'
3 | int a, b sum;
| ^~~
main.c:4:37: error: 'b' undeclared (first use in this function)
4 | scanf("%d %d", &a, &b);
| ^
main.c:4:37: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:17: error: 'sum' undeclared (first use in this function)
9 | sum = a + b;
| ^~~
|
s021899088 | p03697 | C | #include <stdio.h>
int main(void) {
int a, b result;
scanf("%d %d", &a, &b);
if(a>9 || a<1 || b>9 || b<1){
printf("error.\n");
return 1;
}
result = a + b;
if(result >= 10) printf("error");
else printf("%d",result);
return 0;
} | main.c: In function 'main':
main.c:3:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'result'
3 | int a, b result;
| ^~~~~~
main.c:4:37: error: 'b' undeclared (first use in this function)
4 | scanf("%d %d", &a, &b);
| ^
main.c:4:37: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:17: error: 'result' undeclared (first use in this function)
9 | result = a + b;
| ^~~~~~
|
s794517555 | p03697 | C | #include <stdio.h>
int main(void) {
int a, b result, n;
n = scanf("%d %d", &a, &b);
if(a>9 || a<1 || b>9 || b<1){
printf("error.\n");
return 1;
}
result = a + b;
if(result >= 10) printf("error");
else printf("%d",result);
return 0;
} | main.c: In function 'main':
main.c:3:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'result'
3 | int a, b result, n;
| ^~~~~~
main.c:4:17: error: 'n' undeclared (first use in this function)
4 | n = scanf("%d %d", &a, &b);
| ^
main.c:4:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:41: error: 'b' undeclared (first use in this function)
4 | n = scanf("%d %d", &a, &b);
| ^
main.c:9:17: error: 'result' undeclared (first use in this function)
9 | result = a + b;
| ^~~~~~
|
s715610933 | p03697 | C++ | #include <stdio.h>
int main(void) {
int A,B result, n;
n = scanf("%d %d", &A, &B);
if(A>9 || A<1 || B>9 || B<1){
printf("error.\n");
return 1;
}
result = A + B;
if(result >= 10) printf("error");
else printf("%d",result);
return 0;
} | a.cc: In function 'int main()':
a.cc:3:25: error: expected initializer before 'result'
3 | int A,B result, n;
| ^~~~~~
a.cc:4:17: error: 'n' was not declared in this scope
4 | n = scanf("%d %d", &A, &B);
| ^
a.cc:4:41: error: 'B' was not declared in this scope
4 | n = scanf("%d %d", &A, &B);
| ^
a.cc:9:17: error: 'result' was not declared in this scope
9 | result = A + B;
| ^~~~~~
|
s252128354 | p03697 | C++ | #include <stdio.h>
void main(){
char buf[10];
int num1;
int num2;
int sum;
fgets(buf,10,stdin);
sscanf(buf,"%d %d",&num1,&num2);
sum = num1 + num2;
//}while(num1 <= 1 || num2 >= 9);
if(sum < 10)
printf("%d \n",sum);
else
printf("error\n");
} | a.cc:3:1: error: '::main' must return 'int'
3 | void main(){
| ^~~~
|
s804447834 | p03697 | C++ | #include <stdio.h>
void main(){
char buf[10];
int num1;
int num2;
int sum;
do{
fgets(buf,10,stdin);
sscanf(buf,"%d %d",&num1,&num2);
sum = num1 + num2;
}while(num1 <= 1 || num2 >= 9);
if(sum < 10)
printf("%d \n",sum);
else
printf("error\n");
} | a.cc:3:1: error: '::main' must return 'int'
3 | void main(){
| ^~~~
|
s508662324 | p03697 | C | #include <stdio.h>
int Main(void) {
int A;
int B;
int C;
char buf[128];
fgets(buf, 128, stdin);
sscanf(buf, "%d", &A);
fgets(buf, 128, stdin);
sscanf(buf, "%d", &B);
C = A + B;
if(C >= 10) {
printf("error");
printf("\n");
} else {
printf("%d", C);
printf("\n");
return 0;
}
} | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s418441065 | p03697 | C | #include<stdio.h>
int main() {
int A,B;
scanf("%d", &a);
scanf("%d", &b);
printf("%d", a + b);
return 0;
}
| main.c: In function 'main':
main.c:5:16: error: 'a' undeclared (first use in this function)
5 | scanf("%d", &a);
| ^
main.c:5:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:16: error: 'b' undeclared (first use in this function)
6 | scanf("%d", &b);
| ^
|
s944576758 | p03697 | C++ | #include<iostream>
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:10:1: error: expected '}' before 'else'
10 | else{
| ^~~~
a.cc:8:16: note: to match this '{'
8 | if((A+B) >= 10){
| ^
a.cc: At global scope:
a.cc:14:1: error: expected declaration before '}' token
14 | }
| ^
|
s919083868 | p03697 | C++ | #include<iostream>
#include<string>
using namespace std;
bool checks(string s){
for(int I=0;i<=s.length()-1;i++){
for(int j=0;j<=s.length()-1;j++){
if(s[i]==s[j]) return 1;
}
}
return 0;
}
int main(){
string s;
cin >> s;
if(checks(s)==1) cout<<"no"<<endl;
if(checks(s)==0) cout<<"yes"<<endl;
return 0;
} | a.cc: In function 'bool checks(std::string)':
a.cc:6:13: error: 'i' was not declared in this scope
6 | for(int I=0;i<=s.length()-1;i++){
| ^
|
s472982473 | p03697 | C++ | #include <iostream>
using namespace std;
int main(void){
int a,b;
cin>>a>>b;
cout<<(a+b>=10?"error":a+b)<<endl;
} | a.cc: In function 'int main()':
a.cc:7:17: error: operands to '?:' have different types 'const char*' and 'int'
7 | cout<<(a+b>=10?"error":a+b)<<endl;
| ~~~~~~~^~~~~~~~~~~~
|
s347506723 | p03697 | C++ | #include <bits/stdc++.h>
using namespae std ;
int main()
{
int a , b;cin >> a >> b;
if(a + b >= 10) cout << "error\n";
else cout << a + b << endl ;
return 0 ;
} | a.cc:2:7: error: expected nested-name-specifier before 'namespae'
2 | using namespae std ;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | int a , b;cin >> a >> b;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | if(a + b >= 10) cout << "error\n";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:8:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | else cout << a + b << endl ;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:8:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
8 | else cout << a + b << endl ;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s264466341 | p03697 | C++ | #include <bits/stdc++.h>
using namespae std ;
int main()
{
int a , b;cin >> a >> b;
if(a + b >= 10) cout << "error\n";
else | a.cc:2:7: error: expected nested-name-specifier before 'namespae'
2 | using namespae std ;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | int a , b;cin >> a >> b;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:7:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | if(a + b >= 10) cout << "error\n";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:8:5: error: expected statement at end of input
8 | else
| ^
a.cc:8:5: error: expected '}' at end of input
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s480377019 | p03697 | C++ | #include <bits/stdc++.h>
using namespae std ;
int main()
{
int a , b;cin >> a >> b;
if(a + b >= 10) | a.cc:2:7: error: expected nested-name-specifier before 'namespae'
2 | using namespae std ;
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:6:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | int a , b;cin >> a >> b;
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; ///< Linked to standard input
| ^~~
a.cc:7:16: error: expected statement at end of input
7 | if(a + b >= 10)
| ^
a.cc:7:16: error: expected '}' at end of input
a.cc:5:1: note: to match this '{'
5 | {
| ^
|
s678381720 | p03697 | C | #include <stdio.h>
int main(){
int A,B;
scanf("d",&A);
scanf("d",&B);
if(A+B>=10){
printf("error\n");
}else{
printf("%d\n",A+B);
}
| main.c: In function 'main':
main.c:10:3: error: expected declaration or statement at end of input
10 | }
| ^
|
s563501187 | p03697 | C++ | t | a.cc:1:1: error: '\U0000ff54' does not name a type
1 | t
| ^~
|
s278540298 | p03697 | C++ | #include<iostream>
using namespace std;
int main(void){
int A,B;
cin >> A >> B >> endl;
if(A+B < 10){
cout << A+B << endl;
}else{
cout << "error" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:23: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>')
7 | cin >> A >> B >> endl;
| ~~~~~~~~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/iostream:42,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool&'
170 | operator>>(bool& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]'
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int&'
174 | operator>>(short& __n);
| ~~~~~~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int&'
177 | operator>>(unsigned short& __n)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]'
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int&'
181 | operator>>(int& __n);
| ~~~~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int&'
184 | operator>>(unsigned int& __n)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int&'
188 | operator>>(long& __n)
| ~~~~~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int&'
192 | operator>>(unsigned long& __n)
| ~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int&'
199 | operator>>(long long& __n)
| ~~~~~~~~~~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int&'
203 | operator>>(unsigned long long& __n)
| ~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'void*&'
328 | operator>>(void*& __p)
| ~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ^~~~~~~~
/usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)'
133 | operator>>(ios_base& (*__pf)(ios_base&))
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]'
352 | operator>>(__streambuf_type* __sb);
| ^~~~~~~~
/usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'}
352 | operator>>(__streambuf_type* __sb);
|
s330216920 | p03697 | C++ | #include <stdio.h>
#include <iostream>
using namespace std;
lnt main(){
int A,B;
cin>>A>>B;
if(A+B<10){
cout<<A+B<<endl;
}else{
cout<<"error"<<endl;
}
} | a.cc:5:1: error: 'lnt' does not name a type; did you mean 'int'?
5 | lnt main(){
| ^~~
| int
|
s631590209 | p03697 | C++ | #include <stdio.h>
#include <iostream>
using namespace std;
lnt main(){
int A,B;
cin>>A>>B
if(A+B<10){
cout<<A+B<<endl;
}else{
cout<<"error"<<endl;
}
} | a.cc:5:1: error: 'lnt' does not name a type; did you mean 'int'?
5 | lnt main(){
| ^~~
| int
|
s820644140 | p03697 | Java | import java.util.Scanner;
public class A {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
System.out.println(a+b >= 10 ? "error" : a+b);
scanner.close();
}
}
| Main.java:3: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s719066176 | p03697 | C++ | # -*- coding: utf-8 -*-
import sys
import subprocess
import json
import time
import math
import re
import sqlite3
A, B = map(int, input().split())
if A + B >= 10: print("error")
else print(A+B) | a.cc:1:3: error: invalid preprocessing directive #-
1 | # -*- coding: utf-8 -*-
| ^
a.cc:3:1: error: 'import' does not name a type
3 | import sys
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
|
s750139388 | p03697 | C++ | #include <bits/stdc++.h>
#define p(x) cout << x << endl
#define rep(i, first, to) for(ll i = first; i < to; ++i)
using namespace std;
typedef long long ll;
void solve() {
int a, b;
cin >> a >> b;
cout << (a + b < 10 ? a + b : "error") << endl;
}
int main() {
solve();
return 0;
} | a.cc: In function 'void solve()':
a.cc:12:29: error: operands to '?:' have different types 'int' and 'const char*'
12 | cout << (a + b < 10 ? a + b : "error") << endl;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s482540912 | p03697 | C++ | A, B = map(int, input().split())
if A + B >10:
print('error')
else:
print(A+B)
| a.cc:4:11: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
4 | print('error')
| ^~~~~~~
a.cc:1:1: error: 'A' does not name a type
1 | A, B = map(int, input().split())
| ^
|
s867765658 | p03697 | C++ | A, B = input().split()
if A + B >10:
print('error')
else
print('A+B')
| a.cc:4:11: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
4 | print('error')
| ^~~~~~~
a.cc:6:11: warning: multi-character character constant [-Wmultichar]
6 | print('A+B')
| ^~~~~
a.cc:1:1: error: 'A' does not name a type
1 | A, B = input().split()
| ^
|
s500360142 | p03697 | C++ | # -*- coding:utf-8 -*-
n = input()
n = n.split(' ')
res = int(n[0]) + int(n[1])
if res > 9:
print('error')
else:
print(res)
| a.cc:1:3: error: invalid preprocessing directive #-
1 | # -*- coding:utf-8 -*-
| ^
a.cc:7:11: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
7 | print('error')
| ^~~~~~~
a.cc:3:1: error: 'n' does not name a type
3 | n = input()
| ^
|
s133350528 | p03697 | C++ | #include <iostream>
class TaskA {
public:
void solve(std::istream& in, std::ostream& out) {
int a,b;in>>a>>b;
if(a+b>=10)out<<"error\n";
else out<<a+b<<'\n';
}
};
| /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s561760574 | p03697 | C++ | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException{
// 読み込み
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line;
String[] temp;
line=br.readLine();
temp=line.split(" ");
int a = Integer.valueOf(temp[0]);
int b = Integer.valueOf(temp[1]);
if (a+b>=10){
System.out.println("error");
}else{
System.out.println(a+b);
}
}
}
| 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 '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.io.InputStreamReader;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
5 | public class Main {
| ^~~~~~
|
s027285163 | p03697 | C++ | public class Main {
public static void main(String[] args) throws IOException{
// 読み込み
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line;
String[] temp;
line=br.readLine();
temp=line.split(" ");
int a = Integer.valueOf(temp[0]);
int b = Integer.valueOf(temp[1]);
if (a+b>=10){
System.out.println("error");
}else{
System.out.println(a+b);
}
}
} | a.cc:1:1: error: expected unqualified-id before 'public'
1 | public class Main {
| ^~~~~~
|
s310015933 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int (i)=(0);(i)<(int)(n);++(i))
using ll = long long;
int main() {
int a, b;
cin >> a >> b;
cout << (a+b>=10 ? "error" : a+b) << endl;
}
| a.cc: In function 'int main()':
a.cc:9:22: error: operands to '?:' have different types 'const char*' and 'int'
9 | cout << (a+b>=10 ? "error" : a+b) << endl;
| ~~~~~~~~^~~~~~~~~~~~~~~
|
s745673164 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int (i)=(0);(i)<(int)(n);++(i))
using ll = long long;
int main() {
int a, b;
cin >> a >> b;
cout << (a+b>=10 : "error" : a+b) << endl;
} | a.cc: In function 'int main()':
a.cc:9:21: error: expected ')' before ':' token
9 | cout << (a+b>=10 : "error" : a+b) << endl;
| ~ ^~
| )
|
s965714337 | p03697 | C++ | import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
String[] ana = new String[3];
ana = line.split(" ");
int jal[] = new int[3];
int t = 0;
for (int i = 0; i < ana.length; i++)
jal[i] = Integer.parseInt(ana[i]);
t=jal[0]+jal[1];
if(t<10)
System.out.println(t);
else
System.out.println("error");
}
}
| 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.InputStreamReader;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
4 | public class Main {
| ^~~~~~
|
s295919542 | p03697 | C | #include<stdio.h>
int main(){
int a,b;
scanf("%d%d",&a,&b);
if(a+b >= 10){
printf("error\n");
}
else {
printf("%d\n",a+b
return 0;
}
} | main.c: In function 'main':
main.c:10:26: error: expected ')' before 'return'
10 | printf("%d\n",a+b
| ~ ^
| )
11 | return 0;
| ~~~~~~
main.c:11:25: error: expected ';' before '}' token
11 | return 0;
| ^
| ;
12 | }
| ~
|
s078669248 | p03697 | C++ | import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if (a + b < 10) {
System.out.print(a + b);
System.out.print(" ");
} else
{
System.out.print("error");
System.out.print(" ");
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.IOException;
| ^~~~~~
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.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
4 | public class Main {
| ^~~~~~
|
s649944670 | p03697 | C++ | package java0614;
import java.io.IOException;
import java.util.Scanner;
public class A063 {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if (a + b < 10) {
System.out.print(a + b);
System.out.print(" ");
} else
{
System.out.print("error");
System.out.print(" ");
}
}
} | a.cc:1:1: error: 'package' does not name a type
1 | package java0614;
| ^~~~~~~
a.cc:3:1: error: 'import' does not name a type
3 | import java.io.IOException;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | import java.util.Scanner;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
6 | public class A063 {
| ^~~~~~
|
s841845474 | p03697 | C | #include <stdio.h>
int main(int argc, char const *argv[]){
int m,n;
scanf("%d %d", &m, &n);
if (m+n < 10) {
printf("%d\n", m+n);
} else {
printf("error\n", );
}
return 0;
}
| main.c: In function 'main':
main.c:12:23: error: expected expression before ')' token
12 | printf("error\n", );
| ^
|
s258876056 | p03697 | C++ | import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if (a + b < 10) {
System.out.print(a + b);
System.out.print(" ");
} else
{
System.out.print("error");
System.out.print(" ");
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.IOException;
| ^~~~~~
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.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
4 | public class Main {
| ^~~~~~
|
s937793859 | 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:10:25: error: no match for 'operator>>' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
10 | cout << "error" >> endl;
| ~~~~~~~~~~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:10:28: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout << "error" >> endl;
| ^~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:10:28: note: couldn't deduce template parameter '_IntegerType'
10 | cout << "error" >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:10:28: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout << "error" >> endl;
| ^~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:10:28: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
10 | cout << "error" >> endl;
| ^~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:10:28: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
10 | cout << "error" >> endl;
| ^~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:10:28: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout << "error" >> endl;
| ^~~~
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:10:28: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
10 | cout << "error" >> endl;
| ^~~~
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:10:28: note: 'std::basic_ostream<char>' is not derived from 'std::basic_istream<char, _Traits>'
10 | cout << "error" >> endl;
| ^~~~
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
a.cc:10:28: note: couldn't deduce template parameter '_Tp'
10 | cout << "error" >> endl;
| ^~~~
|
s014757081 | 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:8:14: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
8 | cout >> A+B >> endl;
| ~~~~ ^~ ~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:8:14: note: candidate: 'operator>>(int, int)' (built-in)
8 | cout >> A+B >> endl;
| ~~~~~^~~~~~
a.cc:8:14: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout >> A+B >> endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:8:9: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
8 | cout >> A+B >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout >> A+B >> endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | cout >> A+B >> endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | cout >> A+B >> endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
8 | cout >> A+B >> endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | cout >> A+B >> endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
8 | cout >> A+B >> endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]':
a.cc:8:19: required from here
8 | cout >> A+B >> endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:10:14: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [6]')
10 | cout >> "error" >> endl;
| ~~~~ ^~ ~~~~~~~
| | |
| | const char [6]
| std::ostream {aka std::basic_ostream<char>}
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:10:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout >> "error" >> endl;
| ^~~~~~~
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:10:9: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
10 | cout >> "error" >> endl;
| ^~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:10:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout >> "error" >> endl;
| ^~~~~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:10:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
10 | cout >> "error" >> endl;
| ^~~~~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:10:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
10 | cout >> "error" >> endl;
| ^~~~~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:10:17: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
10 | cout >> "error" >> endl;
| ^ |
s903780191 | p03697 | C++ | import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if (a + b < 10) {
System.out.print(a + b);
} else
{
System.out.print("error");
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.IOException;
| ^~~~~~
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.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
4 | public class Main {
| ^~~~~~
|
s671952515 | p03697 | C++ | import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if (a + b < 10) {
System.out.print(a + b);
} else
{
System.out.print("error");
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.IOException;
| ^~~~~~
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.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
4 | public class Main {
| ^~~~~~
|
s276102279 | p03697 | C++ | import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if (a+b<10){
System.out.print(a+b);
}else
{
System.out.print("error");}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.IOException;
| ^~~~~~
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.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
4 | public class Main {
| ^~~~~~
|
s456949092 | p03697 | C++ | import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if (a+b<10){
System.out.print(a+b);
}else
{
System.out.print("error");}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.IOException;
| ^~~~~~
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.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
4 | public class Main {
| ^~~~~~
|
s800864907 | p03697 | C++ | #include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << ((a + b > 9) ? "error" : a + b) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:24: error: operands to '?:' have different types 'const char*' and 'int'
6 | cout << ((a + b > 9) ? "error" : a + b) << endl;
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
|
s722798619 | p03697 | C++ | #include <cstdio>
#include <iostream>
using namespace std;
int main(){
int a,b;
cin >> a >> b ;
int x = a + b;
cout << (x<10)? x : "error" <<endls;
} | a.cc: In function 'int main()':
a.cc:12:31: error: 'endls' was not declared in this scope
12 | cout << (x<10)? x : "error" <<endls;
| ^~~~~
|
s471425591 | p03697 | C++ | #include<iostream>
int main(){
int a,b;
cin >> a >> b;
if(a+b < 10){
cout << a+b << endl;
}
else{
cout << "error" << endl;
}
} | 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 standard input
| ^~~
a.cc:7:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | cout << a+b << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:7:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
7 | cout << a+b << endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:10:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
10 | cout << "error" << endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:10:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
10 | cout << "error" << endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s307399445 | p03697 | C++ | #include <stdio.h>
#include <cstring>
#include <map>
#include <math.h>
#include <vector>
#define INF 100000000
#define ABS(a) (a<0?-(a):a)
#define MIN(a,b) (a>b?b:a)
#define MAX(a,b) (a>b?a:b)
#define REP(i,a) for(int i=0;i<a;i++)
using namespace std;
int main(){
int a,b;
scanf("%d%d", &a, &b);
a += b;
if(a => 10){
printf("error\n");
}else{
printf("%d\n", a);
}
}
| a.cc: In function 'int main()':
a.cc:18:9: error: expected primary-expression before '>' token
18 | if(a => 10){
| ^
|
s882748937 | p03697 | C++ | #include <iostream>
#include <cstring>
using namespace std;
int main(){
int sum;
char s[100];
cin>>s;
for(int i=1;i<strlen(s);i++){
if(s[0]!=s[i])sum++;
}
if(strlen(s)-1==sum)cout<<yes;
else cout<<no;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:27: error: 'yes' was not declared in this scope
11 | if(strlen(s)-1==sum)cout<<yes;
| ^~~
a.cc:12:12: error: 'no' was not declared in this scope
12 | else cout<<no;
| ^~
|
s591699143 | p03697 | C++ | #include <iostream>
#include <cstring>
using namespace std;
int main(){
int s[100], sum;
cin>>"s";
for(int i=1;i<strlen(s);i++){
if(s[0]!=s[i])sum++;
}
if(strlen(s)-1==sum)cout<<yes;
else cout<<no;
return 0;
} | a.cc: In function 'int main()':
a.cc:6:4: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'const char [2]')
6 | cin>>"s";
| ~~~^~~~~
| | |
| | const char [2]
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/iostream:42,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed:
a.cc:6:6: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'const char*'
6 | cin>>"s";
| ^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed:
a.cc:6:6: error: invalid conversion from 'const char*' to 'short int' [-fpermissive]
6 | cin>>"s";
| ^~~
| |
| const char*
a.cc:6:6: error: cannot bind rvalue '(short int)((const char*)"s")' to 'short int&'
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed:
a.cc:6:6: error: invalid conversion from 'const char*' to 'short unsigned int' [-fpermissive]
6 | cin>>"s";
| ^~~
| |
| const char*
a.cc:6:6: error: cannot bind rvalue '(short unsigned int)((const char*)"s")' to 'short unsigned int&'
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed:
a.cc:6:6: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
6 | cin>>"s";
| ^~~
| |
| const char*
a.cc:6:6: error: cannot bind rvalue '(int)((const char*)"s")' to 'int&'
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed:
a.cc:6:6: error: invalid conversion from 'const char*' to 'unsigned int' [-fpermissive]
6 | cin>>"s";
| ^~~
| |
| const char*
a.cc:6:6: error: cannot bind rvalue '(unsigned int)((const char*)"s")' to 'unsigned int&'
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed:
a.cc:6:6: error: invalid conversion from 'const char*' to 'long int' [-fpermissive]
6 | cin>>"s";
| ^~~
| |
| const char*
a.cc:6:6: error: cannot bind rvalue '(long int)((const char*)"s")' to 'long int&'
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed:
a.cc:6:6: error: invalid conversion from 'const char*' to 'long unsigned int' [-fpermissive]
6 | cin>>"s";
| ^~~
| |
| const char*
a.cc:6:6: error: cannot bind rvalue '(long unsigned int)((const char*)"s")' to 'long unsigned int&'
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed:
a.cc:6:6: error: invalid conversion from 'const char*' to 'long long int' [-fpermissive]
6 | cin>>"s";
| ^~~
| |
| const char*
a.cc:6:6: error: cannot bind rvalue '(long long int)((const char*)"s")' to 'long long int&'
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed:
a.cc:6:6: error: invalid conversion from 'const char*' to 'long long unsigned int' [-fpermissive]
6 | cin>>"s";
| ^~~
| |
| const char*
a.cc:6:6: error: cannot bind rvalue '(long long unsigned int)((const char*)"s")' to 'long long unsigned int&'
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed:
a.cc:6:6: error: invalid conversion from 'const void*' to 'void*' [-fpermissive]
6 | cin>>"s";
| ^~~
| |
| const void*
a.cc:6:6: error: cannot bind rvalue '(void*)((const void*)((const char*)"s"))' to 'void*&'
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'const char [2]' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'const char [2]' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'const char [2]' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'const char [2]' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'const char [2]' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'}
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_Char |
s531579442 | p03697 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int a,b;
cin >> a >> b;
cout << (a+b>=10 ? "error" : a+b) << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:20: error: operands to '?:' have different types 'const char*' and 'int'
7 | cout << (a+b>=10 ? "error" : a+b) << endl;
| ~~~~~~~~^~~~~~~~~~~~~~~
|
s083281940 | p03697 | C++ | r = list(map(int, input().split()))
s = sum(r)
if s > 9:
res = 'error'
else:
res = s
print(res)
| a.cc:4:11: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
4 | res = 'error'
| ^~~~~~~
a.cc:1:1: error: 'r' does not name a type
1 | r = list(map(int, input().split()))
| ^
|
s063717392 | p03697 | Java | import java.io.*;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.StringTokenizer;
public class Timus1715 implements Runnable {
BufferedReader in;
PrintWriter out;
StringTokenizer tok = new StringTokenizer("");
void init() throws FileNotFoundException {
try {
in = new BufferedReader(new FileReader("input.txt"));
out = new PrintWriter("output.txt");
} catch (Exception e) {
String filename = "";
if (filename.isEmpty()) {
in = new BufferedReader(new InputStreamReader(System.in));
out = new PrintWriter(System.out);
} else {
in = new BufferedReader(new FileReader(filename + ".in"));
out = new PrintWriter(filename + ".out");
}
}
}
String readString() throws IOException {
while (!tok.hasMoreTokens()) {
try {
tok = new StringTokenizer(in.readLine(), " :");
} catch (Exception e) {
return null;
}
}
return tok.nextToken();
}
int readInt() throws IOException {
return Integer.parseInt(readString());
}
int[] readIntArray(int size) throws IOException {
int[] res = new int[size];
for (int i = 0; i < size; i++) {
res[i] = readInt();
}
return res;
}
long readLong() throws IOException {
return Long.parseLong(readString());
}
double readDouble() throws IOException {
return Double.parseDouble(readString());
}
<T> List<T>[] createGraphList(int size) {
List<T>[] list = new List[size];
for (int i = 0; i < size; i++) {
list[i] = new ArrayList<>();
}
return list;
}
public static void main(String[] args) {
new Thread(null, new Timus1715(), "", 1l * 200 * 1024 * 1024).start();
}
long timeBegin, timeEnd;
void time() {
timeEnd = System.currentTimeMillis();
System.err.println("Time = " + (timeEnd - timeBegin));
}
long memoryTotal, memoryFree;
void memory() {
memoryFree = Runtime.getRuntime().freeMemory();
System.err.println("Memory = " + ((memoryTotal - memoryFree) >> 10)
+ " KB");
}
public void run() {
try {
timeBegin = System.currentTimeMillis();
memoryTotal = Runtime.getRuntime().freeMemory();
init();
solve();
out.close();
if (System.getProperty("ONLINE_JUDGE") == null) {
time();
memory();
}
} catch (Exception e) {
e.printStackTrace();
System.exit(-1);
}
}
void solve() throws IOException {
int a = readInt();
int b = readInt();
int sum = a + b;
if (sum >= 10) {
out.println("error");
} else {
out.println(sum);
}
}
} | Main.java:8: error: class Timus1715 is public, should be declared in a file named Timus1715.java
public class Timus1715 implements Runnable {
^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
|
s087371870 | p03697 | Java | package Baza;
import java.util.Scanner;
/**
* Created by yriaven on 10.06.17.
*/
public class A {
public static void main(String[] args) {
Scanner skan = new Scanner(System.in);
int a = skan.nextInt();
int b = skan.nextInt();
int wynik = a+b;
if (wynik >= 10)
{
System.out.println("error");
}
else System.out.println(wynik);
}
}
| Main.java:8: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s652906648 | p03697 | Java | package Baza;
import java.util.Scanner;
/**
* Created by yriaven on 10.06.17.
*/
public class A {
public static void main(String[] args) {
Scanner skan = new Scanner(System.in);
int a = skan.nextInt();
int b = skan.nextInt();
int wynik = a+b;
if (wynik <= 10)
{
System.out.println("error");
}
else System.out.println(wynik);
}
}
| Main.java:8: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s018714987 | p03697 | Java | package Baza;
import java.util.Scanner;
/**
* Created by yriaven on 10.06.17.
*/
public class A {
public static void main(String[] args) {
Scanner skan = new Scanner(System.in);
int a = skan.nextInt();
int b = skan.nextInt();
int wynik = a+b;
if (wynik <= 10)
{
System.out.println("error");
}
else System.out.println(wynik);
}
}
| Main.java:8: error: class A is public, should be declared in a file named A.java
public class A {
^
1 error
|
s070078994 | p03697 | Java | public class A {
public static void main(String[] args) {
Scanner skan = new Scanner(System.in);
int a = skan.nextInt();
int b = skan.nextInt();
int wynik = a+b;
if (wynik == 10)
{
System.out.println("Error");
}
else System.out.println(wynik);
}
} | Main.java:1: error: class A is public, should be declared in a file named A.java
public class A {
^
Main.java:3: error: cannot find symbol
Scanner skan = new Scanner(System.in);
^
symbol: class Scanner
location: class A
Main.java:3: error: cannot find symbol
Scanner skan = new Scanner(System.in);
^
symbol: class Scanner
location: class A
3 errors
|
s390259974 | p03697 | C | #include "stdafx.h"
int main()
{
int a, b, c;
c = a + b;
if (c < 10)
printf("%d",c);
else
printf("error");
return 0;
} | main.c:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s385483709 | p03697 | C | include<stdio.h>
int main()
{
int A=0, B=0;
scanf("%d", &A);
scanf("%d", &B);
if(A+B >= 10)
{
printf("error\n");
}
else
{
printf("%d\n", A+B);
}
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s179654252 | 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:7:13: 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:13: note: candidate: 'operator<<(int, int)' (built-in)
7 | cin << a<< b;
| ~~~~^~~~
a.cc:7:13: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a<< b;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:7:9: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
7 | cin << a<< b;
| ^~~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a<< b;
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)'
671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)'
684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)'
689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed:
a.cc:7:16: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)'
810 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
/usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = int]':
a.cc:7:9: required from here
7 | cin << a<< b;
| ^
/usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
810 | operator<<(_Ostream&& __os, const _Tp& __x)
| ^~~~~~~~
|
s481230297 | p03697 | C | include<stdio.h>
int main()
{
int A=0, B=0;
scanf("%d", &A);
scanf("%d", &B);
if(A+B >= 10)
{
printf("error\n");
}
else
{
printf("%d\n", &A+B);
}
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s823099775 | p03697 | C++ | #include<iostream>
using namespase 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:3:7: error: expected nested-name-specifier before 'namespase'
3 | using namespase std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
7 | 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 input
| ^~~
a.cc:8:22: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | if (a+b>=10){cout << a+b <<endl; }
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:8:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
8 | if (a+b>=10){cout << a+b <<endl; }
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:9:15: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | else {cout << "error" << endl;}
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | else {cout << "error" << endl;}
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s734165755 | p03697 | C++ | #include<iostream>
using namespase 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:3:7: error: expected nested-name-specifier before 'namespase'
3 | using namespase std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: expected initializer before 'cin'
7 | cin << a<< b;
| ^~~
a.cc:8:15: error: 'b' was not declared in this scope
8 | if (a+b>=10){cout << a+b <<endl; }
| ^
a.cc:8:22: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | if (a+b>=10){cout << a+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; ///< Linked to standard output
| ^~~~
a.cc:8:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
8 | if (a+b>=10){cout << a+b <<endl; }
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:9:15: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | else {cout << "error" << endl;}
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | else {cout << "error" << endl;}
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s884924521 | p03697 | C++ | #include<iostream>
using namespace std;
int main(){
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:6:16: error: 'a' was not declared in this scope
6 | cin << a<< b;
| ^
a.cc:6:20: error: 'b' was not declared in this scope
6 | cin << a<< b;
| ^
|
s371588954 | p03697 | C++ | #include<iostream>
using namespase std;
int main(){
cin << a<< b;
if (a+b>=10){cout << a+b <<endl; }
else {cout << "error" << endl;}
return 0;
}
| a.cc:3:7: error: expected nested-name-specifier before 'namespase'
3 | using namespase std;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:9: 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 standard input
| ^~~
a.cc:6:16: error: 'a' was not declared in this scope
6 | cin << a<< b;
| ^
a.cc:6:20: error: 'b' was not declared in this scope
6 | cin << a<< b;
| ^
a.cc:7:22: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | if (a+b>=10){cout << a+b <<endl; }
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:7:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
7 | if (a+b>=10){cout << a+b <<endl; }
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:8:15: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
8 | else {cout << "error" << endl;}
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:8:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
8 | else {cout << "error" << endl;}
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s882851904 | p03697 | C++ | #include<iostream.h>
using namespase std;
int main(){
cin << a<< b;
if (a+b>=10){cout << a+b <<endl; }
else {cout << "error" << endl;}
return 0;
}
| a.cc:1:9: fatal error: iostream.h: No such file or directory
1 | #include<iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s042730060 | p03697 | C | include<stdio.h>
int main()
{
int A, B;
if(A+B >= 10)
{
printf("error\n");
};
else
{
printf("%c", A+B);
}
return 0;
} | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include<stdio.h>
| ^
|
s457237798 | p03697 | C++ | #include <iostream>
using namespace std;
int main{
int a, b;
cin >> a >> b;
if(a + b > 9){
cout << "error" << endl;
} else {
cout << a+b << endl;
}
} | a.cc:5:5: error: cannot declare '::main' to be a global variable
5 | int main{
| ^~~~
a.cc:6:5: error: expected primary-expression before 'int'
6 | int a, b;
| ^~~
a.cc:6:5: error: expected '}' before 'int'
a.cc:5:9: note: to match this '{'
5 | int main{
| ^
a.cc:7:5: error: 'cin' does not name a type
7 | cin >> a >> b;
| ^~~
a.cc:8:5: error: expected unqualified-id before 'if'
8 | if(a + b > 9){
| ^~
a.cc:10:7: error: expected unqualified-id before 'else'
10 | } else {
| ^~~~
a.cc:14:1: error: expected declaration before '}' token
14 | }
| ^
|
s658023836 | p03697 | C++ |
int main(){
int A,B;
scanf("%d%d",A,B);
if(A+B>=10){
printf("error");
}else{
printf("%d",A+B);
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:4:3: error: 'scanf' was not declared in this scope
4 | scanf("%d%d",A,B);
| ^~~~~
a.cc:6:5: error: 'printf' was not declared in this scope
6 | printf("error");
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 |
a.cc:8:5: error: 'printf' was not declared in this scope
8 | printf("%d",A+B);
| ^~~~~~
a.cc:8:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s663464611 | p03697 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
int max_str_size = 26;
char input_str[max_str_size];
cin >> input_str;
for(int i = 0 ; i < max_str_size ; i++) {
for(int j = 1 ; j < max_str_size ; j++ ) {
if (input_str[i] === input_str[j]) {
cout << "yes" << endl;
return 0;
}
}
}
cout << "no" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:12:26: error: expected primary-expression before '=' token
12 | if (input_str[i] === input_str[j]) {
| ^
|
s549015629 | p03697 | Java | import java.io.*;
import java.util.*;
import java.lang.Math.*;
public class Main {
public static void main(String[] args) {
Main main = new Main();
main.solve(args);
}
public void solve(String[] args) {
int[][] g =
{
{1, 3, 5, 7, 8, 10, 12},
{4, 6, 9, 11},
};
MyScanner scanner = new MyScanner();
int x = scanner.nextInt();
int y = scanner.nextInt();
for (int i = 0; i < 2; i++) {
boolean findX = false;
boolean findY = false;
for (int j = 0; i < g[i].length; l++) {
if (g[i][l] == x) findX = true;
if (g[i][l] == y) findY = true;
}
if (findX && findY) {
System.out.println("Yes");
return;
}
}
System.out.println("No");
}
private class MyScanner {
String[] s;
int i;
BufferedReader br;
String reg = " ";
MyScanner () {
s = new String[0];
i = 0;
br = new BufferedReader(new InputStreamReader(System.in));
}
public String next() throws IOException {
if (i < s.length) return s[i++];
String line = br.readLine();
while (line.equals("")) {
line = br.readLine();
}
s = line.split(reg, 0);
i = 0;
return s[i++];
}
public int nextInt() {
try {
return Integer.parseInt(next());
} catch (Exception e) {
e.printStackTrace();
}
return -1;
}
public double nextDouble() {
try {
return Double.parseDouble(next());
} catch (Exception e) {
e.printStackTrace();
}
return -1;
}
public long nextLong() {
try {
return Long.parseLong(next());
} catch (Exception e) {
e.printStackTrace();
}
return -1;
}
}
}
| Main.java:24: error: cannot find symbol
for (int j = 0; i < g[i].length; l++) {
^
symbol: variable l
location: class Main
Main.java:25: error: cannot find symbol
if (g[i][l] == x) findX = true;
^
symbol: variable l
location: class Main
Main.java:26: error: cannot find symbol
if (g[i][l] == y) findY = true;
^
symbol: variable l
location: class Main
3 errors
|
s680391948 | p03697 | C++ | #include<iostream>
int main()
{
using namespace std;
int a,b;
cin>>a>>b;
if(a+b<10)
cout<<a+b<<\n;
else
cout<<"error"<<\n;
return 0;
}
| a.cc:10:20: error: stray '\' in program
10 | cout<<a+b<<\n;
| ^
a.cc:13:24: error: stray '\' in program
13 | cout<<"error"<<\n;
| ^
a.cc: In function 'int main()':
a.cc:10:21: error: 'n' was not declared in this scope
10 | cout<<a+b<<\n;
| ^
a.cc:13:25: error: 'n' was not declared in this scope
13 | cout<<"error"<<\n;
| ^
|
s212999653 | p03697 | C | #include <stdio.h>
int main(void)
{
int A,B,sum;
do{
printf("整数を入力してさい\n")
scanf("%d %d",&A,&B);
}while(A < 1 || 9 < B);
sum = A + B;
if(sum>=10){
printf("error\n");
}else{
printf("%d\n",sum);
}
return 0;
} | main.c: In function 'main':
main.c:7:39: error: expected ';' before 'scanf'
7 | printf("整数を入力してさい\n")
| ^
| ;
8 | scanf("%d %d",&A,&B);
| ~~~~~
|
s905056903 | p03697 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
itn a,b;
cin>>a>>b;
if(a+b>9)cout<<"error"<<endl;
else cout<<a+b<<endl;
}
| a.cc: In function 'int main()':
a.cc:5:1: error: 'itn' was not declared in this scope; did you mean 'int'?
5 | itn a,b;
| ^~~
| int
a.cc:6:6: error: 'a' was not declared in this scope
6 | cin>>a>>b;
| ^
a.cc:6:9: error: 'b' was not declared in this scope
6 | cin>>a>>b;
| ^
|
s938779622 | p03697 | C | #include<stdio.h>
#include<string.h>
int judgestr(char str[],int len)
{
int i,n;
for(n = 0;n<len-1;n++)
for(i=n+1;i<len;i++)
if(str[n] - str[i] == 0)
return 1;
return 0;
}
int main()
{
char str[27];
fgets(str,27,stdin);
if(str[strlen(str)-1] == '\n')
str[strlen(str)-1] = '\0';
if(judgestr(str,strlen(str)) == 0)
printf("yes\n");
else
printf("no\n");
return 0;
} | main.c: In function 'main':
main.c:16:17: error: invalid suffix "7" on integer constant
16 | fgets(str,27,stdin);
| ^~~
|
s527236230 | p03697 | C++ | int main() {
int A, B, result;
cin >> A >> B;
result = A + B;
if (result >= 10) { cout << "error" << endl; }
else { cout << result << endl; }
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope
6 | cin >> A >> B;
| ^~~
a.cc:10:29: error: 'cout' was not declared in this scope
10 | if (result >= 10) { cout << "error" << endl; }
| ^~~~
a.cc:10:48: error: 'endl' was not declared in this scope
10 | if (result >= 10) { cout << "error" << endl; }
| ^~~~
a.cc:11:16: error: 'cout' was not declared in this scope
11 | else { cout << result << endl; }
| ^~~~
a.cc:11:34: error: 'endl' was not declared in this scope
11 | else { cout << result << endl; }
| ^~~~
|
s752294742 | p03697 | C++ | #include<bits/stdc++.h>
int main(){
int a,b;6
scanf("%d%d",&a,&b);
if(a+b>=10)
printf("error\n");
else
printf("%d\n",a+b);
return 0;
} | a.cc: In function 'int main()':
a.cc:5:14: error: expected ';' before 'scanf'
5 | int a,b;6
| ^
| ;
6 | scanf("%d%d",&a,&b);
| ~~~~~
|
s751765456 | p03697 | C++ | #include <vector>
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <deque>
#include <queue>
#include <tuple>
#include <queue>
#include <functional>
#include <cmath>
#include <iomanip>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
#include <complex>
#include <iterator>
#include <array>
#include <memory>
#include <stack>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<double,double>pdd;
typedef pair<ll,ll>pll;
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:47:19: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
47 | else cout<<a+b<endl;
| ~~~~~~~~~^~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/vector:62,
from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1045 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1045:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
47 | else cout<<a+b<endl;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
448 | operator<(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:448:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
47 | else cout<<a+b<endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
493 | operator<(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:493:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
47 | else cout<<a+b<endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1694 | operator<(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1694:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
47 | else cout<<a+b<endl;
| ^~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1760 | operator<(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1760:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
47 | else cout<<a+b<endl;
| ^~~~
In file included from /usr/include/c++/14/vector:66:
/usr/include/c++/14/bits/stl_vector.h:2089:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)'
2089 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:2089:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: 'std::basic_ostream<char>' is not derived from 'const std::vector<_Tp, _Alloc>'
47 | else cout<<a+b<endl;
| ^~~~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/vector:87:
/usr/include/c++/14/tuple:2600:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2600 | operator<(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2600:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
47 | else cout<<a+b<endl;
| ^~~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:2:
/usr/include/c++/14/string_view:673:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
673 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:673:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
47 | else cout<<a+b<endl;
| ^~~~
/usr/include/c++/14/string_view:680:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
680 | operator< (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:680:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
47 | else cout<<a+b<endl;
| ^~~~
/usr/include/c++/14/string_view:688:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator<(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
688 | operator< (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:688:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: couldn't deduce template parameter '_CharT'
47 | else cout<<a+b<endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3874 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3874:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
47 | else cout<<a+b<endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
3888 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3888:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
47 | else cout<<a+b<endl;
| ^~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3901 | operator<(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3901:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
47 | else cout<<a+b<endl;
| ^~~~
In file included from /usr/include/c++/14/deque:66,
from a.cc:6:
/usr/include/c++/14/bits/stl_deque.h:2334:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator<(const deque<_Tp, _Alloc>&, const deque<_Tp, _Alloc>&)'
2334 | operator<(const deque<_Tp, _Alloc>& __x, const deque<_Tp, _Alloc>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_deque.h:2334:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: 'std::basic_ostream<char>' is not derived from 'const std::deque<_Tp, _Alloc>'
47 | else cout<<a+b<endl;
| ^~~~
In file included from /usr/include/c++/14/queue:66,
from a.cc:7:
/usr/include/c++/14/bits/stl_queue.h:397:5: note: candidate: 'template<class _Tp, class _Seq> bool std::operator<(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&)'
397 | operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_queue.h:397:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: 'std::basic_ostream<char>' is not derived from 'const std::queue<_Tp, _Seq>'
47 | else cout<<a+b<endl;
| ^~~~
In file included from /usr/include/c++/14/functional:65,
from a.cc:10:
/usr/include/c++/14/array:339:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> bool std::operator<(const array<_Tp, _Nm>&, const array<_Tp, _Nm>&)'
339 | operator<(const array<_Tp, _Nm>& __a, const array<_Tp, _Nm>& __b)
| ^~~~~~~~
/usr/include/c++/14/array:339:5: note: template argument deduction/substitution failed:
a.cc:47:20: note: 'std::basic_ostream<char>' is not derived from 'const std::array<_Tp, _Nm>'
47 | else cout<<a+b<endl;
| ^~~~
In file included from /usr/include/c+ |
s800905856 | p03697 | C++ | #include <iostream>
using namespace std;
int main(){
int a;
int 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:9:22: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int')
9 | cout >> a+b >> endl;
| ~~~~ ^~ ~~~
| | |
| | int
| std::ostream {aka std::basic_ostream<char>}
a.cc:9:22: note: candidate: 'operator>>(int, int)' (built-in)
9 | cout >> a+b >> endl;
| ~~~~~^~~~~~
a.cc:9:22: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int'
In file included from /usr/include/c++/14/string:55,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:9:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> a+b >> endl;
| ^
In file included from /usr/include/c++/14/bits/memory_resource.h:38,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:9:17: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
9 | cout >> a+b >> endl;
| ^~~~
In file included from /usr/include/c++/14/istream:1109,
from /usr/include/c++/14/iostream:42:
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:9:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> a+b >> endl;
| ^
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:9:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> a+b >> endl;
| ^
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:9:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> a+b >> endl;
| ^
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed:
a.cc:9:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
9 | cout >> a+b >> endl;
| ^
/usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)'
939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed:
a.cc:9:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> a+b >> endl;
| ^
/usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)'
945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s)
| ^~~~~~~~
/usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed:
a.cc:9:27: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
9 | cout >> a+b >> endl;
| ^
/usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
/usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed:
/usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int]':
a.cc:9:13: required from here
9 | cout >> a+b >> endl;
| ^
/usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>'
1099 | operator>>(_Istream&& __is, _Tp&& __x)
| ^~~~~~~~
a.cc:11:22: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [6]')
11 | cout >> "error" >> endl;
| ~~~~ ^~ ~~~~~~~
| | |
| | const char [6]
| std::ostream {aka std::basic_ostream<char>}
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
835 | operator>>(basic_istream<_CharT, _Traits>& __in,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout >> "error" >> endl;
| ^~~~~~~
/usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)'
131 | operator>>(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed:
a.cc:11:17: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte'
11 | cout >> "error" >> endl;
| ^~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)'
978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
| ^~~~~~~~
/usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>'
11 | cout >> "error" >> endl;
| ^~~~~~~
/usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)'
849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout >> "error" >> endl;
| ^~~~~~~
/usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)'
854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c)
| ^~~~~~~~
/usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed:
a.cc:11:25: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>'
11 | cout >> "error" >> endl;
| ^~~~~~~
/usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)'
896 | operator>>(basic_istream<_CharT, _Traits>& __ |
s782031131 | p03697 | C++ | using System;
using System.Linq;
namespace AtCoder
{
class _063A
{
static void Main()
{
int num = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).Sum();
Console.WriteLine(num >= 10 ? "error" : num.ToString());
}
}
} | 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:13:6: error: expected ';' after class definition
13 | }
| ^
| ;
a.cc: In static member function 'static void AtCoder::_063A::Main()':
a.cc:10:23: error: 'Console' was not declared in this scope
10 | int num = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).Sum();
| ^~~~~~~
a.cc:10:60: error: 'x' was not declared in this scope
10 | int num = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).Sum();
| ^
a.cc:10:63: error: expected primary-expression before '>' token
10 | int num = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).Sum();
| ^
a.cc:10:65: error: expected primary-expression before 'int'
10 | int num = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).Sum();
| ^~~
a.cc:11:57: error: request for member 'ToString' in 'num', which is of non-class type 'int'
11 | Console.WriteLine(num >= 10 ? "error" : num.ToString());
| ^~~~~~~~
|
s438462547 | p03697 | C++ | print("Problem A begin")
A, B = map(int,input().split())
if A+B>=10:
print("error")
else:
print(A+B)
print("Problem A end") | a.cc:1:6: error: expected constructor, destructor, or type conversion before '(' token
1 | print("Problem A begin")
| ^
|
s219556120 | p03697 | C++ | #include <iostream>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
cout << (A + B >= 10) ? "error" : A + B << endl;
} | a.cc: In function 'int main()':
a.cc:8:49: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
8 | cout << (A + B >= 10) ? "error" : A + B << endl;
| ~~~~~~^~~~~~~
|
s977690030 | p03697 | C++ | #include <iostream>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
cout << A + B >= 10 ? "error" : A + B << endl;
} | a.cc: In function 'int main()':
a.cc:8:23: error: no match for 'operator>=' (operand types are 'std::basic_ostream<char>' and 'int')
8 | cout << A + B >= 10 ? "error" : A + B << endl;
| ~~~~~~~~~~~~~ ^~ ~~
| | |
| | int
| std::basic_ostream<char>
a.cc:8:23: note: candidate: 'operator>=(int, int)' (built-in)
8 | cout << A + B >= 10 ? "error" : A + B << endl;
| ~~~~~~~~~~~~~~^~~~~
a.cc:8:23: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'int'
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:476:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
476 | operator>=(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:476:5: note: template argument deduction/substitution failed:
a.cc:8:26: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | cout << A + B >= 10 ? "error" : A + B << endl;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:520:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
520 | operator>=(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:520:5: note: template argument deduction/substitution failed:
a.cc:8:26: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | cout << A + B >= 10 ? "error" : A + B << endl;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1724:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1724 | operator>=(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1724:5: note: template argument deduction/substitution failed:
a.cc:8:26: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | cout << A + B >= 10 ? "error" : A + B << endl;
| ^~
/usr/include/c++/14/bits/stl_iterator.h:1781:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1781 | operator>=(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1781:5: note: template argument deduction/substitution failed:
a.cc:8:26: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | cout << A + B >= 10 ? "error" : A + B << endl;
| ^~
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/string:51:
/usr/include/c++/14/bits/stl_pair.h:1070:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1070 | operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1070:5: note: template argument deduction/substitution failed:
a.cc:8:26: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
8 | cout << A + B >= 10 ? "error" : A + B << endl;
| ^~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54:
/usr/include/c++/14/string_view:739:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>=(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
739 | operator>=(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:739:5: note: template argument deduction/substitution failed:
a.cc:8:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | cout << A + B >= 10 ? "error" : A + B << endl;
| ^~
/usr/include/c++/14/string_view:746:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>=(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
746 | operator>=(basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:746:5: note: template argument deduction/substitution failed:
a.cc:8:26: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | cout << A + B >= 10 ? "error" : A + B << endl;
| ^~
/usr/include/c++/14/string_view:754:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>=(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
754 | operator>=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:754:5: note: template argument deduction/substitution failed:
a.cc:8:26: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
8 | cout << A + B >= 10 ? "error" : A + B << endl;
| ^~
/usr/include/c++/14/bits/basic_string.h:3997:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3997 | operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3997:5: note: template argument deduction/substitution failed:
a.cc:8:26: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
8 | cout << A + B >= 10 ? "error" : A + B << endl;
| ^~
/usr/include/c++/14/bits/basic_string.h:4011:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)'
4011 | operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4011:5: note: template argument deduction/substitution failed:
a.cc:8:26: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
8 | cout << A + B >= 10 ? "error" : A + B << endl;
| ^~
/usr/include/c++/14/bits/basic_string.h:4024:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>=(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4024 | operator>=(const _CharT* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4024:5: note: template argument deduction/substitution failed:
a.cc:8:26: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
8 | cout << A + B >= 10 ? "error" : A + B << endl;
| ^~
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
from /usr/include/c++/14/string:68:
/usr/include/c++/14/tuple:2631:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator>=(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)'
2631 | operator>=(const tuple<_TElements...>& __t,
| ^~~~~~~~
/usr/include/c++/14/tuple:2631:5: note: template argument deduction/substitution failed:
a.cc:8:26: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
8 | cout << A + B >= 10 ? "error" : A + B << endl;
| ^~
a.cc:8:47: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
8 | cout << A + B >= 10 ? "error" : A + B << endl;
| ~~~~~~^~~~~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.