submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3 values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s221980990 | p03738 | C | #include<stdio.h>
#include<string.h>
using namespace std;
const int maxn = 1e5+5;
int main()
{
char a[maxn],b[maxn];
int len = strlen(a);
int len1 = strlen(b);
int i;
gets(a);
gets(b);
if ( strcmp(a,b) == -1 ) printf("LESS\n");
else if ( strcmp(a,b)== 0) printf("EQUAL\n");
else printf("GREATER\n");
return 0;
} | main.c:3:1: error: unknown type name 'using'
3 | using namespace std;
| ^~~~~
main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
3 | using namespace std;
| ^~~
main.c: In function 'main':
main.c:11:10: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
11 | gets(a);
| ^~~~
| fgets
|
s192128375 | p03738 | C | #include<cstdio>
#include<cstring>
using namespace std;
const int maxn = 1e5+5;
int main()
{
char a[maxn],b[maxn];
int len = strlen(a);
int len1 = strlen(b);
int i;
gets(a);
gets(b);
if ( strcmp(a,b) == -1 ) printf("LESS\n");
else if ( strcmp(a,b)== 0) printf("EQUAL\n");
else printf("GREATER\n");
return 0;
} | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s972240000 | p03738 | C++ | #include<cstdio>
#include<cstring>
using namespace std;
const int maxn = 1e5+5;
int main()
{
char a[maxn],b[maxn];
int len = strlen(a);
int len1 = strlen(b);
int i;
gets(a);
gets(b);
if ( strcmp(a,b) == -1 ) printf("LESS\n");
else if ( strcmp(a,b)== 0) printf("EQUAL\n");
else printf("GREATER\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:11:10: error: 'gets' was not declared in this scope; did you mean 'getw'?
11 | gets(a);
| ^~~~
| getw
|
s036471731 | p03738 | C++ | #include<stdio.h>
#include<string.h>
const int Max = 1e6;
int main(){
char a[Max], b[Max];
int A, B, flag = 0;
gets(a);
gets(b);
if(strlen(a) > strlen(b)) flag = -1;
if(strlen(a) < strlen(b)) flag = 1;
if(strlen(a) == strlen(b)){
for(int i = 0; i < strlen(a); i++){
A = a[i], B = b[i];
if(A > B) { flag = -1; break; }
if(A < B) { flag = 1; break; }
}
}
if(flag == -1) printf("GREATER\n");
if(flag == 0) printf("EQUAL\n");
if(flag == 1) printf("LESS\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:8:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
8 | gets(a);
| ^~~~
| getw
|
s928877055 | p03738 | C++ | #include<cstdio>
int A[105];
int B[105];
int main(){
scanf("%s %s",A,B);
int len1 = strlen(A);
int len2 = strlen(B);
if(len1 > len2) printf("GREATER");
if(len1 < len2) printf("LESS");
if(len1 == len2) {
if(strcmp(A,B) > 0) printf("GREATER");
else if(strcmp(A,B) < 0) printf("LESS");
else printf("EQUAL");
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:16: error: 'strlen' was not declared in this scope
6 | int len1 = strlen(A);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<cstdio>
+++ |+#include <cstring>
2 | int A[105];
a.cc:11:20: error: 'strcmp' was not declared in this scope
11 | if(strcmp(A,B) > 0) printf("GREATER");
| ^~~~~~
a.cc:11:20: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
|
s814279299 | p03738 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string a, b;
cin >> a >> b;
if (a.size() > b.size()) {
cout << "GREATER" << endl;
return 0;
} else if (a.size() < b.size()) {
cout << "LESS" << endl;
return 0;
} else {
for (int i = a.size() - 1; i >= 0; i ++) {
if (a.at(i) > b.at(i)) {
cout << "GREATER" << endl;
return 0;
} else if (.at(i) < b.at(i)) {
cout << "LESS" << endl;
return 0;
}
}
}
cout << "EQUAL" << endl;
}
| a.cc: In function 'int main()':
a.cc:19:18: error: expected primary-expression before '.' token
19 | } else if (.at(i) < b.at(i)) {
| ^
|
s608573443 | p03738 | C++ | #include<iostream>
using namespace std;
int main()
{
string s,t;
cin >> s >> t;
if(s.size() > t.size()){
cout << "GREATER" << endl;
return 0;
}
if(s.size() < t.size()){
cout << "LESS" << endl;
return 0;
}
if(s.size() == t.size()){
cout << "EQUAL" << endl;
return 0;
}
for(int i=0; i<s.size; i++){
if(s[i] > t[i]){
cout << "GREATER" << endl;
return 0;
}
else if(s[i] < t[i]){
cout << "LESS" << endl;
return 0;
}
}
cout << "EQUAL" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:19:20: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
19 | for(int i=0; i<s.size; i++){
| ~~^~~~
| ()
|
s633310762 | p03738 | C++ | a=input()
b=input()
if a > b:
print("GREATER")
elif a < b:
print("LESS")
elif a == b:
print("EQUAL") | a.cc:1:1: error: 'a' does not name a type
1 | a=input()
| ^
|
s443683976 | p03738 | C++ | #include<bits/stdc++.h>
#include<sstream>
#inlcude<string>
using namespace std;
string a, b;
int main(){
cin >> a >> b;
int asize = a.size();
int bsize = b.size();
if(asize < bsize) cout << "GREATER" << endl;
else if(asize < bsize) cout << "LESS" << endl;
else if(a > b) cout << "GREATER" << endl;
else if(a < b) cout << "LESS" << endl;
else cout << "EQUAL" << endl;
} | a.cc:3:2: error: invalid preprocessing directive #inlcude; did you mean #include?
3 | #inlcude<string>
| ^~~~~~~
| include
|
s566483429 | p03738 | C++ | #include<bits/stdc++.h>
#include<sstream>
#inlcude<string>
using namespace std;
string a, b;
int main(){
cin >> a >> b;
int asize = a.size();
int bsize = b.size();
if(asize > bsize) cout << "GREATER" << endl;
else if(asize < bsize) cout << "LESS" << endl;
else if(asize == bsize){
int a2 = istringstream(a);
int b2 = istringstream(b);
if(a2 > b2) cout << "GREATER" << endl;
else if(a2 < b2) cout << "LESS" << endl;
else if(a2 == b2) cout << "EQUAL" << endl;
}
} | a.cc:3:2: error: invalid preprocessing directive #inlcude; did you mean #include?
3 | #inlcude<string>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:13:14: error: cannot convert 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} to 'int' in initialization
13 | int a2 = istringstream(a);
| ^~~~~~~~~~~~~~~~
| |
| std::istringstream {aka std::__cxx11::basic_istringstream<char>}
a.cc:14:14: error: cannot convert 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} to 'int' in initialization
14 | int b2 = istringstream(b);
| ^~~~~~~~~~~~~~~~
| |
| std::istringstream {aka std::__cxx11::basic_istringstream<char>}
|
s234769694 | p03738 | C++ | #include<bits/stdc++.h>
#inlcude<string>
using namespace std;
string a, b;
int main(){
cin >> a >> b;
int asize = a.size();
int bsize = b.size();
if(asize > bsize) cout << "GREATER" << endl;
else if(asize < bsize) cout << "LESS" << endl;
else if(asize == bsize){
int a2 = atoi(a);
int b2 = atoi(b);
if(a2 > b2) cout << "GREATER" << endl;
else if(a2 < b2) cout << "LESS" << endl;
else if(a2 == b2) cout << "EQUAL" << endl;
}
} | a.cc:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
2 | #inlcude<string>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:12:19: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
12 | int a2 = atoi(a);
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
from a.cc:1:
/usr/include/stdlib.h:105:30: note: initializing argument 1 of 'int atoi(const char*)'
105 | extern int atoi (const char *__nptr)
| ~~~~~~~~~~~~^~~~~~
a.cc:13:19: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
13 | int b2 = atoi(b);
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
/usr/include/stdlib.h:105:30: note: initializing argument 1 of 'int atoi(const char*)'
105 | extern int atoi (const char *__nptr)
| ~~~~~~~~~~~~^~~~~~
|
s635207604 | p03738 | C++ | #include<bits/stdc++.h>
#inlcude<string>
using namespace std;
string a, b;
int main(){
cin >> a >> b;
int asize = a.size();
int bsize = b.size();
if(asize > bsize) cout << "GREATER" << endl;
else if(asize < bsize) cout << "LESS" << endl;
else if(asize == bsize){
int a = atoi(a);
int b = atoi(b);
if(a > b) cout << "GREATER" << endl;
else if(a < b) cout << "LESS" << endl;
else if(a == b) cout << "EQUAL" << endl;
}
} | a.cc:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
2 | #inlcude<string>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:12:18: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
12 | int a = atoi(a);
| ^
| |
| int
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
from a.cc:1:
/usr/include/stdlib.h:105:30: note: initializing argument 1 of 'int atoi(const char*)'
105 | extern int atoi (const char *__nptr)
| ~~~~~~~~~~~~^~~~~~
a.cc:13:18: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
13 | int b = atoi(b);
| ^
| |
| int
/usr/include/stdlib.h:105:30: note: initializing argument 1 of 'int atoi(const char*)'
105 | extern int atoi (const char *__nptr)
| ~~~~~~~~~~~~^~~~~~
|
s609202790 | p03738 | C++ | #include<bits/stdc++.h>
using namespace std;
string a, b;
int main(){
cin >> a >> b;
int asize = a.size();
int bsize = b.size();
if(asize > bsize) cout << "GREATER" << endl;
else if(asize < bsize) cout << "LESS" << endl;
else if(asize == bsize){
int a = atoi(a);
int b = atoi(b);
if(a > b) cout << "GREATER" << endl;
else if(a < b) cout << "LESS" << endl;
else if(a == b) cout << "EQUAL" << endl;
}
} | a.cc: In function 'int main()':
a.cc:11:18: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
11 | int a = atoi(a);
| ^
| |
| int
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
from a.cc:1:
/usr/include/stdlib.h:105:30: note: initializing argument 1 of 'int atoi(const char*)'
105 | extern int atoi (const char *__nptr)
| ~~~~~~~~~~~~^~~~~~
a.cc:12:18: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
12 | int b = atoi(b);
| ^
| |
| int
/usr/include/stdlib.h:105:30: note: initializing argument 1 of 'int atoi(const char*)'
105 | extern int atoi (const char *__nptr)
| ~~~~~~~~~~~~^~~~~~
|
s344403569 | p03738 | C++ | #include<bits/stdc++.h>
using namespace std;
char a, b;
int main(){
cin >> a >> b;
int asize = a.size();
int bsize = b.size();
if(asize > bsize) cout << "GREATER" << endl;
else if(asize < bsize) cout << "LESS" << endl;
else if(asize == bsize){
int a = atoi(a);
int b = atoi(b);
if(a > b) cout << "GREATER" << endl;
else if(a < b) cout << "LESS" << endl;
else if(a == b) cout << "EQUAL" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:17: error: request for member 'size' in 'a', which is of non-class type 'char'
6 | int asize = a.size();
| ^~~~
a.cc:7:17: error: request for member 'size' in 'b', which is of non-class type 'char'
7 | int bsize = b.size();
| ^~~~
a.cc:11:18: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
11 | int a = atoi(a);
| ^
| |
| int
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
from a.cc:1:
/usr/include/stdlib.h:105:30: note: initializing argument 1 of 'int atoi(const char*)'
105 | extern int atoi (const char *__nptr)
| ~~~~~~~~~~~~^~~~~~
a.cc:12:18: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
12 | int b = atoi(b);
| ^
| |
| int
/usr/include/stdlib.h:105:30: note: initializing argument 1 of 'int atoi(const char*)'
105 | extern int atoi (const char *__nptr)
| ~~~~~~~~~~~~^~~~~~
|
s614425748 | p03738 | C++ | #include<bits/stdc++.h>
using namespace std;
int a, b;
int main(){
cin >> a >> b;
int asize = a.size();
int bsize = b.size();
if(asize > bsize) cout << "GREATER" << endl;
else if(asize < bsize) cout << "LESS" << endl;
else if(asize == bsize){
if(a > b) cout << "GREATER" << endl;
else if(a < b) cout << "LESS" << endl;
else if(a == b) cout << "EQUAL" << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:17: error: request for member 'size' in 'a', which is of non-class type 'int'
6 | int asize = a.size();
| ^~~~
a.cc:7:17: error: request for member 'size' in 'b', which is of non-class type 'int'
7 | int bsize = b.size();
| ^~~~
|
s985270629 | p03738 | C++ | #include<bits/stdc++.h>
using namespace std;
int a, b;
int sizea, sizeb;
int main(){
cin >> a >> b;
sizea = a.size();
sizeb = b.size();
if(sizea > sizeb) cout << "GREATER" << endl;
else if(sizea < sizeb) cout << "LESS" << endl;
else if(sizea == sizeb){
if(a > b) cout << "GREATER" << endl;
else if(a < b) cout << "LESS" << endl;
else if(a == b) cout << "EQUAL" << endl;
} | a.cc: In function 'int main()':
a.cc:7:13: error: request for member 'size' in 'a', which is of non-class type 'int'
7 | sizea = a.size();
| ^~~~
a.cc:8:13: error: request for member 'size' in 'b', which is of non-class type 'int'
8 | sizeb = b.size();
| ^~~~
a.cc:15:4: error: expected '}' at end of input
15 | }
| ^
a.cc:5:11: note: to match this '{'
5 | int main(){
| ^
|
s309811392 | p03738 | C++ | include<bits/stdc++.h>
using namespace std;
#define PI 3.1415926535897932
int main(){
char a[102],b[102];
scanf("%s",a);
scanf("%s",b);
if (strlen(a)>strlen(b)) {
printf("GREATER\n");
return 0;
} else if (strlen(a)<strlen(b)) {
printf("LESS\n");
return 0;
}
for (int i=0;i<strlen(a);i++) {
if (a[i]-0>b[i]-0) {
printf("GREATER\n");
return 0;
} else if (a[i]-0<b[i]-0) {
printf("LESS\n");
return 0;
}
}
printf("EQUAL\n");
return 0;
}
| a.cc:1:1: error: 'include' does not name a type
1 | include<bits/stdc++.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:5: error: 'scanf' was not declared in this scope
9 | scanf("%s",a);
| ^~~~~
a.cc:11:9: error: 'strlen' was not declared in this scope
11 | if (strlen(a)>strlen(b)) {
| ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
+++ |+#include <cstring>
1 | include<bits/stdc++.h>
a.cc:12:9: error: 'printf' was not declared in this scope
12 | printf("GREATER\n");
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
+++ |+#include <cstdio>
1 | include<bits/stdc++.h>
a.cc:15:9: error: 'printf' was not declared in this scope
15 | printf("LESS\n");
| ^~~~~~
a.cc:15:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:18:20: error: 'strlen' was not declared in this scope
18 | for (int i=0;i<strlen(a);i++) {
| ^~~~~~
a.cc:18:20: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:20:13: error: 'printf' was not declared in this scope
20 | printf("GREATER\n");
| ^~~~~~
a.cc:20:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:23:13: error: 'printf' was not declared in this scope
23 | printf("LESS\n");
| ^~~~~~
a.cc:23:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:27:5: error: 'printf' was not declared in this scope
27 | printf("EQUAL\n");
| ^~~~~~
a.cc:27:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
|
s562953751 | p03738 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
string s,t;
cin >> s;
cin >> t;
ll ns = s.size();
ll nt = t.size();
if(ns > nt) cout << "GREATER" << endl; return 0;
else if(nt > ns)cout << "LESS" << endl; return 0;
else{
for(ll i = 0;i < ns;i++){
if(s[i] > t[i]) cout << "GREATER" << endl; return 0;
else if(s[i] < t[i]) cout "LESS" << endl; return 0;
}
}
cout << "EQUAL" << endl;
}
| a.cc: In function 'int main()':
a.cc:13:5: error: 'else' without a previous 'if'
13 | else if(nt > ns)cout << "LESS" << endl; return 0;
| ^~~~
a.cc:14:5: error: 'else' without a previous 'if'
14 | else{
| ^~~~
a.cc:17:13: error: 'else' without a previous 'if'
17 | else if(s[i] < t[i]) cout "LESS" << endl; return 0;
| ^~~~
a.cc:17:38: error: expected ';' before string constant
17 | else if(s[i] < t[i]) cout "LESS" << endl; return 0;
| ^~~~~~~
| ;
|
s421005417 | p03738 | C++ | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(void){
int a,b;
int strcmp(char a,char b);
scanf("%d",&a);
scanf("%d",&b);
if(strcmp(a,b)==0){
printf("GREATER\n");
}else{
printf("LESS\n");
} | a.cc: In function 'int main()':
a.cc:13:10: error: expected '}' at end of input
13 | }
| ^
a.cc:4:15: note: to match this '{'
4 | int main(void){
| ^
|
s092481350 | p03738 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
strings,t;
cin>>s>>t;
if(s.size()>t.size()){
cout<<"GREATER";
}
else if(s.size()<t.size())cout<<"LESS";
else{
if(a > b)cout<<"GREATER";
else if(a < b)cout<<"LESS";
else cout<<"EQUAL";
}
cout<<endl;
} | a.cc: In function 'int main()':
a.cc:4:3: error: 'strings' was not declared in this scope; did you mean 'stdin'?
4 | strings,t;
| ^~~~~~~
| stdin
a.cc:4:11: error: 't' was not declared in this scope; did you mean 'tm'?
4 | strings,t;
| ^
| tm
a.cc:5:8: error: 's' was not declared in this scope
5 | cin>>s>>t;
| ^
a.cc:11:10: error: 'a' was not declared in this scope
11 | if(a > b)cout<<"GREATER";
| ^
a.cc:11:14: error: 'b' was not declared in this scope
11 | if(a > b)cout<<"GREATER";
| ^
|
s777986993 | p03738 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<array>
using namespace std;
int main(){
long long long a,b;
cin >> a >> b;
if(a > b)
cout << "GREATER" << endl;
else if(b > a)
cout << "LESS" << endl;
else
cout << "EQUAL" << endl;
}
| a.cc: In function 'int main()':
a.cc:9:15: error: 'long long long' is too long for GCC
9 | long long long a,b;
| ^~~~
|
s889376081 | p03738 | C++ | #include <iostream>
#include <string>
int main() {
std::string A, B;
std::cin >> A >> B;
int n = A.length();
int m = B.length();
if ( n > m ) std::cout << "GREATER" << std::endl;
else if ( n < m ) std::cout << "LESS" << std::endl;
else {
bool flag = false;
for (int i = 0; i < n; ++i) {
if ( atoi(a[i]) > atoi(b[i]) ) {
std::cout << "GREATER" << std::endl;
flag = true;
break;
}
else if ( atoi(a[i]) < atoi(b[i]) ) {
std::cout << "LESS" << std::endl;
flag = true;
break;
}
}
if ( !flag ) std::cout << "EQUAL" << std::endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:15:17: error: 'a' was not declared in this scope
15 | if ( atoi(a[i]) > atoi(b[i]) ) {
| ^
a.cc:15:30: error: 'b' was not declared in this scope
15 | if ( atoi(a[i]) > atoi(b[i]) ) {
| ^
|
s624497465 | p03738 | C++ | #include <iostream>
using namespace std;
int main() {
string a,b;
cin>>a>>b;
if(a.size()>b.size()){cout<<"GREATER"<<endl;}
else if(b.size()>a.size()){cout<<"LESS"<<endl;}
else{
for(int i=0;i<a.size();i++){
if(a[i]>b[i]){cout<<"GREATHER"<<endl;return 0;}
if(a[i]<b[i]){cout<<"LESS"<<endl;return 0;}
if(i==a.size-1){cout<<"EQARL"<<endl;return 0;}
}
}
} | a.cc: In function 'int main()':
a.cc:12:25: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
12 | if(i==a.size-1){cout<<"EQARL"<<endl;return 0;}
| ~~^~~~
| ()
|
s665911699 | p03738 | C++ | #include <iostream>
using namespace std;
int main() {
long A,B;
cin>>>>B;
if(A>B){
cout<<"CGREATER"<<endl;
}else if(A<B){
cout<<"LESS"<<endl;
}else{
cout<<"EQUAL"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:10: error: expected primary-expression before '>>' token
6 | cin>>>>B;
| ^~
|
s745707823 | p03738 | C++ | #include <iostream>
using namespace std;
int main() {
long A,B;
cin>>>>B;
if(>bB){
cout<<"CGREATER"<<endl;
}else if(A>B){
cout<<"LESS"<<endl;
}else{
cout<<"EQUAL"<<endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:6:10: error: expected primary-expression before '>>' token
6 | cin>>>>B;
| ^~
a.cc:7:8: error: expected primary-expression before '>' token
7 | if(>bB){
| ^
a.cc:7:9: error: 'bB' was not declared in this scope; did you mean 'B'?
7 | if(>bB){
| ^~
| B
|
s152941222 | p03738 | C | #include <stdio.h>
int main()
{
int a;
int b;
scanf ("%d %d",&a,&b);
if(a>b)
{
printf("%c\n" "GREATER");
}
elseif(a<b)
{
printf("%c\n" "LESS");
}
else
{
printf("%c\n" "EQUAL");
}
}
| main.c: In function 'main':
main.c:11:3: error: implicit declaration of function 'elseif' [-Wimplicit-function-declaration]
11 | elseif(a<b)
| ^~~~~~
main.c:11:14: error: expected ';' before '{' token
11 | elseif(a<b)
| ^
| ;
12 | {
| ~
|
s344129687 | p03738 | C++ | #include <iostream>
#include <stdio.h>
#include <sstream>
using namespace std;
int main() {
string a,b;
cin >> a >> b;
if (a.size() < b.size()) {
cout << "LESS" << endl;
return 0;
} else if (a.size() > b.size()) {
cout << "GREATER" << endl;
return 0;
} else {
for (int i = 0;i < a.size();i++) {
istringstream c,d;
e = istringstream(a.substr(i,1));
f = istringstream(b.substr(i,1));
int c;
e >> c;
int d;
f >> d;
if (c < d) {
cout << "LESS" << endl;
return 0;
} else if (c > d) {
cout << "GREATER" << endl;
return 0;
}
}
cout << "EQUAL" << endl;
}
} | a.cc: In function 'int main()':
a.cc:18:25: error: 'e' was not declared in this scope
18 | e = istringstream(a.substr(i,1));
| ^
a.cc:19:25: error: 'f' was not declared in this scope
19 | f = istringstream(b.substr(i,1));
| ^
a.cc:20:29: error: conflicting declaration 'int c'
20 | int c;
| ^
a.cc:17:39: note: previous declaration as 'std::istringstream c'
17 | istringstream c,d;
| ^
a.cc:22:29: error: conflicting declaration 'int d'
22 | int d;
| ^
a.cc:17:41: note: previous declaration as 'std::istringstream d'
17 | istringstream c,d;
| ^
a.cc:24:31: error: no match for 'operator<' (operand types are 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} and 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'})
24 | if (c < d) {
| ~ ^ ~
| | |
| | basic_istringstream<[...]>
| basic_istringstream<[...]>
a.cc:24:31: note: candidate: 'operator<(int, int)' (built-in)
24 | if (c < d) {
| ~~^~~
a.cc:24:31: note: no known conversion for argument 2 from 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<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: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:24:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
24 | if (c < d) {
| ^
/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:24:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
24 | if (c < d) {
| ^
/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:24:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
24 | if (c < d) {
| ^
/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:24:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
24 | if (c < d) {
| ^
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: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:24:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::pair<_T1, _T2>'
24 | if (c < d) {
| ^
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: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:24:33: note: 'std::__cxx11::basic_istringstream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
24 | if (c < d) {
| ^
/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:24:33: note: 'std::__cxx11::basic_istringstream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
24 | if (c < d) {
| ^
/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:24:33: note: 'std::__cxx11::basic_istringstream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
24 | if (c < d) {
| ^
/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:24:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
24 | if (c < d) {
| ^
/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:24:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
24 | if (c < d) {
| ^
/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:24:33: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_istringstream<char>'
24 | if (c < d) {
| ^
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: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:24:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::tuple<_UTypes ...>'
24 | if (c < d) {
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'st |
s969856446 | p03738 | C++ | #include <iostream>
#include <stdio.h>
#include <sstream>
using namespace std;
int main() {
string a,b;
cin >> a >> b;
if (a.size() < b.size()) {
cout << "LESS" << endl;
return 0;
} else if (a.size() > b.size()) {
cout << "GREATER" << endl;
return 0;
} else {
for (int i = 0;i < a.size();i++) {
istringstream c,d;
c = istringstream(a.substr(i,1));
d = istringstream(b.substr(i,1));
if (c < d) {
cout << "LESS" << endl;
return 0;
} else if (c > d) {
cout << "GREATER" << endl;
return 0;
}
}
cout << "EQUAL" << endl;
}
} | a.cc: In function 'int main()':
a.cc:20:31: error: no match for 'operator<' (operand types are 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} and 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'})
20 | if (c < d) {
| ~ ^ ~
| | |
| | basic_istringstream<[...]>
| basic_istringstream<[...]>
a.cc:20:31: note: candidate: 'operator<(int, int)' (built-in)
20 | if (c < d) {
| ~~^~~
a.cc:20:31: note: no known conversion for argument 2 from 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<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: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:20:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
20 | if (c < d) {
| ^
/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:20:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
20 | if (c < d) {
| ^
/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:20:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
20 | if (c < d) {
| ^
/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:20:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
20 | if (c < d) {
| ^
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: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:20:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::pair<_T1, _T2>'
20 | if (c < d) {
| ^
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: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:20:33: note: 'std::__cxx11::basic_istringstream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
20 | if (c < d) {
| ^
/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:20:33: note: 'std::__cxx11::basic_istringstream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
20 | if (c < d) {
| ^
/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:20:33: note: 'std::__cxx11::basic_istringstream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
20 | if (c < d) {
| ^
/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:20:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
20 | if (c < d) {
| ^
/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:20:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
20 | if (c < d) {
| ^
/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:20:33: note: mismatched types 'const _CharT*' and 'std::__cxx11::basic_istringstream<char>'
20 | if (c < d) {
| ^
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: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:20:33: note: 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} is not derived from 'const std::tuple<_UTypes ...>'
20 | if (c < d) {
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} to 'const std::error_code&'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)'
507 | operator<(const error_condition& __lhs,
| ^~~~~~~~
/usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} to 'const std::error_condition&'
507 | operator<(const error_condition& __lhs,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
a.cc:23:38: error: no match for 'operator>' (operand types are 'std::istringstream' {aka 'std::__cxx11::basic_istringstream<char>'} and 'std::istringstream' {aka 'std::__cxx11::basic_istrings |
s779002151 | p03738 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a,b;
cin << a << b;
if (a < b){
cout << "LESS" << endl;
}else if(a > b){
cout << "GREATER" << endl;
}else{
cout << "EQUAL" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:6:5: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
6 | cin << a << b;
| ~~~ ^~ ~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:6:5: note: candidate: 'operator<<(int, int)' (built-in)
6 | cin << a << b;
| ~~~~^~~~
a.cc:6:5: 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/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)'
1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << a << b;
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/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:6:1: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
6 | cin << a << b;
| ^~~
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/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/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:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | 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:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << a << b;
| ^
/usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)'
1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << a << b;
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46,
from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/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:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << a << b;
| ^
In file included from /usr/include/c++/14/memory:80,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56:
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed:
a.cc:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | cin << a << b;
| ^
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: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:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | 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:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | 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:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | 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:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | 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:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | 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:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | 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:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
6 | 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:6:8: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
6 | 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 | |
s768554736 | p03738 | C++ | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
string a,b;
cin >> a >> b;
if (a.size() < b.size()) {
cout << "LESS" << endl;
} else if (a.size() > b.size()) {
cout << "GREATER" << endl;
} else {
for (int i = 0;i < a.size();i++) {
if (atoi(*a[i]) < atoi(*b[i])) {
cout << "LESS" << endl;
break;
} else if (atoi(*a[i]) > atoi(*b[i])) {
cout << "GREATER" << endl;
break;
} else {
cout << "EQUAL" << endl;
break;
}
}
}
} | a.cc: In function 'int main()':
a.cc:14:34: error: invalid type argument of unary '*' (have '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
14 | if (atoi(*a[i]) < atoi(*b[i])) {
a.cc:14:48: error: invalid type argument of unary '*' (have '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
14 | if (atoi(*a[i]) < atoi(*b[i])) {
a.cc:17:41: error: invalid type argument of unary '*' (have '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
17 | } else if (atoi(*a[i]) > atoi(*b[i])) {
a.cc:17:55: error: invalid type argument of unary '*' (have '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
17 | } else if (atoi(*a[i]) > atoi(*b[i])) {
|
s084475906 | p03738 | C++ | #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
string a,b;
cin >> a >> b;
if (a.size() < b.size()) {
cout << "LESS" << endl;
} else if (a.size() > b.size()) {
cout << "GREATER" << endl;
} else {
for (int i = 0;i < a.size();i++) {
if (atoi(a[i]) < atoi(b[i])) {
cout << "LESS" << endl;
break;
} else if (atoi(a[i]) > atoi(b[i])) {
cout << "GREATER" << endl;
break;
} else {
cout << "EQUAL" << endl;
break;
}
}
}
} | a.cc: In function 'int main()':
a.cc:14:33: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
14 | if (atoi(a[i]) < atoi(b[i])) {
| ~~~~^~~~~~
| |
| __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
from /usr/include/c++/14/ext/string_conversions.h:43,
from /usr/include/c++/14/bits/basic_string.h:4154,
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/stdlib.h:105:30: note: initializing argument 1 of 'int atoi(const char*)'
105 | extern int atoi (const char *__nptr)
| ~~~~~~~~~~~~^~~~~~
a.cc:14:46: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
14 | if (atoi(a[i]) < atoi(b[i])) {
| ~~~~^~~~~~
| |
| __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
/usr/include/stdlib.h:105:30: note: initializing argument 1 of 'int atoi(const char*)'
105 | extern int atoi (const char *__nptr)
| ~~~~~~~~~~~~^~~~~~
a.cc:17:40: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
17 | } else if (atoi(a[i]) > atoi(b[i])) {
| ~~~~^~~~~~
| |
| __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
/usr/include/stdlib.h:105:30: note: initializing argument 1 of 'int atoi(const char*)'
105 | extern int atoi (const char *__nptr)
| ~~~~~~~~~~~~^~~~~~
a.cc:17:53: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
17 | } else if (atoi(a[i]) > atoi(b[i])) {
| ~~~~^~~~~~
| |
| __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
/usr/include/stdlib.h:105:30: note: initializing argument 1 of 'int atoi(const char*)'
105 | extern int atoi (const char *__nptr)
| ~~~~~~~~~~~~^~~~~~
|
s765981705 | p03738 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int i,array[200001]={},b,c;
string a,b;
cin>>a>>b;
if(a.size()<b.size()){
cout<<"LESS"<<endl;
return 0;
}else if(a.size()>b.size()){
cout<<"GREATER"<<endl;
}else{
for(i=0;i<a.size();i++){
if(a[i]<b[i]){
cout<<"LESS"<<endl;
return 0;
}else if(a[i]>b[i]){
cout<<"GREATER"<<endl;
return 0;
}
}
}
cout<<"EQUAL"<<endl;
} | a.cc: In function 'int main()':
a.cc:6:12: error: conflicting declaration 'std::string b'
6 | string a,b;
| ^
a.cc:5:26: note: previous declaration as 'int b'
5 | int i,array[200001]={},b,c;
| ^
a.cc:8:17: error: request for member 'size' in 'b', which is of non-class type 'int'
8 | if(a.size()<b.size()){
| ^~~~
a.cc:11:23: error: request for member 'size' in 'b', which is of non-class type 'int'
11 | }else if(a.size()>b.size()){
| ^~~~
a.cc:15:16: error: invalid types 'int[int]' for array subscript
15 | if(a[i]<b[i]){
| ^
a.cc:18:22: error: invalid types 'int[int]' for array subscript
18 | }else if(a[i]>b[i]){
| ^
|
s033782013 | p03738 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long a = sc.nextLong();
long b = sc.nextLong());
if(a == b){
System.out.println("EQUAL");
}else if(a < b){
System.out.println("LESS");
}else{
System.out.println("GREATER");
}
}
} | Main.java:7: error: ';' expected
long b = sc.nextLong());
^
1 error
|
s343426208 | p03738 | C | #include <string>
#include <cmath>
int main()
{
std::string s, t;
std::cin >> s >> t;
int ss = s.size();
int ts = t.size();
int len = std::abs( ss - ts );
if( ss > ts ) {
for( int i = 0; i < len; i++ ) {
t = "0" + t;
}
}
else {
for( int i = 0; i < len; i++ ) {
s = "0" + s;
}
}
std::string a;
if( s > t ) {
a = "GREATER";
}
if( s < t ) {
a = "LESS";
}
if( s == t ) {
a = "EQUAL";
}
std::cout << a << std::endl;
return 0;
}
| main.c:1:10: fatal error: string: No such file or directory
1 | #include <string>
| ^~~~~~~~
compilation terminated.
|
s450226839 | p03738 | C++ | #include <iostream>
#include <cstring>
int main(void){
char a[128],b[128];
int d;
cin >> a >> b;
if (d = strcmp(a,b)){
cout << "EQUAL";
} else if (d > 0){
cout << "GREATER";
} else{
cout << "LESS";
}
return 0;
} | a.cc: In function 'int main()':
a.cc:7:3: 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:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | cout << "EQUAL";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
11 | cout << "GREATER";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
13 | cout << "LESS";
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s962595292 | p03738 | C++ | #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include <cstdlib>
void Display(void);
int main(){
long a,b;
cin >> a >> b;
if( a == b ){
cout << "EQUAL" <<endl;
}
else if( a > b ){
cout << "GREATER" <<endl;
}
else{
cout << "LESS" <<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:12:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
12 | 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:14:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
14 | cout << "EQUAL" <<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:14:35: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
14 | cout << "EQUAL" <<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:17:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
17 | cout << "GREATER" <<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:17:37: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
17 | cout << "GREATER" <<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:20:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
20 | cout << "LESS" <<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:20:34: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
20 | cout << "LESS" <<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s757370656 | p03738 | C++ | #include<iostream>
#include<string.h>
using namespace std;
int main() {
string a, b;
cin >> a >> b;
int com=strcmp(a,b);
if (com>0)cout << "LESS";
else if (com<0)cout << "GREATER";
else cout << "EQUAL";
}
| a.cc: In function 'int main()':
a.cc:8:24: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
8 | int com=strcmp(a,b);
| ^
| |
| std::string {aka std::__cxx11::basic_string<char>}
In file included from a.cc:2:
/usr/include/string.h:156:32: note: initializing argument 1 of 'int strcmp(const char*, const char*)'
156 | extern int strcmp (const char *__s1, const char *__s2)
| ~~~~~~~~~~~~^~~~
|
s611812063 | p03738 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include<cstdio>
#include<bits/stdc++.h>
using namespace std;
using ll =long long;
int main (void) {
ll A,B;
cin >> A >> B;
if (A>B) cout <<"GREATER";
else if(A==B) cout <<"EQUAL";
else (A<B) cout <<"LESS";
} | a.cc: In function 'int main()':
a.cc:16:13: error: expected ';' before 'cout'
16 | else (A<B) cout <<"LESS";
| ^~~~~
| ;
|
s852525416 | p03738 | C++ | #include <iostream>
using namespace std;
typedef long long ll;
#define rep(i,s,n)for(ll i=s;i<n;i++)
#define repe(i,s,n)for(ll i=s;i<=n;i++)
ll strlen(const ll *s) {
ll l = 0;
while (*s++)l++;
return l;
}
int main()
{
char A[101], B[101]; cin >> A >> B;
ll strA = strlen(A);
ll strB = strlen(B);
if (strA > strB) {
cout << "GREATER" << endl;
}
else if (strA < strB) {
cout << "LESS" << endl;
}
else {
ll i = 0;
while (A[i] == B[i]) {
if (A[i] == '\0') {
cout << "EQUAL" << endl;
return 0;
}
i++;
}
cout << ((A[i] > B[i]) ? "GREATER" : "LESS") << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:17:26: error: cannot convert 'char*' to 'const ll*' {aka 'const long long int*'}
17 | ll strA = strlen(A);
| ^
| |
| char*
a.cc:8:21: note: initializing argument 1 of 'll strlen(const ll*)'
8 | ll strlen(const ll *s) {
| ~~~~~~~~~~^
a.cc:18:26: error: cannot convert 'char*' to 'const ll*' {aka 'const long long int*'}
18 | ll strB = strlen(B);
| ^
| |
| char*
a.cc:8:21: note: initializing argument 1 of 'll strlen(const ll*)'
8 | ll strlen(const ll *s) {
| ~~~~~~~~~~^
|
s288262613 | p03738 | C++ | #include <iostream>
using namespace std;
typedef long long ll;
#define rep(i,s,n)for(ll i=s;i<n;i++)
#define repe(i,s,n)for(ll i=s;i<=n;i++)
ll strlen(const ll *s) {
ll l = 0;
while (*s++)l++;
return l;
}
int main()
{
char A[101], B[101]; cin >> A >> B;
ll strA = strlen(A);
ll strB = strlen(B);
if (strA > strB) {
cout << "GREATER" << endl;
}
else if (strA < strB) {
cout << "LESS" << endl;
}
else {
ll i = 0;
while (A[i] == B[i]) {
if (A[i] == '\0') {
cout << "EQUAL" << endl;
return 0;
}
i++;
}
cout << ((A[i] > B[i]) ? "GREATER" : "LESS") << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:17:26: error: cannot convert 'char*' to 'const ll*' {aka 'const long long int*'}
17 | ll strA = strlen(A);
| ^
| |
| char*
a.cc:8:21: note: initializing argument 1 of 'll strlen(const ll*)'
8 | ll strlen(const ll *s) {
| ~~~~~~~~~~^
a.cc:18:26: error: cannot convert 'char*' to 'const ll*' {aka 'const long long int*'}
18 | ll strB = strlen(B);
| ^
| |
| char*
a.cc:8:21: note: initializing argument 1 of 'll strlen(const ll*)'
8 | ll strlen(const ll *s) {
| ~~~~~~~~~~^
|
s870826380 | p03738 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <iomanip>
#include <functional>
#include <queue>
#include <stack>
#include <cmath>
#define INF 100000000
#define MOD 1000000007
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if(a>b){cout<<"GREATER"<<endl;
}eise if(a<b){cout<<"LESS"<<endl;
}else if(a=b){cout<<"EQUAL"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:17:6: error: 'eise' was not declared in this scope
17 | }eise if(a<b){cout<<"LESS"<<endl;
| ^~~~
a.cc:18:6: error: 'else' without a previous 'if'
18 | }else if(a=b){cout<<"EQUAL"<<endl;
| ^~~~
|
s939715647 | p03738 | C++ | import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int gal = a - b;
if(gal>0) {
System.out.println("GREATER");
}else if(gal<0) {
System.out.println("LESS");
}else if(gal == 0) {
System.out.println("EQUAL");
}
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s169598300 | p03738 | C++ | #include <iostream>using namespace std;int main(){double A,B;cin>>A>>B;if(A>B)cout<<"GREATER";if(A<B)cout<<"LESS";if(A==B)cout<<"EQUAL";} | a.cc:1:26: warning: extra tokens at end of #include directive
1 | #include <iostream>using namespace std;int main(){double A,B;cin>>A>>B;if(A>B)cout<<"GREATER";if(A<B)cout<<"LESS";if(A==B)cout<<"EQUAL";}
| ^~~~~~~~~
a.cc:1:10: fatal error: iostream>usin: No such file or directory
1 | #include <iostream>using namespace std;int main(){double A,B;cin>>A>>B;if(A>B)cout<<"GREATER";if(A<B)cout<<"LESS";if(A==B)cout<<"EQUAL";}
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s832114430 | p03738 | C++ | #include <iostream>
using namespace std;
int main(){
string A, B;
cin >> A >> B;
int x=A.size(), y=B.size(), c=0;
if(x>y) cout << "GREATER", c++;
if(x<y) cout << "LESS", c++;
else {
if(a>b) cout << "GREATER";
else if(a<b) cout << "LESS";
else cout << "EQUAL";
}
}
| a.cc: In function 'int main()':
a.cc:11:20: error: 'a' was not declared in this scope
11 | if(a>b) cout << "GREATER";
| ^
a.cc:11:22: error: 'b' was not declared in this scope
11 | if(a>b) cout << "GREATER";
| ^
|
s290956420 | p03738 | C++ | #include <iostream>
using namespace std;
int main(){
string A, B;
cin >> A >> B;
int x=A.size(), y=B.size(), c=0;
if(x>y) cout << "GREATER";
if(x<y) cout << "LESS";
if(x==y){
for(int i=0;l;i++){
if(A[i]>B[i]){
c++;
cout << "GREATER";
break;
} else if(A[i]<B[i]){
c++;
cout << "LESS";
break;
}
}
}
if(c==0) cout << "EQUAL" ;;
}
| a.cc: In function 'int main()':
a.cc:11:29: error: 'l' was not declared in this scope
11 | for(int i=0;l;i++){
| ^
|
s125777541 | p03738 | C++ | #include <iostream>
using namespace std;
int main(){
string A, B;
cin >> A >> B;
int x=A.size(), y=B.size();
if(x>y) cout << "GREATER";
if(x<y) cout << "LESS";
if(x==y){
for(int i=0;i<l;i++){
if(A[i]>B[i]){
cout << "GREATER";
break;
} else if(A[i]<B[i]){
cout << "LESS";
break;
}
}
}
}
| a.cc: In function 'int main()':
a.cc:11:31: error: 'l' was not declared in this scope
11 | for(int i=0;i<l;i++){
| ^
|
s454981235 | p03738 | C++ | #include <iostream>
using namespace std;
int main(){
string A, B;
cin >> A >> B;
int x=A.size(), y=B.size();
if(x>y) cout << "GREATER";
if(x<y) cout << "LESS";
if(x==y){
for(int i=0;l;i++){
if(A[i]>B[i]){
cout << "GREATER";
break;
} else if(A[i]<B[i]){
cout << "LESS";
break;
}
}
}
}
| a.cc: In function 'int main()':
a.cc:11:29: error: 'l' was not declared in this scope
11 | for(int i=0;l;i++){
| ^
|
s459332177 | p03738 | C++ | #include <iostream>
using namespace std;
int main(){
string A, B;
cin >> A >> B;
if(size.A()>size.B()) cout << "GREATER";
if(size.A()<size.B()) cout << "LESS";
if(size.A()==size.B()){
for(int i=0;i<size.A();i++){
if(A[i]>B[i]){
cout << "GREATER";
break;
} else if(A[i]<B[i]){
cout << "LESS";
break;
}
}
}
if(i==size.A()-1) cout << "EQUAL" ;
}
| a.cc: In function 'int main()':
a.cc:7:17: error: overloaded function with no contextual type information
7 | if(size.A()>size.B()) cout << "GREATER";
| ^
a.cc:7:26: error: overloaded function with no contextual type information
7 | if(size.A()>size.B()) cout << "GREATER";
| ^
a.cc:8:17: error: overloaded function with no contextual type information
8 | if(size.A()<size.B()) cout << "LESS";
| ^
a.cc:8:26: error: overloaded function with no contextual type information
8 | if(size.A()<size.B()) cout << "LESS";
| ^
a.cc:9:17: error: overloaded function with no contextual type information
9 | if(size.A()==size.B()){
| ^
a.cc:9:27: error: overloaded function with no contextual type information
9 | if(size.A()==size.B()){
| ^
a.cc:10:36: error: overloaded function with no contextual type information
10 | for(int i=0;i<size.A();i++){
| ^
a.cc:20:12: error: 'i' was not declared in this scope
20 | if(i==size.A()-1) cout << "EQUAL" ;
| ^
a.cc:20:20: error: overloaded function with no contextual type information
20 | if(i==size.A()-1) cout << "EQUAL" ;
| ^
|
s953900616 | p03738 | C++ | #include <iostream>
using namespace std;
int main(){
string A[100], B[100];
cin >> A >> B;
if(size.A()>size.B()) cout << "GREATER";
if(size.A()<size.B()) cout << "LESS";
if(size.A()==size.B()){
for(int i=0;i<size.A();i++){
if(A[i]>B[i]){
cout << "GREATER";
break;
} else if(A[i]<B[i]){
cout << "LESS";
break;
}
}
}
if(i==size.A()-1) cout << "EQUAL" ;
}
| a.cc: In function 'int main()':
a.cc:6:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::string [100]' {aka 'std::__cxx11::basic_string<char> [100]'})
6 | cin >> A >> B;
| ~~~ ^~ ~
| | |
| | std::string [100] {aka std::__cxx11::basic_string<char> [100]}
| 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:16: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'std::string*' {aka 'std::__cxx11::basic_string<char>*'}
6 | cin >> A >> B;
| ^
/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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short int' [-fpermissive]
6 | cin >> A >> B;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:6:16: error: cannot bind rvalue '(short int)((std::string*)(& A))' 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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'short unsigned int' [-fpermissive]
6 | cin >> A >> B;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:6:16: error: cannot bind rvalue '(short unsigned int)((std::string*)(& A))' 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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'int' [-fpermissive]
6 | cin >> A >> B;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:6:16: error: cannot bind rvalue '(int)((std::string*)(& A))' 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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'unsigned int' [-fpermissive]
6 | cin >> A >> B;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:6:16: error: cannot bind rvalue '(unsigned int)((std::string*)(& A))' 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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long int' [-fpermissive]
6 | cin >> A >> B;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:6:16: error: cannot bind rvalue '(long int)((std::string*)(& A))' 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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long unsigned int' [-fpermissive]
6 | cin >> A >> B;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:6:16: error: cannot bind rvalue '(long unsigned int)((std::string*)(& A))' 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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long int' [-fpermissive]
6 | cin >> A >> B;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:6:16: error: cannot bind rvalue '(long long int)((std::string*)(& A))' 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:16: error: invalid conversion from 'std::string*' {aka 'std::__cxx11::basic_string<char>*'} to 'long long unsigned int' [-fpermissive]
6 | cin >> A >> B;
| ^
| |
| std::string* {aka std::__cxx11::basic_string<char>*}
a.cc:6:16: error: cannot bind rvalue '(long long unsigned int)((std::string*)(& A))' 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:16: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
6 | cin >> A >> B;
| ^
/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 'std::string [100]' {aka 'std::__cxx11::basic_string<char> [100]'} 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 'std::string [100]' {aka 'std::__cxx11::basic_string<char> [100]'} 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 'std::string [100]' {aka 'std::__cxx11::basic_string<char> [100]'} 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_ |
s942168807 | p03738 | C++ | #include <iostream>
#include "libstdc++"
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep(i,j,n) for(int (i)=(j);(i)<(n);(i)++)
using namespace std;
int main() {
int a, b;
cin >> a>> b;
string ans;
if (a > b)ans = "GREATER";
if (a < b)ans = "LESS";
if(a == b)ans = "EQUAL";
cout << ans << endl;
return 0;
} | a.cc:2:10: fatal error: libstdc++: No such file or directory
2 | #include "libstdc++"
| ^~~~~~~~~~~
compilation terminated.
|
s695342931 | p03738 | C++ | #include <iostream>
#include "libstdc++.h"
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep(i,j,n) for(int (i)=(j);(i)<(n);(i)++)
using namespace std;
int main() {
int a, b;
cin >> a>> b;
string ans;
if (a > b)ans = "GREATER";
if (a < b)ans = "LESS";
if(a == b)ans = "EQUAL";
cout << ans << endl;
return 0;
} | a.cc:2:10: fatal error: libstdc++.h: No such file or directory
2 | #include "libstdc++.h"
| ^~~~~~~~~~~~~
compilation terminated.
|
s131886261 | p03738 | C++ | #include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<ctime>
#include<iostream>
using namespace std;
const long long MaxN = 1e10;
char a[MaxN],b[MaxN];
long long la,lb;
int main()
{
cin>>a>>b;
la = strlen(a);
lb = strlen(b);
if(la > lb) printf("GREATER\n");
else if(la < lb) printf("LESS");
else{
if(strcmp(a,b) == 0) printf("EQUAL");
if(strcmp(a,b) < 0) printf("LESS");
if(strcmp(a,b) > 0) printf("GREATER\n");
}
return 0;
} | /tmp/ccnstrkf.o: in function `main':
a.cc:(.text+0x23): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccnstrkf.o
a.cc:(.text+0x44): relocation truncated to fit: R_X86_64_PC32 against symbol `la' defined in .bss section in /tmp/ccnstrkf.o
a.cc:(.text+0x4b): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccnstrkf.o
a.cc:(.text+0x5a): relocation truncated to fit: R_X86_64_PC32 against symbol `lb' defined in .bss section in /tmp/ccnstrkf.o
a.cc:(.text+0x61): relocation truncated to fit: R_X86_64_PC32 against symbol `la' defined in .bss section in /tmp/ccnstrkf.o
a.cc:(.text+0x68): relocation truncated to fit: R_X86_64_PC32 against symbol `lb' defined in .bss section in /tmp/ccnstrkf.o
a.cc:(.text+0x88): relocation truncated to fit: R_X86_64_PC32 against symbol `la' defined in .bss section in /tmp/ccnstrkf.o
a.cc:(.text+0x8f): relocation truncated to fit: R_X86_64_PC32 against symbol `lb' defined in .bss section in /tmp/ccnstrkf.o
a.cc:(.text+0xb4): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccnstrkf.o
a.cc:(.text+0xe5): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccnstrkf.o
a.cc:(.text+0x116): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
|
s871783444 | p03738 | C++ | #include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<ctime>
#include<iostream>
using namespace std;
const long long MaxN = 1e10;
char a[MaxN],b[MaxN];
long long la,lb;
int main()
{
cin>>a>>b;
la = strlen(a);
lb = strlen(b);
if(la > lb) printf("GREATER\n");
else if(la < lb) printf("LESS");
else{
if(strcmp(a,b) == 0) printf("EQUAL");
if(strcmp(a,b) < 0) printf("LESS");
if(strcmp(a,b) > 0) printf("GREATER\n");
}
return 0;
} | /tmp/ccOcEmSW.o: in function `main':
a.cc:(.text+0x23): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccOcEmSW.o
a.cc:(.text+0x44): relocation truncated to fit: R_X86_64_PC32 against symbol `la' defined in .bss section in /tmp/ccOcEmSW.o
a.cc:(.text+0x4b): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccOcEmSW.o
a.cc:(.text+0x5a): relocation truncated to fit: R_X86_64_PC32 against symbol `lb' defined in .bss section in /tmp/ccOcEmSW.o
a.cc:(.text+0x61): relocation truncated to fit: R_X86_64_PC32 against symbol `la' defined in .bss section in /tmp/ccOcEmSW.o
a.cc:(.text+0x68): relocation truncated to fit: R_X86_64_PC32 against symbol `lb' defined in .bss section in /tmp/ccOcEmSW.o
a.cc:(.text+0x88): relocation truncated to fit: R_X86_64_PC32 against symbol `la' defined in .bss section in /tmp/ccOcEmSW.o
a.cc:(.text+0x8f): relocation truncated to fit: R_X86_64_PC32 against symbol `lb' defined in .bss section in /tmp/ccOcEmSW.o
a.cc:(.text+0xb4): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccOcEmSW.o
a.cc:(.text+0xe5): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccOcEmSW.o
a.cc:(.text+0x116): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
|
s422158869 | p03738 | C++ | #include<cmath>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main()
{
string a,b;
cin>>a>>b;
if (a.size()>b.size())
cout<<"GREATER"<<endl;
else if (b.size()>a.size())
cout<<"LESS"<<endl;
else
{
for(long long i=0;i<a.size();i++)
{
if (a[i]>b[i])
{
cout<<"GREATER"<<endl;
break;
}
else if (a[i]<b[i])
{
cout<<"LESS"<<endl;
break;
}
}
if(i==a.size())
cout<< "EQUAL" <<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:31:20: error: 'i' was not declared in this scope
31 | if(i==a.size())
| ^
|
s267321075 | p03738 | C++ | #include<cstdio>
#include<cstring>
#include<iostream>
#include<cmath>
#include<map>
#include<queue>
#include<algorithm>
#include<cstdlib>
using namespace std;
int main(){
char a[100];
char b[100];
int s;
int n;
int m;
gets(a);
gets(b);
n=strlen(a);
m=strlen(b);
if(n>m) printf("GREATER\n");
if(m>n) printf("LESS\n");
if(m==n){
s=strcmp(a,b);
if(s>0) printf("GREATER\n");
if(s<0) printf("LESS\n");
if(s==0) printf("EQUAL\n");
}
} | a.cc: In function 'int main()':
a.cc:17:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
17 | gets(a);
| ^~~~
| getw
|
s121689098 | p03738 | C++ | #include<cstdio>
#include<cstring>
#include<iostream>
#include<cmath>
#include<map>
#include<queue>
#include<algorithm>
#include<cstdlib>
#include<cstring>
using namespace std;
int main(){
char a[100];
char b[100];
int s;
int n;
int m;
gets(a);
gets(b);
n=strlen(a);
m=strlen(b);
if(n>m) printf("GREATER\n");
if(m>n) printf("LESS\n");
if(m==n){
s=strcmp(a,b);
if(s>0) printf("GREATER\n");
if(s<0) printf("LESS\n");
if(s==0) printf("EQUAL\n");
}
} | a.cc: In function 'int main()':
a.cc:18:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
18 | gets(a);
| ^~~~
| getw
|
s143678048 | p03738 | C++ | #include<cstdio>
#include<cstring>
#include<iostream>
#include<cmath>
#include<map>
#include<queue>
#include<algorithm>
#include<cstdlib>
using namespace std;
int main(){
char a[100];
char b[100];
int s;
int n;
int m;
gets(a);
gets(b);
n=strlen(a);
m=strlen(b);
if(n>m) printf("GREATER\n");
if(m>n) printf("LESS\n");
if(m==n){
s=strcmp(a,b);
if(s>0) printf("GREATER\n");
if(s<0) printf("LESS\n");
if(s==0) printf("EQUAL\n");
}
} | a.cc: In function 'int main()':
a.cc:18:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
18 | gets(a);
| ^~~~
| getw
|
s966292660 | p03738 | C++ | #include<cstdio>
#include<algorithm>
#include<cstring>
#include<iostream>
#include<cmath>
#define n 10^100
char a[n], b[n];
using namespace std;
int main()
{
int i, cnt = 0;
gets(a);
gets(b);
if(strlen(a)>strlen(b))
printf("GREATER\n");
else if(strlen(a)<strlen(b))
printf("LESS\n");
else
{
for(i = 0; i < strlen(a); i++)
{
if(a[i]>b[i])
{
printf("GREATER\n");
break;
}
else if(a[i]<b[i])
{
printf("LESS\n");
break;
}
else
cnt++;
}
if(cnt == strlen(a))
printf("EQUAL\n");
}
} | a.cc: In function 'int main()':
a.cc:12:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | gets(a);
| ^~~~
| getw
|
s604303320 | p03738 | C++ | #include<stdio.h>
#include<algorithm>
#include<cstring>
#include<iostream>
#include<cmath>
#define n 10^100
using namespace std;
int main()
{
char a[n], b[n];
int i, cnt = 0;
gets(a);
gets(b);
if(strlen(a)>strlen(b))
printf("GREATER\n");
else if(strlen(a)<strlen(b))
printf("LESS\n");
else
{
for(i = 0; i < strlen(a); i++)
{
if(a[i]>b[i])
{
printf("GREATER\n");
break;
}
else if(a[i]<b[i])
{
printf("LESS\n");
break;
}
else
cnt++;
}
if(cnt == strlen(a))
printf("EQUAL\n");
}
} | a.cc: In function 'int main()':
a.cc:12:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | gets(a);
| ^~~~
| getw
|
s200011120 | p03738 | C++ | #include<cstdio>
#include<algorithm>
#include<cstring>
#include<iostream>
#include<cmath>
#define n 10^100
using namespace std;
int main()
{
char a[n], b[n];
int i, cnt = 0;
gets(a);
gets(b);
if(strlen(a)>strlen(b))
printf("GREATER\n");
else if(strlen(a)<strlen(b))
printf("LESS\n");
else
{
for(i = 0; i < strlen(a); i++)
{
if(a[i]>b[i])
{
printf("GREATER\n");
break;
}
else if(a[i]<b[i])
{
printf("LESS\n");
break;
}
else
cnt++;
}
if(cnt == strlen(a))
printf("EQUAL\n");
}
}
| a.cc: In function 'int main()':
a.cc:12:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
12 | gets(a);
| ^~~~
| getw
|
s135877943 | p03738 | C++ | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<queue>
#include<algorithm>
#include<cmath>
#include<map>
#include<set>
using namespace std;
int main()
{
char a[101],b[101];
int len,len1,max;
gets(a);
gets(b);
max=strcmp(a,b);
if(max==1){
printf("GREATER\n");
}
if(max==0)
{
printf("EQUAL\n");
}
if(max==-1)
{
printf("LESS\n");
}
} | a.cc: In function 'int main()':
a.cc:14:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
14 | gets(a);
| ^~~~
| getw
|
s859800060 | p03738 | C | #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<queue>
#include<algorithm>
#include<cmath>
#include<map>
#include<set>
using namespace std;
int main()
{
char a[101],b[101];
int len,len1,max;
gets(a);
gets(b);
max=strcmp(a,b);
if(max==1){
printf("GREATER\n");
}
if(max==0)
{
printf("EQUAL\n");
}
if(max==-1)
{
printf("LESS\n");
}
} | main.c:1:9: fatal error: cstdio: No such file or directory
1 | #include<cstdio>
| ^~~~~~~~
compilation terminated.
|
s322275590 | p03738 | C++ | #include <cstdio>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
using namespace std;
char a[10005], b[10005];
int main()
{
int lena, lenb, flag = 1;
gets(a);
gets(b);
lena = strlen(a);
lenb = strlen(b);
for(int i = 0; i != max(lena, lenb); i++)
{
if(a[i] > b[i])
{
printf("GREATER\n");
break;
}
else if(a[i] < b[i])
{
printf("LESS\n");
break;
}
else
{
flag = 0;
continue;
}
}
if(flag == 0)
{
printf("EQUAL\n");
}
} | a.cc: In function 'int main()':
a.cc:13:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
13 | gets(a);
| ^~~~
| getw
|
s564513816 | p03738 | C++ | #include <cstdio>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
using namespace std;
char a[10005], b[10005];
int main()
{
int lena, lenb, flag = 1;
gets(a);
gets(b);
lena = strlen(a);
lenb = strlen(b);
for(int i = 0; i != max(lena, lenb); i++)
{
if(a[i] > b[i])
{
printf("GREATER\n");
break;
}
else if(a[i] < b[i])
{
printf("LESS\n");
break;
}
else
{
flag = 0;
continue;
}
}
if(flag == 0)
{
printf("EQUAL\n");
}
} | a.cc: In function 'int main()':
a.cc:13:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
13 | gets(a);
| ^~~~
| getw
|
s523362495 | p03738 | Java | import java.math.*;
import java.util.Scanner;
public class demo {
public static void main(String[] args) {
BigInteger a,b,c;
Scanner cin = new Scanner(System.in);
while(cin.hasNext()) {
a = cin.nextBigInteger();
b = cin.nextBigInteger();
c = a.max(b);
if(a.equals(c))
System.out.println("GREATER");
else
System.out.println("LESS");
}
cin.close();
}
}
| Main.java:3: error: class demo is public, should be declared in a file named demo.java
public class demo {
^
1 error
|
s782239258 | p03738 | C++ | #include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
using namespace std;
int main()
{
char a[105],b[105];
int len1,len2,flag,;
scanf("%s",a);
scanf("%s",b);
len1 = strlen(a);
len2 = strlen(b);
if(len1 < len2)
flag = 0;
else
if(len1 > len2)
flag = 1;
else
for(int i = 0; i < len1 ; i++)
{
if(a[i]==b[i])
continue;
else if(a[i] > b[i])
{
flag = 1;
break;
}
else
{
flag = 0;
break;
}
}
if(flag == 0)
printf("LESS\n");
else if(flag == 1)
printf("GREATER\n");
else
printf("EQUAL\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:9:28: error: expected unqualified-id before ';' token
9 | int len1,len2,flag,;
| ^
|
s092051317 | p03738 | C++ | #include<cstdio>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<string>
#include<cstring>
const int MaxN = 1e6;
using namespace std;
char a[MaxN],b[MaxN];
int main()
{
int flag=0,n,m,i;
gets(a),gets(b);
n=strlen(a),m=strlen(b);
if(strcmp(a,b)==0)
printf("EQUAL\n");
if(n==m)
{
for(i = 0;i < n;i++)
{
if(a[i]>b[i])
{
flag=1;
break;
}
if(a[i]<b[i])
{
flag=2;
break;
}
}
}
if(n>m || flag==1)
printf("GREATER\n");
if(n<m || flag==2)
printf("LESS\n");
}
| a.cc: In function 'int main()':
a.cc:16:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
16 | gets(a),gets(b);
| ^~~~
| getw
|
s548681101 | p03738 | C++ | #include<cstdio>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<string>
#include<cstring>
const int MaxN = 1e6;
using namespace std;
int main()
{
char a[MaxN],b[MaxN];
int flag=0,n,m,i;
gets(a);
gets(b);
n=strlen(a),m=strlen(b);
if(strcmp(a,b)==0)
printf("EQUAL\n");
if(n==m)
{
for(i = 0;i < n;i++)
{
if(a[i]>b[i])
{
flag=1;
break;
}
if(a[i]<b[i])
{
flag=2;
break;
}
}
}
if(n>m || flag==1)
printf("GREATER\n");
if(n<m || flag==2)
printf("LESS\n");
} | a.cc: In function 'int main()':
a.cc:16:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
16 | gets(a);
| ^~~~
| getw
|
s650711794 | p03738 | C++ | #include<cstdio>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<string>
#include<cstring>
const int MaxN = 1e6;
using namespace std;
int main()
{
char a[MaxN],b[MaxN];
int flag=0,n,m,i;
gets(a);
gets(b);
n=strlen(a),m=strlen(b);
if(strcmp(a,b)==0)
printf("EQUAL\n");
if(n==m)
{
for(i = 0;i < n;i++)
{
if(a[i]>b[i])
{
flag=1;
break;
}
if(a[i]<b[i])
{
flag=2;
break;
}
}
}
if(n>m || flag==1)
printf("GREATER\n");
if(n<m || flag==2)
printf("LESS\n");
}
| a.cc: In function 'int main()':
a.cc:16:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
16 | gets(a);
| ^~~~
| getw
|
s001392283 | p03738 | C | #include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
using namespace std;
char a[1005], b[1005];
int main()
{
scanf("%s %s",a,b);
int lena = strlen(a);
int lenb = strlen(b);
if(lena > lenb)
{
printf("GREATER\n");
return 0;
}
else if(lena < lenb)
{
printf("LESS\n");
return 0;
}
else
{
int flag = 0;
for(int i = 0;i < lena;i++)
{
if(a[i] > b[i])
{
printf("GREATER\n");
flag = 1;
return 0;
}
else if(a[i] < b[i])
{
printf("LESS\n");
flag = 1;
return 0;
}
}
if(flag == 0) printf("EQUAL\n");
}
return 0;
} | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s387532396 | p03738 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
string a,b;
int main()
{
cin>>a>>b;
if(a>b)cout<<"GREATER"<<endl;
if(a<b)cout<<"LESS"<<endl;
if(a==b)cout<<"EQUAL"<<endl
return 0;
} | a.cc: In function 'int main()':
a.cc:11:33: error: expected ';' before 'return'
11 | if(a==b)cout<<"EQUAL"<<endl
| ^
| ;
12 | return 0;
| ~~~~~~
|
s464634240 | p03738 | C++ | #include <iostream>
#include <string>
using namespace std;
int comp(string& a, string& b) {
if(a.size() < b.size()) return 0;
if(a.size() > b.size()) return 2;
if(a < b) return 0;
if(a > b) return 2;
return 1;
}
int main() {
string a, b;
cin >> a >> b;
cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
} | a.cc: In function 'int main()':
a.cc:15:11: error: expected primary-expression before '{' token
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^
a.cc:15:49: error: expression list treated as compound expression in initializer [-fpermissive]
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^
a.cc: In lambda function:
a.cc:15:52: error: expected '{' before '<<' token
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^~
a.cc: In function 'int main()':
a.cc:15:52: error: no match for 'operator<<' (operand types are 'main()::<lambda()>' and '<unresolved overloaded function type>')
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(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: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:15:55: note: 'main()::<lambda()>' is not derived from 'std::basic_ostream<_CharT, _Traits>'
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^~~~
/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:15:55: note: 'main()::<lambda()>' is not derived from 'std::basic_ostream<_CharT, _Traits>'
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(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: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:15:55: note: couldn't deduce template parameter '_IntegerType'
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^~~~
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:15:55: note: 'main()::<lambda()>' is not derived from 'std::basic_ostream<_CharT, _Traits>'
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^~~~
/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:15:55: note: 'main()::<lambda()>' is not derived from 'std::basic_ostream<_CharT, _Traits>'
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^~~~
/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:15:55: note: 'main()::<lambda()>' is not derived from 'std::basic_ostream<_CharT, _Traits>'
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^~~~
/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:15:55: note: 'main()::<lambda()>' is not derived from 'std::basic_ostream<char, _Traits>'
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^~~~
/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:15:55: note: 'main()::<lambda()>' is not derived from 'std::basic_ostream<char, _Traits>'
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^~~~
/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:15:55: note: 'main()::<lambda()>' is not derived from 'std::basic_ostream<char, _Traits>'
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^~~~
/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:15:55: note: 'main()::<lambda()>' is not derived from 'std::basic_ostream<_CharT, _Traits>'
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^~~~
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:15:55: note: 'main()::<lambda()>' is not derived from 'std::basic_ostream<_CharT, _Traits>'
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^~~~
/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:15:55: note: 'main()::<lambda()>' is not derived from 'std::basic_ostream<char, _Traits>'
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^~~~
/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:15:55: note: 'main()::<lambda()>' is not derived from 'std::basic_ostream<char, _Traits>'
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^~~~
/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:15:55: note: 'main()::<lambda()>' is not derived from 'std::basic_ostream<char, _Traits>'
15 | cout << {"LESS", "EQUAL", "GREATER"}[comp(a, b)] << endl;
| ^~~~
/usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& s |
s192746485 | p03738 | C++ | #include <iostream>
using namespace std;
//A>B のときGREATER、A<B のときLESS、A=B のときEQUAL
int main()
{
long long a, b;
cin >> a >> b;
if (a > b)
{
cout << "GREATER" << endl;
}
else if (a < b)
{
cout << "LESS" << endl;
}
else if (a == b)
{
"EQUAL"
}
}
| a.cc: In function 'int main()':
a.cc:21:12: error: expected ';' before '}' token
21 | "EQUAL"
| ^
| ;
22 | }
| ~
|
s050613301 | p03738 | C++ | #include <iostream.h>
using namespace std;
//A>B のときGREATER、A<B のときLESS、A=B のときEQUAL
int main()
{
long long a, b;
cin >> a >> b;
if (a > b)
{
cout << "GREATER" << endl;
}
else if (a < b)
{
cout << "LESS" << endl;
}
else if (a == b)
{
"EQUAL"
}
}
| a.cc:1:10: fatal error: iostream.h: No such file or directory
1 | #include <iostream.h>
| ^~~~~~~~~~~~
compilation terminated.
|
s559098297 | p03738 | C++ | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <list>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> P;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;
#define rep(i,n) for(int (i)=0;(i)<(ll)(n);++(i))
#define repd(i,n,d) for(ll (i)=0;(i)<(ll)(n);(i)+=(d))
#define all(v) (v).begin(), (v).end()
#define pb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset((m),(v),sizeof(m))
#define chmin(x,y) (x=min(x,y))
#define chmax(x,y) (x=max(x,y))
#define fst first
#define snd second
#define UNIQUE(x) (x).erase(unique(all(x)),(x).end())
template<class T> ostream &operator<<(ostream &os, const vector<T> &v){int n=v.size();rep(i,n)os<<v[i]<<(i==n-1?"":" ");return os;}
int main(){
string a, b;
cin>>a>>b;
int res;
if(a.size()<b.size()) res = -1;
else if(a.size()>b.size()) res = 1;
else if(a<b) res = -1;
else if(b>a) res = 1;
cout<<(res==1?"GREATER":res==0?"EUQAL":"LESS")<<endl;
else res = 0;
return 0;
}
| a.cc: In function 'int main()':
a.cc:50:3: error: 'else' without a previous 'if'
50 | else res = 0;
| ^~~~
|
s669365253 | p03738 | C++ | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <sstream>
#include <functional>
#include <map>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <list>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> P;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;
#define rep(i,n) for(int (i)=0;(i)<(ll)(n);++(i))
#define repd(i,n,d) for(ll (i)=0;(i)<(ll)(n);(i)+=(d))
#define all(v) (v).begin(), (v).end()
#define pb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))
#define mset(m,v) memset((m),(v),sizeof(m))
#define chmin(x,y) (x=min(x,y))
#define chmax(x,y) (x=max(x,y))
#define fst first
#define snd second
#define UNIQUE(x) (x).erase(unique(all(x)),(x).end())
template<class T> ostream &operator<<(ostream &os, const vector<T> &v){int n=v.size();rep(i,n)os<<v[i]<<(i==n-1?"":" ");return os;}
int main(){
string a, b;
cin>>a>>b;
int res;
if(a.size()<b.size()) res = -1;
else if(a.size()>b.size()) res = 1;
else if(a<b) res = -1;
else if(b>a) res = 1;
cout<<(res==1?"GREATER":res==0"EUQAL":"LESS")<<endl;
else res = 0;
return 0;
}
| a.cc: In function 'int main()':
a.cc:49:16: error: operands to '?:' have different types 'const char*' and 'bool'
49 | cout<<(res==1?"GREATER":res==0"EUQAL":"LESS")<<endl;
| ~~~~~~^~~~~~~~~~~~~~~~~
a.cc:49:33: error: expected ')' before string constant
49 | cout<<(res==1?"GREATER":res==0"EUQAL":"LESS")<<endl;
| ~ ^~~~~~~
| )
a.cc:50:3: error: 'else' without a previous 'if'
50 | else res = 0;
| ^~~~
|
s918110605 | p03738 | C++ | #include <iostream>
#include <string>
using namespace std;
string A, B;
int main(void)
{
cin >> A >> B;
if(A.size() > B.size()){
string T = A, A = B, B = T;
}
string Z = "";
for(int i = 0; i < B.size() - A.size(); i++){
Z += "0";
}
T = Z + A;
A = T;
for(int i = 0; i < A.size(); i++){
if(A[i] < B[i]){
cout << "LESS" << endl;
return 0;
}
else if(A[i] > B[i]){
cout << "GREATER" << endl;
return 0;
}
}
cout << "EQUAL" << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:19:9: error: 'T' was not declared in this scope
19 | T = Z + A;
| ^
|
s355107983 | p03738 | C++ | #include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
using namespace std;
typedef long long llong;
int main(){
llong A,B;
scanf("%lld %lld",&A,&B);
if(A>B) printf("GREATER\n");
else(A<B) printf("LESS\n");
else printf("EQUAL\n");
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:12: error: expected ';' before 'printf'
11 | else(A<B) printf("LESS\n");
| ^~~~~~~
| ;
a.cc:12:3: error: 'else' without a previous 'if'
12 | else printf("EQUAL\n");
| ^~~~
|
s462084914 | p03738 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void){
// Your code here!
string A, B;
cin >> A;
cin >> B;
int C, D
int C = stoi(A)
int D = stoi(B)
if (C > D)
{
cout << "GREATER" << endl;
}
else if (C < D)
{
cout << "LESS" << endl;
}
else
{
cout << "EQUAL" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:5: error: expected initializer before 'int'
10 | int C = stoi(A)
| ^~~
a.cc:16:5: error: 'else' without a previous 'if'
16 | else if (C < D)
| ^~~~
a.cc:16:18: error: 'D' was not declared in this scope
16 | else if (C < D)
| ^
|
s856158551 | p03738 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void){
// Your code here!
string A, B;
cin >> A;
cin >> B;
int C, D
int C = int.stoi(A)
int D = int.stoi(B)
if (C > D)
{
cout << "GREATER" << endl;
}
else if (C < D)
{
cout << "LESS" << endl;
}
else
{
cout << "EQUAL" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:10:5: error: expected initializer before 'int'
10 | int C = int.stoi(A)
| ^~~
a.cc:16:5: error: 'else' without a previous 'if'
16 | else if (C < D)
| ^~~~
a.cc:16:18: error: 'D' was not declared in this scope
16 | else if (C < D)
| ^
|
s744459640 | p03738 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void){
// Your code here!
string A, B;
cin >> A;
cin >> B;
int C = int.stoi(A)
int D = int.stoi(B)
if (C > D)
{
cout << "GREATER" << endl;
}
else if (C < D)
{
cout << "LESS" << endl;
}
else
{
cout << "EQUAL" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:9:13: error: expected primary-expression before 'int'
9 | int C = int.stoi(A)
| ^~~
a.cc:19:5: error: 'else' without a previous 'if'
19 | else
| ^~~~
|
s614468524 | p03738 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void){
// Your code here!
string A, B;
cin >> A;
cin >> B;
int C = int.stoi(A)
int D = int.stoi(B)
if (A > B)
{
cout << "GREATER" << endl;
}
else if (A < B)
{
cout << "LESS" << endl;
}
else
{
cout << "EQUAL" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:9:13: error: expected primary-expression before 'int'
9 | int C = int.stoi(A)
| ^~~
a.cc:19:5: error: 'else' without a previous 'if'
19 | else
| ^~~~
|
s216538158 | p03738 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void){
// Your code here!
string A, B;
cin >> A;
cin >> B;
int C = int.Palse(A)
int D = int.Palse(B)
if (A > B)
{
cout << "GREATER" << endl;
}
else if (A < B)
{
cout << "LESS" << endl;
}
else
{
cout << "EQUAL" << endl;
}
}
| a.cc: In function 'int main()':
a.cc:9:13: error: expected primary-expression before 'int'
9 | int C = int.Palse(A)
| ^~~
a.cc:19:5: error: 'else' without a previous 'if'
19 | else
| ^~~~
|
s893593868 | p03738 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <set>
using namespace std;
int main(void){
string a,b;
cin>>a>>b;
if(a.size()>b.size())cout<<"GREATER"<<endl;
else if(a.size()<b.size())cout<<"LESS"<<endl;
else if(a>b)cout<<"GREATER"<<endl;
else cout<<"LESS"<<endl;
else cout<<"EQUAL"<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:14:5: error: 'else' without a previous 'if'
14 | else cout<<"EQUAL"<endl;
| ^~~~
a.cc:14:23: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
14 | else cout<<"EQUAL"<endl;
| ~~~~~~~~~~~~~^~~~~
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: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:14:24: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
14 | else cout<<"EQUAL"<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:14:24: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
14 | else cout<<"EQUAL"<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:14:24: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
14 | else cout<<"EQUAL"<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:14:24: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
14 | else cout<<"EQUAL"<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: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:14:24: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
14 | else cout<<"EQUAL"<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: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:14:24: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
14 | else cout<<"EQUAL"<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:14:24: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
14 | else cout<<"EQUAL"<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:14:24: note: couldn't deduce template parameter '_CharT'
14 | else cout<<"EQUAL"<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:14:24: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
14 | else cout<<"EQUAL"<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:14:24: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
14 | else cout<<"EQUAL"<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:14:24: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
14 | else cout<<"EQUAL"<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: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:14:24: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
14 | else cout<<"EQUAL"<endl;
| ^~~~
In file included from /usr/include/c++/14/set:63,
from a.cc:5:
/usr/include/c++/14/bits/stl_set.h:1025:5: note: candidate: 'template<class _Key, class _Compare, class _Alloc> bool std::operator<(const set<_Key, _Compare, _Allocator>&, const set<_Key, _Compare, _Allocator>&)'
1025 | operator<(const set<_Key, _Compare, _Alloc>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_set.h:1025:5: note: template argument deduction/substitution failed:
a.cc:14:24: note: 'std::basic_ostream<char>' is not derived from 'const std::set<_Key, _Compare, _Allocator>'
14 | else cout<<"EQUAL"<endl;
| ^~~~
In file included from /usr/include/c++/14/set:64:
/usr/include/c++/14/bits/stl_multiset.h:1011:5: note: candidate: 'template<class _Key, class _Compare, class _Alloc> bool std::operator<(const multiset<_Key, _Compare, _Allocator>&, const multiset<_Key, _Compare, _Allocator>&)'
1011 | operator<(const multiset<_Key, _Compare, _Alloc>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_multiset.h:1011:5: note: template argument deduction/substitution failed:
a.cc:14:24: note: 'std::basic_ostream<char>' is not derived from 'const std::multiset<_Key, _Compare, _Allocator>'
14 | else cout<<"EQUAL"<endl;
| ^~~~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)'
507 | operator<(const error_condition& __lhs,
| ^~~~~~~~
/usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&'
507 | operator<(const error_condition& __lhs,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
s438181505 | p03738 | C++ | A = int(input())
B = int(input())
if A > B:
print('GREATER')
elif A < B:
print('LESS')
else:
print('EQUAL') | a.cc:4:11: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
4 | print('GREATER')
| ^~~~~~~~~
a.cc:6:11: warning: multi-character character constant [-Wmultichar]
6 | print('LESS')
| ^~~~~~
a.cc:8:11: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
8 | print('EQUAL')
| ^~~~~~~
a.cc:1:1: error: 'A' does not name a type
1 | A = int(input())
| ^
|
s070346830 | p03738 | Java |
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
import java.math.BigDecimal;
import java.util.Scanner;
public class Main {
BigDecimal A = in.nextBigDecimal();
BigDecimal B = in.nextBigDecimal();
if(A.compareTo(B) > 0) System.out.println("GREATER");
if(A.compareTo(B) == 0) System.out.println("EQUAL");
if(A.compareTo(B) < 0) System.out.println("LESS");
in.close();
}
} | Main.java:5: error: not a statement
import java.math.BigDecimal;
^
Main.java:6: error: not a statement
import java.util.Scanner;
^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
^
(use --enable-preview to enable unnamed classes)
Main.java:5: error: illegal start of expression
import java.math.BigDecimal;
^
Main.java:6: error: illegal start of expression
import java.util.Scanner;
^
Main.java:8: error: illegal start of expression
public class Main {
^
Main.java:12: error: illegal start of type
if(A.compareTo(B) > 0) System.out.println("GREATER");
^
Main.java:12: error: <identifier> expected
if(A.compareTo(B) > 0) System.out.println("GREATER");
^
Main.java:12: error: <identifier> expected
if(A.compareTo(B) > 0) System.out.println("GREATER");
^
Main.java:12: error: ';' expected
if(A.compareTo(B) > 0) System.out.println("GREATER");
^
Main.java:13: error: illegal start of type
if(A.compareTo(B) == 0) System.out.println("EQUAL");
^
Main.java:13: error: <identifier> expected
if(A.compareTo(B) == 0) System.out.println("EQUAL");
^
Main.java:13: error: <identifier> expected
if(A.compareTo(B) == 0) System.out.println("EQUAL");
^
Main.java:13: error: ';' expected
if(A.compareTo(B) == 0) System.out.println("EQUAL");
^
Main.java:14: error: illegal start of type
if(A.compareTo(B) < 0) System.out.println("LESS");
^
Main.java:14: error: <identifier> expected
if(A.compareTo(B) < 0) System.out.println("LESS");
^
Main.java:14: error: <identifier> expected
if(A.compareTo(B) < 0) System.out.println("LESS");
^
Main.java:14: error: ';' expected
if(A.compareTo(B) < 0) System.out.println("LESS");
^
Main.java:14: error: <identifier> expected
if(A.compareTo(B) < 0) System.out.println("LESS");
^
Main.java:14: error: illegal start of type
if(A.compareTo(B) < 0) System.out.println("LESS");
^
Main.java:14: error: <identifier> expected
if(A.compareTo(B) < 0) System.out.println("LESS");
^
Main.java:14: error: illegal start of type
if(A.compareTo(B) < 0) System.out.println("LESS");
^
Main.java:16: error: <identifier> expected
in.close();
^
Main.java:19: error: class, interface, enum, or record expected
}
^
24 errors
|
s945331403 | p03738 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
double A,B;
cin >> A >> B;
string ans="EQUAL";
if(A>size)
if(A>B){
ans="GREATER";
}else if(A<B){
ans="LESS";
}
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:6: error: invalid operands of types 'double' and '<unresolved overloaded function type>' to binary 'operator>'
9 | if(A>size)
| ~^~~~~
|
s646256271 | p03738 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int A,B;
cin >> A >> B;
string ans="EQUAL";
if(A>B){
ans="GREATER";
}else if{
(A<B)ans="LESS";
}
cout << ans << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:11:10: error: expected '(' before '{' token
11 | }else if{
| ^
| (
|
s201342502 | p03738 | Java | import java.util.Scanner;
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 ){
System.out.print("GREATER");
}else if( a == b ){
System.out.print("EQUAL");
}else if( a < b ){
System.out.print("LESS");
}else{
break;
}
sc.close();
}
} | Main.java:18: error: break outside switch or loop
break;
^
1 error
|
s188958801 | p03738 | C++ | x = input().split(" ")
a = int(x[0])
b = int(x[1])
if (a>b):
print("GREATER")
elif(a==b):
print("EQUAL")
else:
print("LESS")
| a.cc:1:1: error: 'x' does not name a type
1 | x = input().split(" ")
| ^
|
s771492702 | p03738 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
string a,b,la,lb;
cin>>a>>b;
la=a.length();
lb=b.lemgth();
if(a>b||la>lb){
cout<<"GREATER"<<endl;
}else if(a<b||la<lb){
cout<<"LESS"<<endl;
}else{
cout<<"EQUAL"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:8: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lemgth'; did you mean 'length'?
11 | lb=b.lemgth();
| ^~~~~~
| length
|
s581357938 | p03738 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <sstream>
#include <algorithm>
#include <bitset>
#include <limits>
#include <map>
#include <set>
#include <iomanip>
#include <cmath>
using namespace std;
typedef long long int ll;
typedef std::numeric_limits<double> dbl;
const long long int LL_INF=1LL<<60;
vector<string> split(const string& input, char delimiter)
{
stringstream stream(input);
string field;
vector<string> result;
while (getline(stream, field, delimiter)) {
result.push_back(field);
}
return result;
}
//#define DEBUG
ll A, B, M, N, D, K, Q, W, H, T, X, Y;
int main()
{
string s1, s2;
cin >> s1 >> s2;
if (s1.size() > s2.size())
cout << "GREATER" << endl;
else if (s1.size() < s2.size())
cout << "LESS" << endl;
else {
for (int i = 0; i < s1.size(); ++i) {
if (s1[i] > s2[i]) {
cout << "GREATER" << endl; return 0;
}else if (s[i] < s2[i]) {
cout << "LESS" << endl; return 0;
}
}
cout << "EQUAL" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:47:19: error: 's' was not declared in this scope
47 | }else if (s[i] < s2[i]) {
| ^
|
s962252279 | p03738 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string a, b;
cin >> a >> b;
if(a.size() < b.size()) cout << "LESS" < endl;
else if(a.size() > b.size()) cout << "GREATER" << endl;
else if(a == b) cout << "EQUAL" << endl;
else if(a < b) cout << "LESS" << endl;
else if(a > b) cout << "GREATER" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:8:42: error: no match for 'operator<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
8 | if(a.size() < b.size()) cout << "LESS" < endl;
| ~~~~~~~~~~~~~~~^~~~~~
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: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:8:44: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | if(a.size() < b.size()) cout << "LESS" < 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:8:44: note: 'std::basic_ostream<char>' is not derived from 'const std::reverse_iterator<_Iterator>'
8 | if(a.size() < b.size()) cout << "LESS" < 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:8:44: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | if(a.size() < b.size()) cout << "LESS" < 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:8:44: note: 'std::basic_ostream<char>' is not derived from 'const std::move_iterator<_IteratorL>'
8 | if(a.size() < b.size()) cout << "LESS" < 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: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:8:44: note: 'std::basic_ostream<char>' is not derived from 'const std::pair<_T1, _T2>'
8 | if(a.size() < b.size()) cout << "LESS" < 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: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:8:44: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | if(a.size() < b.size()) cout << "LESS" < 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:8:44: note: 'std::basic_ostream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | if(a.size() < b.size()) cout << "LESS" < 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:8:44: note: couldn't deduce template parameter '_CharT'
8 | if(a.size() < b.size()) cout << "LESS" < 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:8:44: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
8 | if(a.size() < b.size()) cout << "LESS" < 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:8:44: note: 'std::basic_ostream<char>' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>'
8 | if(a.size() < b.size()) cout << "LESS" < 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:8:44: note: mismatched types 'const _CharT*' and 'std::basic_ostream<char>'
8 | if(a.size() < b.size()) cout << "LESS" < 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: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:8:44: note: 'std::basic_ostream<char>' is not derived from 'const std::tuple<_UTypes ...>'
8 | if(a.size() < b.size()) cout << "LESS" < endl;
| ^~~~
In file included from /usr/include/c++/14/bits/ios_base.h:46:
/usr/include/c++/14/system_error:324:3: note: candidate: 'bool std::operator<(const error_code&, const error_code&)'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ^~~~~~~~
/usr/include/c++/14/system_error:324:31: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_code&'
324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept
| ~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/system_error:507:3: note: candidate: 'bool std::operator<(const error_condition&, const error_condition&)'
507 | operator<(const error_condition& __lhs,
| ^~~~~~~~
/usr/include/c++/14/system_error:507:36: note: no known conversion for argument 1 from 'std::basic_ostream<char>' to 'const std::error_condition&'
507 | operator<(const error_condition& __lhs,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
|
s236097795 | p03738 | C++ | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
a = input()
b = input()
a = int(a)
b = int(b)
if a > b:
print("GREATER")
elif a < b:
print("LESS")
else:
print("EQUAL")
| a.cc:1:2: error: invalid preprocessing directive #!
1 | #!/usr/bin/env python3
| ^
a.cc:2:3: error: invalid preprocessing directive #-
2 | # -*- coding: utf-8 -*-
| ^
a.cc:4:1: error: 'a' does not name a type
4 | a = input()
| ^
|
s597452717 | p03738 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
string a, b;
int ans = 0;
cin >> a >> b;
if (a.size() > b.size()){ ans = 1; }
if (a.size() < b.size()){ ans = 2; }
if (a.size() == b.size()){
for (int i = 0(); i<a.size(); i++){
if (a[i]>b[i]){ ans = 1; break; }
if (a[i] < b[i]) { ans = 2; break; }
}
}
if (ans == 0){ cout << "EQUAL" << endl; }
if (ans == 1){ cout << "GREATER" << endl; }
if (ans == 2){ cout << "LESS" << endl; }
return 0;
}
| a.cc: In function 'int main()':
a.cc:11:39: error: expression cannot be used as a function
11 | for (int i = 0(); i<a.size(); i++){
| ~^~
|
s033350777 | p03738 | C++ | #include <iostream>
#include <boost/multiprecision/cpp_int.hpp>
namespace mp = boost::multiprecision
int main() {
mp::cpp_int x, y;
std::cin >> x >> y;
if (x > y) std::cout << "GREATER" << std::endl;
else if (x < y) std::cout << "LESS" << std::endl;
else std::cout << "EQUAL" << std::endl;
return 0;
}
| a.cc:2:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
2 | #include <boost/multiprecision/cpp_int.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s145053442 | p03738 | C++ | #include<iostream>
#include<string>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
unsigned long long int A,B;
string result='EQUAL';
cin >> A;
cin >> B;
if(A>B) result='GREATER';
else if (A>B) result='LESS';
cout << result << "\n";
} | a.cc:9:23: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
9 | string result='EQUAL';
| ^~~~~~~
a.cc:12:20: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
12 | if(A>B) result='GREATER';
| ^~~~~~~~~
a.cc:13:26: warning: multi-character character constant [-Wmultichar]
13 | else if (A>B) result='LESS';
| ^~~~~~
a.cc: In function 'int main()':
a.cc:9:23: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
9 | string result='EQUAL';
| ^~~~~~~
a.cc:12:20: warning: overflow in conversion from 'int' to 'char' changes value from '1096041810' to '82' [-Woverflow]
12 | if(A>B) result='GREATER';
| ^~~~~~~~~
a.cc:13:26: warning: overflow in conversion from 'int' to 'char' changes value from '1279611731' to '83' [-Woverflow]
13 | else if (A>B) result='LESS';
| ^~~~~~
|
s493037592 | p03738 | Java | /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
long first = sc.nextLong();
long second = sc.nextLong();
String result = "";
if(first > second) {
result = "GREATER"
} else if(first < second) {
result = "LESS";
} else {
result = "EQUAL";
}
System.out.println(result);
}
} | Main.java:17: error: ';' expected
result = "GREATER"
^
1 error
|
s557936970 | p03738 | Java | import java.util.Scanner;
class Main {
public static void main (String[] args) {
Scanner scanner = new Scanner(System.in);
double a = scanner.nextDouble();
double b = scanner.nexDouble();
if(a > b) {
System.out.println("GREATER");
} else if(a < b) {
System.out.println("LESS");
} else {
System.out.println("EQUAL");
}
}
} | Main.java:8: error: cannot find symbol
double b = scanner.nexDouble();
^
symbol: method nexDouble()
location: variable scanner of type Scanner
1 error
|
s793492984 | p03738 | Java | import java.util.scanner;
class Main {
public static void main (String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
if(a > b) {
System.out.println("GREATER");
} else if(a < b) {
System.out.println("LESS");
} else {
System.out.println("EQUAL");
}
}
} | Main.java:1: error: cannot find symbol
import java.util.scanner;
^
symbol: class scanner
location: package java.util
Main.java:5: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:5: error: cannot find symbol
Scanner scanner = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
3 errors
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.