submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s363341378 | 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("... | Main.java:17: error: reached end of file while parsing
}
^
1 error
|
s262577567 | 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("... | 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
... |
s273966388 | 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("EQU... | Main.java:17: error: reached end of file while parsing
}
^
1 error
|
s742712906 | p03738 | C++ | #include <iostream>
#include <stdio.h>
#include <cstring>
using namespace std;
int main()
{
char a[101] = {0};
char b[101] = {0};
int check = 0;
cin >> a >> b;
int aa = strlen(a);
int bb = strlen(b);
if(a > b)
cout << "GREATER";
else if(a == b)
cout << "EQUAL";
else if(a < b)
cout << "LESS";
... | a.cc: In function 'int main()':
a.cc:32:42: error: expected ';' before 'break'
32 | check = 1
| ^
| ;
33 | break;
| ~~... |
s792798906 | p03738 | C++ | #include <iostream>
#include <stdio.h>
#include <cstring>
using namespace std;
int main()
{
string a, b;
cin >> a >> b;
if(a > b){
cout << "GREATER";
}
if(a == b){
cout << "EQUAL";
}
else
cout << " "
}
| a.cc: In function 'int main()':
a.cc:22:28: error: expected ';' before '}' token
22 | cout << " "
| ^
| ;
23 | }
| ~
|
s096932881 | p03738 | C | unsigned long long int a,b;
scanf("%llu%llu",a,b);
if(a==b){
printf("EQUAL");
}else if(a<b){
printf("LESS");
}else{
printf("GREATER");
}
} | main.c:2:7: error: expected declaration specifiers or '...' before string constant
2 | scanf("%llu%llu",a,b);
| ^~~~~~~~~~
main.c:2:18: error: expected declaration specifiers or '...' before 'a'
2 | scanf("%llu%llu",a,b);
| ^
main.c:2:20: error: expected declaration specifiers... |
s615844783 | p03738 | Java | import java.util.Scanner;
public class Main{
public static void main(System.in){
Scanner scan = new Scanner(System.in);
String a = scan.next();
String b = scan.next();
if(a.length() > b.length()){
System.out.println("GREATER");
break;
} else if(a.length() < b.length()){
System.out.println("LESS... | Main.java:4: error: <identifier> expected
public static void main(System.in){
^
1 error
|
s361668778 | p03738 | C | #include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;
const long D = 1000000007;
int main()
{
string a, b;
cin >> a >> b;
if (a.length() < b.length())
{
cout << "LESS" << endl;
}
else if (a.length() > b.length())
{
cout << "GREATER" << endl;
}
else
{
cout << (a > b... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s126233893 | p03738 | C++ | #include<iostream>
#include<fstream>
#include<string>
#include<cmath>
#include<queue>
using namespace std;
int main(){
string A,B;
int numA,numB,dA,dB;
int i;
cin >> A;
cin >> B;
numA=A.length();
numB=B.length();
if (numA>numB){
cout<<"GREATER"<<endl;
}
else if(numA<numB){
cout<<"LESS"<<endl;
}... | a.cc:48:1: error: expected unqualified-id before 'return'
48 | return 0;
| ^~~~~~
a.cc:49:1: error: expected declaration before '}' token
49 | };
| ^
|
s694307843 | p03738 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if(a>b)cout<<"GREATER"<<endl;
else if(a==b)cout<<"EQUAL"<<endl;
else cout<<"LESS"<<ednl;
} | a.cc: In function 'int main()':
a.cc:8:20: error: 'ednl' was not declared in this scope
8 | else cout<<"LESS"<<ednl;
| ^~~~
|
s744572272 | p03738 | C++ | package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
func main() {
sc := NewScanner()
a := ""
a = sc.NextLine()
b := ""
b = sc.NextLine()
if a == b {
fmt.Printf("EQUAL\n")
} else if a > b {
fmt.Printf("GREATER\n")
} else {
fmt.Printf("LESS\n")
}
}
type Scanner struct {
r *bufio.Reader
buf []... | a.cc:1:1: error: 'package' does not name a type
1 | package main
| ^~~~~~~
a.cc:27:1: error: 'type' does not name a type; did you mean 'typeof'?
27 | type Scanner struct {
| ^~~~
| typeof
a.cc:33:1: error: 'func' does not name a type
33 | func NewScanner() *Scanner {
| ^~~~
a.cc:37:6: ... |
s817512256 | p03738 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <queue>
using namespace std;
int main()
{
std::ios::sync_with_stdio(false);
std::cin.tie(0);
string A, B;
cin >> A;
cin >> B;
int n = max(A.size(), B.size());
string ans;
if (A.size() > B.size())
{
cout << "GREAT... | a.cc: In function 'int main()':
a.cc:22:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
22 | return;
| ^~~~~~
|
s066913677 | p03738 | Java | import java.util.Scanner;
public class ABC {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
// 整数の入力
String input1 = sc.next();
String input2 = sc.next();
int a = new Integer(input1).intValue();
int b = new Integer(input2).intValue();
if(a == b) System.out.pri... | Main.java:4: error: class ABC is public, should be declared in a file named ABC.java
public class ABC {
^
Main.java:10: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal
int a = new Integer(input1).intValue();
^
Main.java:11: warning: [removal] Integer(String)... |
s672548690 | p03738 | Java | import java.io.File;
import java.util.Scanner;
public class ABC {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
// 整数の入力
String input1 = sc.next();
String input2 = sc.next();
int a = new Integer(input1).intValue();
int b = new Integer(input2).intValue();
if(a... | Main.java:5: error: class ABC is public, should be declared in a file named ABC.java
public class ABC {
^
Main.java:11: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal
int a = new Integer(input1).intValue();
^
Main.java:12: warning: [removal] Integer(String)... |
s154908948 | p03738 | Java | import java.io.File;
import java.util.Scanner;
public class ABC {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
// 整数の入力
String input1 = sc.next();
String input2 = sc.next();
int a = new Integer(input1).intValue();
int b = new Integer(input2).intValue();
if(a... | Main.java:5: error: class ABC is public, should be declared in a file named ABC.java
public class ABC {
^
Main.java:11: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal
int a = new Integer(input1).intValue();
^
Main.java:12: warning: [removal] Integer(String)... |
s006787463 | p03738 | C++ | #include<iostream>
#include <string>
#include<algorithm>
using namespace std;
int main() {
string a, b;
int c=0;
cin >> a >> b;
for (int i = 0; i < min(a.size(), b.size());i++) {
if (a[i] < b[i]) {
c = 1;
break;
}
else if (a[i] > b[i]) {
c = 2;
break;
}
}
if (a.size() < b.size()) {
c = 1;
... | a.cc: In function 'int main()':
a.cc:22:17: error: break statement not within loop or switch
22 | break;
| ^~~~~
a.cc:26:17: error: break statement not within loop or switch
26 | break;
| ^~~~~
|
s493653135 | p03738 | C | #include <stdio.h>
#include <stdlib.h>
int main(){
char one[100] = {0};
char two[100] = {0};
int length i = 0;
int length j = 0;
int x;
char buffer;
scanf("%c",&buffer);
while(buffer != '\n'){
one[i] = buffer;
i++;
scanf("%c",&buffer);
}
scanf("%c",&buffer);
whi... | main.c: In function 'main':
main.c:7:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'i'
7 | int length i = 0;
| ^
main.c:7:15: error: 'i' undeclared (first use in this function)
main.c:7:15: note: each undeclared identifier is reported only once for each function it appear... |
s419778128 | p03738 | C++ | #incldue<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
if(a>b)cout<<"GREATER"<<endl;
else if(a==b)cout<<"EQUAL"<<endl;
else cout<<"LESS"<<endl;
return 0;
} | a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
1 | #incldue<bits/stdc++.h>
| ^~~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:2: error: 'cin' was not declared in this scope
5 | cin>>a>>b;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<ios... |
s567894584 | p03738 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String num1 = in.next();
String num2 = in.next();
Compare com = new Main();
int result = com.Compare(num1, num2);
String display = "";
if (result == -1) {
display = "LESS";
}e... | Main.java:8: error: cannot find symbol
Compare com = new Main();
^
symbol: class Compare
location: class Main
1 error
|
s849281823 | p03738 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<queue>
#include<vector>
#include<map>
#define For(i,a,b) for(int i=a;i<=b;i++)
#define ForD(i,a,b) for (int i=a;i>=b;i--)
#define LL long long
#define INF (2147483647)
#define sqr(x) ((x)*(x))
using namespace std;
inli... | a.cc: In function 'int main()':
a.cc:48:18: error: 'a' was not declared in this scope
48 | }a
| ^
|
s257846602 | p03738 | C++ | #include<iostream>
#include <string>
#include <algorithm>
using namespace std;
void main()
{
long A, B;
cin >> A >>B;
//cin >> B ;
if (A < B) {
cout << "LESS" << endl;
}
else if (A == B) {
cout << "EQUAL" << endl;
}
else if (A > B) {
cout << "GREATER" << endl;
}
} | a.cc:5:1: error: '::main' must return 'int'
5 | void main()
| ^~~~
|
s895740936 | p03738 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
long long int a,b;
cin>>a>>b;
long long char c=a,d=b;
if(c>d){
cout<<"GREATER"<<endl;
}
if(c<d){
cout<<"LESS"<<endl;
}
if(c==d){
cout<<"EQUAL"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:9:6: error: 'long long' specified with 'char'
9 | long long char c=a,d=b;
| ^~~~
a.cc:9:6: error: 'long long' specified with 'char'
|
s935835466 | p03738 | C++ | #include<iostream>
#include<string>
using namespace std;
int main(){
long long char a,b;
cin>>a>>b;
if(a>b){
cout<<"GREATER"<<endl;
}
if(a<b){
cout<<"LESS"<<endl;
}
if(a==b){
cout<<"EQUAL"<<endl;
}
} | a.cc: In function 'int main()':
a.cc:6:6: error: 'long long' specified with 'char'
6 | long long char a,b;
| ^~~~
a.cc:6:6: error: 'long long' specified with 'char'
|
s816961471 | p03738 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
scanf("%d%d", &a, &b)l
if (a > b) printf("GREATER\n");
else if (a == b) printf("EQUAL\n");
else printf("LESS\n");
}
| a.cc: In function 'int main()':
a.cc:6:26: error: expected ';' before 'l'
6 | scanf("%d%d", &a, &b)l
| ^
| ;
a.cc:8:5: error: 'else' without a previous 'if'
8 | else if (a == b) printf("EQUAL\n");
| ^~~~
|
s037220470 | p03738 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
string A, B; cin >> A >> B;
ll len = max(A.size(), B.size());
while (A.size() < len) A = "0" + A;
while (B.size() < len) B = "0" + B;
if (A < B) cout << "LESS" << endl;
else if (A > B) cout << "GREATER" << endl;
else cout << "EQUAL... | a.cc: In function 'int main()':
a.cc:7:5: error: 'll' was not declared in this scope
7 | ll len = max(A.size(), B.size());
| ^~
a.cc:8:23: error: 'len' was not declared in this scope
8 | while (A.size() < len) A = "0" + A;
| ^~~
a.cc:9:23: error: 'len' was not decla... |
s184946096 | p03738 | Java | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println(a59_b(sc.next(),sc.next()));
}
static String a59_b(String i1, String i2) {
BigInteger b1 = new BigInteger(i1);
BigInteger b2 = new BigInt... | Main.java:10: error: cannot find symbol
BigInteger b1 = new BigInteger(i1);
^
symbol: class BigInteger
location: class Main
Main.java:10: error: cannot find symbol
BigInteger b1 = new BigInteger(i1);
^
symbol: class BigInteger
location: class Main
Main.jav... |
s193695961 | p03738 | C++ | #include <iostream>
using namespace std;
int main(void){
char A,B;
cin >> A >> B;
if(A.length() > B.length())
cout << "GREATER" << endl;
else if(A.length() < B.length())
cout << "LESS" << endl;
else{
if(+A == +B)
cout << "EQUAL" << endl;
else if(+A > +B)
cout << "GREATER" << en... | a.cc: In function 'int main()':
a.cc:7:8: error: request for member 'length' in 'A', which is of non-class type 'char'
7 | if(A.length() > B.length())
| ^~~~~~
a.cc:7:21: error: request for member 'length' in 'B', which is of non-class type 'char'
7 | if(A.length() > B.length())
| ... |
s879014537 | p03738 | C++ | #include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<string>
#include<stack>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
int main(){
string a,b;
cin>>a>>b;
... | a.cc: In function 'int main()':
a.cc:23:17: error: expected primary-expression before '<<' token
23 | else if(a<b)<<"LESS"<<endl;
| ^~
|
s103325690 | p03738 | Java | import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class TaskB {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int result;
String a = in.nextLine();
String b = in.nextLine();
BigInteger aa = ne... | Main.java:7: error: class TaskB is public, should be declared in a file named TaskB.java
public class TaskB {
^
1 error
|
s936614349 | p03738 | Java | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
String A =scan.next();
String B =scan.next();
int a = 0;
int b = 0;
int count=0;
if(A.length()>B.length()){
System.out.println("GREATER");
Syst... | Main.java:36: error: reached end of file while parsing
}
^
1 error
|
s670119220 | p03738 | C++ | #include <iostream>
#include <string>
using namespace std;
const int MAX_N = 1000;
char A[MAX_N], B[MAX_N];
void solve() {
if (strcmp(A, B) > 0) {
cout << "GREATER" << endl;
}
else if (strcmp(A, B) < 0) {
cout << "LESS" << endl;
}
else if (strcmp(A, B) == 0) {
cout << "EQUAL" << endl;
}
}
int main()
{
... | a.cc: In function 'void solve()':
a.cc:11:13: error: 'strcmp' was not declared in this scope
11 | if (strcmp(A, B) > 0) {
| ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+++ |+#include ... |
s802536361 | p03738 | C++ | #include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int main() {
string a, b;
cin >> a >> b;
const auto s1 = a.size(), s2 = b.size();
if (s1 == s2) {
const auto c = strcmp(a.c_str(), b.c_str());
if (c < 0) {
cout << "LESS" << endl;... | a.cc: In function 'int main()':
a.cc:14:20: error: 'strcmp' was not declared in this scope
14 | const auto c = strcmp(a.c_str(), b.c_str());
| ^~~~~~
a.cc:6:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <vecto... |
s384983029 | p03738 | C | include <stdio.h>
int main(void){
int a,b;
scanf("%d",&a);
scanf("%d",&b);
if(&a>&b){
printf("GREATER");
}else if(&a<&b){
printf("LESS");
}else{
printf("EQUAL");
}
printf("\n");
return 0;
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s655080480 | p03738 | C | include <stdio.h>
int main(void){
int a,b;
scanf("%d",&a);
scanf("%d",&b);
if(a>b){
printf("GREATER");
}else if(a<b){
printf("LESS");
}else{
printf("EQUAL");
}
printf("\n");
return 0;
return 0;
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s846988337 | p03738 | C++ | #include <cstdio>
using namespace std;
int main(){
long double A, B;
scanf("%Lf\n%Lf", &A, &B);
if (A > B) printf("GREATER\n");
else if (A < B) printf("LESS\n");
else if (A == B) printf("EQUAL\n");
return 0;
}
[ohwa | a.cc:12:1: error: expected unqualified-id before '[' token
12 | [ohwa
| ^
|
s409670127 | p03738 | C | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
int in(void){
int i;scanf("%d",&i);
return i;
}
long long llin(void){
long long i;scanf("%lld",&i);
return i;
}
void print(int a){
printf("%d\n",a);
}
void llprint(long... | main.c: In function 'main':
main.c:44:33: error: expected ')' before 'puts'
44 | }if(i==strlen(a)puts("EQUAL");
| ~ ^~~~
| )
main.c:46:9: error: expected expression before '}' token
46 | }
| ^
|
s973236048 | p03738 | C++ | //インクルード
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
#include <boost/multiprecision/cpp_int.hpp>
//型宣言
typedef long long ll;
typedef unsigned long long ull;
typedef std::string string;
typedef string answerType;
//変数宣言
boost::multiprecision A;
boost::multiprecision B;
std::vector<string... | a.cc:6:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
6 | #include <boost/multiprecision/cpp_int.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s092221876 | p03738 | C++ | #include <bits/stdc>
using namespace std;
int main(void){
string A, B;
cin >> A >> B;
int a = A.size();
int b = B.size();
if(a>b){
cout << "GREATER" << endl;
return 0;
}else if(a<b){
cout << "LESS" << endl;
return 0;
}
for(int i=a-1; i>=0; i--){
... | a.cc:1:10: fatal error: bits/stdc: No such file or directory
1 | #include <bits/stdc>
| ^~~~~~~~~~~
compilation terminated.
|
s439861143 | p03738 | C++ | #include <bits/stdc
using namespace std;
int main(void){
string A, B;
cin >> A >> B;
int a = A.size();
int b = B.size();
if(a>b){
cout << "GREATER" << endl;
return 0;
}else if(a<b){
cout << "LESS" << endl;
return 0;
}
for(int i=a-1; i>=0; i--){
... | a.cc:1:20: error: missing terminating > character
1 | #include <bits/stdc
| ^
a.cc:1:10: fatal error: bits/stdc: No such file or directory
1 | #include <bits/stdc
| ^
compilation terminated.
|
s082012208 | p03738 | Java | import java.util.Scanner;
public class Tester {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String s1 = in.next();
String s2 = in.next();
in.close();
if(s1.length() > s2.length()) {
System.out.println("Greater");
} else if(s1.length() < s2.length()) {
System.out.p... | Main.java:3: error: class Tester is public, should be declared in a file named Tester.java
public class Tester {
^
1 error
|
s127787195 | p03738 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(void)
{
string A, B;
cin >> A >> B;
if (A.length() > B.length()) {
while (B.length() < A.length()) {
B = "0" + B;
}
} else {
while (A.length() < B.length()) {
A = "0" + A;
}
}
if (strcmp(A.c_str(), B.c_str()) > 0) {
cout << "GR... | a.cc: In function 'int main()':
a.cc:20:13: error: 'strcmp' was not declared in this scope
20 | if (strcmp(A.c_str(), B.c_str()) > 0) {
| ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <iostream>
+... |
s457889715 | p03738 | C++ | int main() {
int A, B;
cin >> A >> B;
if (A - B > 0) {
cout << "GREATER" << endl;
} else if (A - B == 0) {
cout << "EQUAL" << endl;
} else {
cout << "LESS" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin >> A >> B;
| ^~~
a.cc:5:5: error: 'cout' was not declared in this scope
5 | cout << "GREATER" << endl;
| ^~~~
a.cc:5:26: error: 'endl' was not declared in this scope
5 | cout << "GREATER... |
s990176102 | p03738 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[])
{
string s1, s2,s3;
cin>>s1>>s2;
bool f = false;
if(s1 == s2) {
cout<<"EQUAL"<<endl;
return 0;
}
if(s1.size()>s2.size()) f = true;
else if(s1.size() == s2.size() && (s1>s2) f = true;
if(f)
{
cout<<"GREATER";
r... | a.cc: In function 'int main(int, const char**)':
a.cc:20:50: error: expected ';' before 'f'
20 | else if(s1.size() == s2.size() && (s1>s2) f = true;
| ^~
| ;
a.cc:22:9: error: expected primary-expres... |
s487047139 | p03738 | C++ | #include <iostream>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <vector>
#include <string>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
int main()
{
//freopen("/Users/qianjay/Documents/apac/in", "r", stdin);
... | a.cc: In function 'int main()':
a.cc:27:27: error: 'endll' was not declared in this scope
27 | else cout<<"GREATER"<<endll;
| ^~~~~
|
s878524061 | p03738 | C++ | a = int(input())
b = int(input())
if a > b:
print("GREATER")
elif a < b:
print("LESS")
else:
print("EQUAL") | a.cc:1:1: error: 'a' does not name a type
1 | a = int(input())
| ^
|
s688656777 | p03738 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
public class ProblemB {
public static void main(String[] args) throws IOException {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
String line = in... | Main.java:6: error: class ProblemB is public, should be declared in a file named ProblemB.java
public class ProblemB {
^
1 error
|
s245663693 | p03739 | C++ | #include<bits/stdc++.h>
using namespace std;
#include<atcoder/all>
using namespace atcoder;
using ll = long long;
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define VIEW(x) d... | a.cc:3:9: fatal error: atcoder/all: No such file or directory
3 | #include<atcoder/all>
| ^~~~~~~~~~~~~
compilation terminated.
|
s341048926 | p03739 | C++ | #include <iostream>
using namespace std;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
long long main(void){
long long n;
cin >> n;
long long a[n];
rep(i,n){
cin >> a[i];
}
long long ans = 1000000000;
for(long long p=0;p<=1;p++){
long long tmpans = 0;
long lo... | cc1plus: error: '::main' must return 'int'
|
s652657135 | p03739 | C++ | #includ<bits/stdc++.h>
using namespace std;
int main()
{ int n;
cin>>n;
int arr[n];
for(int i=0;i<n;i++)
cin>>arr[i];
int sum=arr[0];
int sum1,sum2;
int ans1=0,ans2=0;
// case 1
if(sum>0)
{ sum1=sum;
sum2=-1;
ans1=0;
ans2=sum+1;
}
else if(sum<0)
{ sum2=sum;
... | a.cc:1:2: error: invalid preprocessing directive #includ; did you mean #include?
1 | #includ<bits/stdc++.h>
| ^~~~~~
| include
a.cc: In function 'int main()':
a.cc:5:4: error: 'cin' was not declared in this scope
5 | cin>>n;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostr... |
s869276180 | p03739 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{ int n;
cin>>n;
long int arr[n];
for(int i=0;i<n;i++)
cin>>arr[i];
long int sum=arr[0];
long int ans=0;
if(sum==0)
{ if(arr[i]>=0)
{ ans++;
sum=-1;
}
else
{ ans++;
sum=1;
}
}
for(int i=1;i<n;i++)
{ if(sum<0)
... | a.cc: In function 'int main()':
a.cc:12:12: error: 'i' was not declared in this scope
12 | { if(arr[i]>=0)
| ^
|
s207386222 | p03739 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{ int n;
cin>>n;
long int arr[n];
for(int i=0;i<n;i++)
cin>>arr[i];
long int sum=arr[0];
long int ans=0;
for(int i=1;i<n;i++)
{ if(sum<0)
{
sum=sum+arr[i];
if(sum>0)
continue;
else
{ ans+=abs(s... | a.cc: In function 'int main()':
a.cc:23:7: error: expected '(' before '{' token
23 | {
| ^
| (
|
s021259189 | p03739 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{ int n;
cin>>n;
long int arr[n];
for(int i=0;i<n;i++)
cin>>arr[i];
long int sum=arr[0];
long int ans=0;
for(int i=1;i<n;i++0
{ if(sum<0)
{
sum=sum+arr[i];
if(sum>0)
continue;
else
{ ans+=abs(s... | a.cc: In function 'int main()':
a.cc:11:21: error: expected ')' before numeric constant
11 | for(int i=1;i<n;i++0
| ~ ^
| )
a.cc:11:22: error: expected ';' before '{' token
11 | for(int i=1;i<n;i++0
| ^
| ;
... |
s982653322 | p03739 | C++ | #include <bits/stdc++.h>
using namespace std;
using llong = long long;
void input(vector<int>& rvnNum)
{
int nSize;
cin >> nSize;
rvnNum.resize(nSize);
for (int& rnElm : rvnNum)
cin >> rnElm;
}
llong calcMinOpeTimes(const vector<int>& cnrvnNum)
{
vector<llong> vnOpeTimes(2);
for (int nEvnOdd = 0; n... | a.cc: In function 'llong calcMinOpeTimes(const std::vector<int>&)':
a.cc:40:9: error: 'else' without a previous 'if'
40 | else;
| ^~~~
|
s685915773 | p03739 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int d[n];
for(int i=0;i<n;i++) {
cin >> d[i];
}
int count=0;
int sum=d[0];
int f =0;
if(d[0]>0){
f=-1;
}
if(d[0]<0){
f=1;
}
for(int i=1;i<n;i++){
sum+=d[i];
if(sum==0){
if(f==1){
count++;
f=-1;
sum=1;
... | a.cc: In function 'int main()':
a.cc:117:2: error: expected ',' or ';' before 'cout'
117 | cout << s << endl;
| ^~~~
|
s009494296 | p03739 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int d[n];
for(int i=0;i<n;i++) {
cin >> d[i];
}
int count=0;
int sum=d[0];
int f =0;
if(d[0]>0){
f=-1;
}
if(d[0]<0){
f=1;
}
for(int i=1;i<n;i++){
sum+=d[i];
if(sum==0){
if(f==1){
count++;
f=-1;
sum=1;
... | a.cc: In function 'int main()':
a.cc:63:12: error: expected primary-expression before ';' token
63 | int ssum=;
| ^
|
s914842609 | p03739 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int d[n];
for(int i=0;i<n;i++) {
cin >> d[i];
}
int count=0;
int sum=d[0];
int f =0;
if(d[0]>0){
f=-1;
}
if(d[0]<0){
f=1;
}
for(int i=1;i<n;i++){
sum+=d[i];
if(sum>0){
if(f==1){
f=-1;
continue;
}
if(f==-1){
count... | a.cc: In function 'int main()':
a.cc:48:2: error: expected '}' at end of input
48 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s341915026 | p03739 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int d[n];
for(int i=0;i<n;i++) cin >> d[i];
int count=0;
int sum=d[0];
int f =0;
if(d[0]>0){
f=-1;
}
if(d[0]<0){
f=1;
}
for(int i=1;i<n;i++){
sum+=d[i];
if(sum>0){
if(f==1){
f=-1;
continue;
}
if(f==-1){
count+=... | a.cc: In function 'int main()':
a.cc:46:2: error: expected '}' at end of input
46 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s354017414 | p03739 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int d[n];
for(int i=0;i<n;i++) cin >> d[i];
int count=0;
int sum=d[0];
int f =0;
if(d[0]>0){
f=-1;
}
if(d[0]<0){
f=1;
}
for(int i=1;i<n;i++){
sum+=d[i];
if(sum>0){
if(f==1) {
f=-1;
continue;
}
if(f==-1){
count+... | a.cc: In function 'int main()':
a.cc:45:2: error: expected '}' at end of input
45 | }
| ^
a.cc:19:21: note: to match this '{'
19 | for(int i=1;i<n;i++){
| ^
a.cc:45:2: error: expected '}' at end of input
45 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
... |
s369337435 | p03739 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
int main(){
int n;
cin >> n;
vector<int> a(n);
rep(i, n) cin >> a[i];
int sum = 0;
int sign = 1;
int cout = 0;
int ans = INT_MAX;
// if 0 +1
rep(j, 2){
... | a.cc: In function 'int main()':
a.cc:36:15: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
36 | cout << ans << endl;
| ~~~~~~~~~~~~^~~~~~~
|
s078797773 | p03739 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, c) for (int i = 0; i < (int)c; i++)
int main()
{
int n;
scanf("%d", &n);
vector<int> a(n);
rep(i, n) scanf("%d", &a[i]);
ll temp = 0;
//+-
ll pm = 0;
rep(i, n) {
temp = temp + a[i];
if(i % 2 == 0) {
if(temp <= 0) {
pm = pm + 1 - temp;
... | a.cc: In function 'int main()':
a.cc:11:9: error: 'll' was not declared in this scope
11 | ll temp = 0;
| ^~
a.cc:14:11: error: expected ';' before 'pm'
14 | ll pm = 0;
| ^~~
| ;
a.cc:16:17: error: 'temp' was not declared in this scope; did you mean 't... |
s122288353 | p03739 | C++ | #include <bits/stdc++.h>
#include <cassert>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define ok() puts(ok?"Yes":"No");
#define chmax(x,y) x = max(x,y)
#define chmin(x,y) x = min(x,y)
using namespace std;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using ii = pair<int, int>;
using vvi = v... | a.cc: In function 'int main()':
a.cc:24:18: error: invalid types 'int[int]' for array subscript
24 | rep(i,n) cin>>a[i];
| ^
a.cc:32:11: error: invalid types 'int[int]' for array subscript
32 | sum+=a[i];
| ^
a.cc:51:11: error: invalid types 'int[int]' for array subscr... |
s509467563 | p03739 | C++ | #include<bits/stdc++.h>
#define FF ios_base::sync_with_stdio(0);cin.tie(0)
#define binary(value, size) cout << bitset<size>(value) << '\n'
#define PI acos(-1.0) //3.1416(180 degree to radian)
#define PIby2 asin(1) //(3.1416/2) for angle(90 degree to radian)
#define eps 1e-67
#define pf printf
#define sf scanf
#de... | a.cc: In function 'int main()':
a.cc:68:10: error: 'n' was not declared in this scope; did you mean 'yn'?
68 | cin>>n;
| ^
| yn
|
s160324771 | p03739 | C++ | #include<bits/stdc++.h>
#define FF ios_base::sync_with_stdio(0);cin.tie(0)
#define binary(value, size) cout << bitset<size>(value) << '\n'
#define PI acos(-1.0) //3.1416(180 degree to radian)
#define PIby2 asin(1) //(3.1416/2) for angle(90 degree to radian)
#define eps 1e-67
#define pf printf
#define sf scanf
#de... | a.cc: In function 'int main()':
a.cc:402:10: error: 'n' was not declared in this scope; did you mean 'yn'?
402 | cin>>n;
| ^
| yn
|
s317901475 | p03739 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rep2(i,s,n) for(int i = (s); i < (n); ++i)
#define ll long long
#define ld long double
#define P pair<ll,ll>
#define all(v) v.begin(),v.end()
const ll mod = 1e9+7;
const ll INF = 1e18;
const double pi = acos(-1.0);
in... | a.cc: In function 'int main()':
a.cc:38:14: error: redeclaration of 'long long int sum'
38 | ll tmp=0,sum=0;
| ^~~
a.cc:21:14: note: 'long long int sum' previously declared here
21 | ll ans=0,sum=0;
| ^~~
|
s777017657 | p03739 | C++ | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define FOR(i,start,end) for(int i=start;i<=end;i++)
const int INF = 1001001001;
typedef long long ll;
const ll MOD=1000000007;
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class ... | a.cc: In function 'int main()':
a.cc:84:34: error: expected primary-expression before '+=' token
84 | if(i%2 != 0) if(nw <= 0) += 1 - nw,nw = 1;
| ^~
|
s901469137 | p03739 | C++ | #include<bits/stdc++.h>
using namespace std;
/*int check(vector<int> a){
int time = 0;
int pre_sum = a.at(0);
int n = a.size();
if(a.at(0)<0){
for(int i = 1; i<n; i++){
int sum = pre_sum + a.at(i);
if(i%2==1 && sum <= 0){
time += abs(sum-1);
sum = 1;
}else if (i%2==0 && sum >=0){
time += abs... | a.cc: In function 'int main()':
a.cc:89:48: error: expected ';' before ':' token
89 | time1 += sum1+1:
| ^
| ;
|
s724476659 | p03739 | C++ | #include <stdint.h>
#include <stdlib.h>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
using default_counter_t = int64_t;
// macro
#define let auto const&
#define overload4(a, b, c, d, name, ...) name
#define rep1(n) \
for (default_counter_t i = 0, end_i = default... | a.cc:173:21: error: stray '#' in program
173 | sum += a[i] - #include <stdint.h>
| ^
a.cc:525:2: error: stray '#' in program
525 | }#include <stdint.h>
| ^
a.cc:691:22: error: stray '#' in program
691 | int64_t k = max#include <stdint.h>
| ^
... |
s539977042 | p03739 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> a(n);
for(auto& x:a){
cin >> x;
}
int sum = 0;
int count1 = 0;
int count2 = 0;
for(int i = 0; i<n; i++){
sum += a.at(i);
if(i_sum>=0 && i%2==1){
sum -= abs(sum)+1;
count1 += abs(sum) +1;
}else if(i_sum<=0 &... | a.cc: In function 'int main()':
a.cc:18:20: error: 'i_sum' was not declared in this scope; did you mean 'sum'?
18 | if(i_sum>=0 && i%2==1){
| ^~~~~
| sum
a.cc:29:28: error: 'i_sum' was not declared in this scope; did you mean 'sum'?
29 | ... |
s758854083 | p03739 | C++ | #include <bits/stdc++.h>
using namespace std;
int keta(int num){
int ans= 0 ;
int rem;
for (int i = 4; i >= 0 ; i--){
rem = pow(10,i);
ans += (num / rem);
num = num % rem;
}
return ans;
}
int main() {
int n;
cin >> n;
vector<int64_t> ar(n);
for(int i = 0; i < n; i++){
cin >> ar... | a.cc: In function 'int main()':
a.cc:72:2: error: expected '}' at end of input
72 | }
| ^
a.cc:32:29: note: to match this '{'
32 | for(int i = 0; i < n; i++){
| ^
a.cc:72:2: error: expected '}' at end of input
72 | }
| ^
a.cc:17:12: note: to match this '{'
1... |
s428700774 | p03739 | C++ | #include <bits/stdc++/h>
using namespace std;
int change_num(int a[], int N)
int res
int sum = a[0];
for (int i = 1; i < N; i++) {
if(sum * (sum + a[i]) < 0) continue;
if(sum > 0 && sum + a[i] >= 0) {
sum += a[i];
while (sum + a[i] >= 0) {
res++;
sum--;
}
} else ... | a.cc:1:10: fatal error: bits/stdc++/h: No such file or directory
1 | #include <bits/stdc++/h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s357769784 | p03739 | C++ | #include <iostream>
#include <vector>
long body(std::vector<long>& a){
long ans = 0;
std::vector<long> s(a.size());
s.at(0) = a.at(0);
for(unsigned long i = 1; i < a.size(); i++){
s.at(i) = s.at(i-1) + a.at(i);
}
long diff = 0;
for(unsigned long i = 1; i < s.size(); i++){
... | a.cc: In function 'int main(int, char**)':
a.cc:43:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
43 | ans = body(a);
| ^~~
| abs
a.cc:49:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
49 | ans = std::min(ans_a, ans_b);
| ... |
s190238717 | p03739 | C++ | #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <clocale>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <l... | a.cc: In function 'int main()':
a.cc:102:12: error: 'LLONG_MAX' was not declared in this scope
102 | ll ans(LLONG_MAX);
| ^~~~~~~~~
a.cc:30:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
29 | #include <utility>
+++ |+#include <c... |
s546894532 | p03739 | C++ | #include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <vector>
#include <cmath>
#include <cctype>
typedef long long ll;
using namespace std;
int main() {
int N;
ll res, ans;
int count = 0;
cin >> N;
int a[N];
for (int i = 0; i < N; i++) {
cin >> a[i];... | a.cc: In function 'int main()':
a.cc:32:8: error: redeclaration of 'll sum'
32 | ll sum = 0;
| ^~~
a.cc:23:8: note: 'll sum' previously declared here
23 | ll sum = 0;
| ^~~
|
s175358535 | p03739 | C++ | #include <bits/stdc++.h>
using namespace std;
int main(){
int N;
cin>>N;
vector<int> data(N);
for(int i=0;i<N;i++)cin>>data[i];
int count=0;
int ans=data[0];
int saisyo;
for(int i=1;i<N;i++){
ans+=data[i];
if(i%2==0){
while(ans<=0){
... | a.cc: In function 'int main()':
a.cc:35:20: error: expected ';' before '}' token
35 | count++
| ^
| ;
36 | }
| ~
|
s897042179 | p03739 | C++ | // 要復習
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
int64_t main()
{
int64_t n;
cin >> n;
int64_t a[n], b[n];
for (int64_t i = 0; i < n; i++)
{
cin >> a[i];
b[i] = a[i];
}
//positive-negative-positive... case
int64_t case1, total;
if (a[0] > ... | a.cc:7:1: error: '::main' must return 'int'
7 | int64_t main()
| ^~~~~~~
|
s777315211 | p03739 | C++ | #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0;i<n;i++)
#define erep(i,n) for(int i = 0;i<=n;i++)
#define rep1(i,n) for(int i = 1;i<n;i++)
#define erep1(i,n) for(int i = 1;i<=n;i++)
typedef long long ll;
#define vint vector<int>
#define vstring vector<string>
#define vll vector<ll>
#define ... | a.cc: In function 'int main()':
a.cc:57:7: error: expected '}' before 'else'
57 | else if(nowsum >= 0) plus = true;
| ^~~~
a.cc:34:22: note: to match this '{'
34 | if(nowsum == 0){
| ^
a.cc:97:2: error: expected '}' at end of input
97 | }
| ^
a.cc:19:11... |
s436240448 | p03739 | C++ | #include <iostream>
#define rep(i, n) for(int i = 0; i < (n); i++)
using namespace std;
int main(){
int n;
cin >> n;
ll ary[n], cnt1 = 0, cnt2 = 0, sum = 0;
rep(i, n) cin >> ary[i];
// S_odd < 0, S_even > 0
rep(i, n){
sum += ary[i];
if(i % 2 && sum >= 0){
cnt1 += su... | a.cc: In function 'int main()':
a.cc:8:5: error: 'll' was not declared in this scope
8 | ll ary[n], cnt1 = 0, cnt2 = 0, sum = 0;
| ^~
a.cc:9:22: error: 'ary' was not declared in this scope
9 | rep(i, n) cin >> ary[i];
| ^~~
a.cc:13:9: error: 'sum' was not declared in... |
s956617699 | p03739 | C++ | #include <iostream>
#include <cmath>
#include <map>
#include <queue>
#include <string>
#include <string>
#include <algorithm>
using namespace std;
int ch_sign(int n){
if(n == 0)return 0;
return (n>0)-(n<0);
}
int main(){
int n; cin >> n;
int a[n]; for(int i = 0; i<n; ++i) cin >> a[i];
int sign... | a.cc: In function 'int main()':
a.cc:34:17: error: no match for 'operator>' (operand types are 'std::basic_ostream<char>' and 'int')
34 | cout << ans1>ans2 ? ans1 : ans2 << endl; return 0;
| ~~~~~~~~~~~~^~~~~
| | |
| | int
| std::basic_ostream<ch... |
s167401543 | p03739 | C++ | #include <iostream>
#include<string>
#include<vector>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#define MOD 1000000007
using namespace std;
long long int modpow(long long int a, int n) {
if (n == 0)return 1;
if (n == 1) return a;
long long int wk = modpow(a, n / 2);
long long int ret = 0;
if (n... | a.cc: In function 'int main()':
a.cc:83:29: error: 'LLONG_MAX' was not declared in this scope
83 | long long int ans = LLONG_MAX;
| ^~~~~~~~~
a.cc:7:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
6 | #includ... |
s260738613 | p03739 | C++ | #include<bits/stdc++.h>
#include<iomanip>
using namespace std;
typedef long long ll;
typedef long l;
typedef pair<int,int> P;
#define rep(i,n) for(int i=0;i<n;i++)
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
const int INF=1000000... | a.cc: In function 'int main()':
a.cc:53:9: error: 'c' was not declared in this scope
53 | cout<<c<<endl;
| ^
|
s966929287 | p03739 | C++ | . | a.cc:1:1: error: expected unqualified-id before '.' token
1 | .
| ^
|
s990198110 | p03739 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//1回の操作で、a[i]のいずれかを+1or-1できる
//以下になる最小の操作回数を求める
//全てのiに対して第一項からi項までの和Siは0でない
//SiとSi+1の符号が異なる
//予めSiを全て計算し、Si>0,Si+1>=0なら-1-Si+1だけa[i+1]から引く
//a[0] = 0 のとき、a[0]>0,a[0]<0とした時の操作回数の小さい方が答え
//a[0] != 0のとき、Si <0,Si+1<=0ならSi+c = 1を満たすcとa[i]の差をカウント
int mai... | a.cc: In function 'int main()':
a.cc:17:23: error: expected ')' before '{' token
17 | for(int i= 0;i<n;i++{
| ~ ^
| )
|
s820548398 | p03739 | C++ | #include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long ll;
typedef pair<ll,ll> P;
const ll mod=1000000007;
const ll LINF=1LL<<60;
const int IN... | a.cc: In function 'int main()':
a.cc:77:2: error: expected '}' at end of input
77 | }
| ^
a.cc:16:11: note: to match this '{'
16 | int main(){
| ^
|
s791706377 | p03739 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
long long a[n], s[n];
for (int i = 0; i < n; i++)
{
cin >> a[i];
if (i == 0)
{
s[0] = a[0];
}
else
{
s[i] = s[i - 1] + a[i];
}
}
long l... | a.cc: In function 'int main()':
a.cc:34:9: error: 'ans' was not declared in this scope; did you mean 'ans2'?
34 | ans++;
| ^~~
| ans2
a.cc:47:13: error: 'ans' was not declared in this scope; did you mean 'ans2'?
47 | ans += s[i] + cng + 1;
| ^~~
... |
s063678562 | p03739 | C++ | #include <iostream>
#include <algorithm>
#include <string>
#include <math.h>
#include <bitset>
#include <vector>
#include <queue>
#include <map>
#define i64 int64_t
#define ff(ii,nn,mm) for(int ii=nn;ii<mm;ii++)
#define sort(vvv) sort(vvv.begin(),vvv.end())
#define rvs(vvv) reverse(vvv.begin(),vvv.end())
int inf = 100... | a.cc: In function 'int main()':
a.cc:49:13: error: redeclaration of 'int64_t sum'
49 | i64 sum = data2.at(0)*-1;
| ^~~
a.cc:27:13: note: 'int64_t sum' previously declared here
27 | i64 sum = data.at(0);
| ^~~
a.cc:50:13: error: redeclaration of 'int64_t sump'
... |
s069204431 | p03739 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long // long long省略
#define pb push_back // push_back省略
#define mp make_pair // make_pair省略
#define fi first // fir... | a.cc: In function 'int main()':
a.cc:3:12: error: expected unqualified-id before 'long'
3 | #define ll long long // long long省略
| ^~~~
a.cc:92:20: note: in expansion of macro 'll'
92 | ll p1 = 1, ll m1 = 0;
| ^~
a.cc:93:9: error... |
s142292858 | p03739 | C++ | #include<bits/stdc++.h>
using namespace std;
#define ll long long // long long省略
#define pb push_back // push_back省略
#define mp make_pair // make_pair省略
#define fi first // fir... | a.cc: In function 'int main()':
a.cc:74:14: error: redeclaration of 'bool flag'
74 | bool flag = !(csum[0] > 0);
| ^~~~
a.cc:53:14: note: 'bool flag' previously declared here
53 | bool flag = (csum[0] > 0);
| ^~~~
a.cc:3:12: error: expected unqualified-id befo... |
s855274709 | p03739 | Java | import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException{
Sequence solver = new Sequence();
solver.readInput();
solver.solve();
solver.writeOutput();
}
static class Sequence {
private int n;
private int a[];
private int outp... | Main.java:51: error: incompatible types: possible lossy conversion from long to int
return count;
^
1 error
|
s885030248 | p03739 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
typedef long long ll;
const int INF = 1000000000;
const long INF64 = 1000000000000000ll;
const ll MOD = 1000000007ll;
int main(){
ll n;
std::cin >> n;
std::vec... | a.cc: In function 'int main()':
a.cc:24:34: error: no matching function for call to 'max(int, ll)'
24 | ans1+=max(0,sum+1);
| ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bit... |
s077239166 | p03739 | C++ | #include <vector>
#include <iostream>
#include <cmath>
using namespace std;
using ll = long long;
ll solve(vector<ll>& v, int first) {
ll cost = abs(first - v[0]);
ll sum = first;
for (int i = 1; i < v.size(); ++i) {
ll after = sum + v[i];
if (after * sum < 0) {
sum = after;
... | a.cc: In function 'int main()':
a.cc:31:14: error: 'LONG_MAX' was not declared in this scope
31 | ll ret = LONG_MAX;
| ^~~~~~~~
a.cc:4:1: note: 'LONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
3 | #include <cmath>
+++ |+#include <climit... |
s083378031 | p03739 | C++ | #include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll,... | a.cc: In function 'int main()':
a.cc:64:8: error: redeclaration of 'll s'
64 | ll s = a[0];
| ^
a.cc:42:8: note: 'll s' previously declared here
42 | ll s = a[0];
| ^
|
s774859255 | p03739 | C++ | #include<bits/stdc++.h>
// debug
#define d(x) cerr << #x ":" << x << endl;
#define dd(x, y) cerr << "(" #x "," #y "):(" << x << "," << y << ")" << endl;
#define ddd(x, y, z) cerr << "(" #x "," #y "," #z "):(" << x << "," << y << "," << z << ")" << endl;
#define dump(v) cerr<<#v":[ ";for (auto macro_vi:v){cerr<<macro_vi... | a.cc: In function 'int main()':
a.cc:90:2: error: expected '}' at end of input
90 | }
| ^
a.cc:23:11: note: to match this '{'
23 | int main(){
| ^
|
s949001072 | p03739 | C++ | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl
typedef long long ll;
typedef unsigned long long ull;
... | a.cc: In function 'int main()':
a.cc:33:8: error: redeclaration of 'll sum'
33 | ll sum = a[0];
| ^~~
a.cc:21:8: note: 'll sum' previously declared here
21 | ll sum = a[0];
| ^~~
|
s348960852 | p03739 | C++ | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl
typedef long long ll;
typedef unsigned long long ull;
... | a.cc: In function 'int main()':
a.cc:31:8: error: redeclaration of 'll sum'
31 | ll sum = a[0];
| ^~~
a.cc:21:8: note: 'll sum' previously declared here
21 | ll sum = a[0];
| ^~~
|
s753601847 | p03739 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n;cin>>n;
int a[n];
for (int i=0;i<n;i++)
cin>>a[i];
ll mn=1e18;
for (int i=0;i<2;i++) {
ll sm=0;
ll cnt=0;
for (int j=0;j<n;j++) {
sm+=a[j];
if ((i+j)%2==0) ... | a.cc: In function 'int main()':
a.cc:30:11: error: 'cnt' was not declared in this scope; did you mean 'int'?
30 | cout<<cnt<<endl;
| ^~~
| int
|
s964204813 | p03739 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int N;
cin >> N;
vector<long long int> A(N);
long long int s = 0LL
vector<long long int> V(N);
for(int i = 0; i < N; i++){
cin >> A[i];
s += A[i];
V[i] = s;
}
//先手が+のパターン(i % 2 == 0のとき 1)
long long int tmp1 = 0LL;
... | a.cc: In function 'int main()':
a.cc:12:3: error: expected ',' or ';' before 'vector'
12 | vector<long long int> V(N);
| ^~~~~~
a.cc:16:5: error: 'V' was not declared in this scope
16 | V[i] = s;
| ^
a.cc:23:10: error: 'V' was not declared in this scope
23 | if(V[i] > 0) continue;... |
s426214474 | p03739 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int N;
cin >> N;
vector<long long int> A(N);
long long int s = 0LL
vector<long long int> V(N);
for(int i = 0; i < N; i++){
cin >> A[i];
s += A[i];
V[i] = s;
}
//先手が+のパターン(i % 2 == 0のとき 1)
long long int tmp1 = 0LL;
... | a.cc: In function 'int main()':
a.cc:12:3: error: expected ',' or ';' before 'vector'
12 | vector<long long int> V(N);
| ^~~~~~
a.cc:16:5: error: 'V' was not declared in this scope
16 | V[i] = s;
| ^
a.cc:23:10: error: 'V' was not declared in this scope
23 | if(V[i] > 0) continue;... |
s441300226 | p03739 | C++ | #include <iostream>
using namespace std;
int main() {
int n;
long long *a
cin >> n;
a = new long long[n];
long long ans = 0;
long long sum = 0;
for (int i = 0; i < n; i++)
cin >> a[i];
int flag = -1;
if (a[0] > 0) flag = 1;
else if (a[0] == 0) flag = 0;
for (int i... | a.cc: In function 'int main()':
a.cc:8:5: error: expected initializer before 'cin'
8 | cin >> n;
| ^~~
a.cc:9:5: error: 'a' was not declared in this scope
9 | a = new long long[n];
| ^
|
s562722615 | p03739 | C++ | #include <iostream> // cin, cout, cerr, clog
#include <algorithm> // minmax, sort, swap
#include <numeric> // iota, accumulate, inner_product
#include <cstdio> // printf, scanf
#include <climits> // INT_MIN, LLONG_MIN
#include <cmath> // long, trig, pow
#include <string> // string, stoi, to_string
#include <vector> // ... | a.cc: In function 'int main()':
a.cc:43:37: error: expected primary-expression before '<' token
43 | else if(sum=<0) {
| ^
a.cc:49:32: error: expected primary-expression before '>' token
49 | if(sum=>0) {
| ... |
s695347301 | p03739 | C++ | // ABC 59 C
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; ++i)
using namespace std;
typedef long long ll;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return f... | a.cc: In function 'll foo(const std::vector<long long int>&, bool)':
a.cc:25:29: error: expected primary-expression before '>' token
25 | if (!oddPositive && a[0] => 0) {
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.