submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s540029206 | p00523 | Java | import java.io.*;
public class Main0600{
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str = br.readLine();
int N = Integer.parseInt(str);
int[] A = new int[N];
int m = 2000000000, M... | Main.java:3: error: class Main0600 is public, should be declared in a file named Main0600.java
public class Main0600{
^
1 error
|
s410659322 | p00523 | Java | import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str = br.readLine();
int N = Integer.parseInt(str);
int[] A = new int[N];
long int m = 200000000000... | Main.java:11: error: not a statement
long int m = 200000000000, M = 0;
^
Main.java:11: error: ';' expected
long int m = 200000000000, M = 0;
^
Main.java:11: error: integer number too large
long int m = 200000000000, M = 0;
^
Main.java:37: error: integer number too large
m = 2000000000... |
s562501838 | p00523 | Java | import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str = br.readLine();
int N = Integer.parseInt(str);
int[] A = new int[N];
long m = 200000000000, M ... | Main.java:11: error: integer number too large
long m = 200000000000, M = 0;
^
Main.java:37: error: integer number too large
m = 200000000000;
^
2 errors
|
s362519978 | p00523 | Java | import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str = br.readLine();
int N = Integer.parseInt(str);
int[] A = new int[N];
long m = 20000000000, M =... | Main.java:11: error: integer number too large
long m = 20000000000, M = 0;
^
Main.java:37: error: integer number too large
m = 20000000000;
^
2 errors
|
s509127515 | p00523 | Java | import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str = br.readLine();
int N = Integer.parseInt(str);
long[] A = new int[N];
long m = 1000000000000L,... | Main.java:10: error: incompatible types: int[] cannot be converted to long[]
long[] A = new int[N];
^
1 error
|
s531444976 | p00523 | Java | import java.io.*;
public class Main0600{
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str = br.readLine();
int N = Integer.parseInt(str);
int[] A = new int[N];
int m = 2000000000, M... | Main.java:3: error: class Main0600 is public, should be declared in a file named Main0600.java
public class Main0600{
^
1 error
|
s814865687 | p00523 | C++ | #include <cstdio>
#include <algorithm>
using namespace std;
#define MAX_N 100000
#define INF 100000000000000
typedef __int64 Int;
int N;
Int A[MAX_N * 2 + 1];
bool CC(int a, int b, Int x){
return A[b] - A[a] >= x;
}
bool C(Int x){
int lb, ub, left;
bool cut;
for(int i = 0; i <= N; i++){
left = i; lb = i; ub = ... | a.cc:7:9: error: '__int64' does not name a type; did you mean '__int64_t'?
7 | typedef __int64 Int;
| ^~~~~~~
| __int64_t
a.cc:9:1: error: 'Int' does not name a type; did you mean 'int'?
9 | Int A[MAX_N * 2 + 1];
| ^~~
| int
a.cc:11:23: error: 'Int' has not been declared
... |
s548639678 | p00523 | C++ | #include<iostream>
#define REP(i,n) for(int i=0;i<(int)(n);i++)
using namespace std;
typedef long long int Num;
const int NMAX = 100010;
int N;
Num A[NMAX];
Num acc[NMAX];
void accumulate() {
for (int i = 1; i <= N; i++) {
acc[i] = acc[i - 1] + A[i];
}
}
int increment(int i) {
return (i + 1) % N + 1;
}
Nu... | a.cc: In function 'Num solve()':
a.cc:33:23: error: expected initializer at end of input
33 | int left = 1, medium
| ^
a.cc:33:23: error: expected '}' at end of input
a.cc:30:13: note: to match this '{'
30 | Num solve() {
| ^
a.cc:33:23: warning: no return statement... |
s908127932 | p00523 | C++ | #include<iostream>
#include<algorithm>
#include<limits>
using namespace std;
typedef long long llong;
int N;
llong *v_list;
double tripartition;
llong BaumukuchenGetAnswer();
llong searchOne(int n0);
llong getMinV(int n0, int n1, int n2);
int findIndex(int from_n, int to_n, double target);
int main(){
/*
ifstrea... | a.cc: In function 'llong getMinV(int, int, int)':
a.cc:66:42: error: 'LLONG_MAX' was not declared in this scope
66 | if (n1 == -1 || n2 == -1) return LLONG_MAX;
| ^~~~~~~~~
a.cc:4:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by... |
s677464374 | p00523 | C++ | using System;
using System.Collections.Generic;
using System.Linq;
namespace Baumkuchen {
class Baumkuchen {
static void Main(string[] args) {
System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
//*
System.IO.StreamReader sr = new System.IO.StreamReader("input33.txt");
int N = int.... | a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
3 | using System.L... |
s928595284 | p00523 | C++ | #include <cstdio>
#include <algorithm>
using namespace std;
int main(){
int N;
scanf("%d", &N);
long long int whole = 0; //バームクーヘンの大きさ
int* A = new int[N];
for (int i = 0; i < N; i++){
scanf("%d", &A[i]);
whole += (long long int)A[i];
}
long long int one_third = whole / 3;
int ini = 0;
long long int pi... | a.cc: In function 'int main()':
a.cc:61:9: error: 'cout' was not declared in this scope
61 | cout << ans << endl;
| ^~~~
a.cc:3:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include <algorithm>
+++ |+#include <iostrea... |
s294398642 | p00523 | C++ | #include<iostream>
using namespace std;
cin.tie(0);
ios::sync_with_stdio(false);
class baumkuchen{
public:
baumkuchen();
~baumkuchen();
int N; //切れ込みの数
long long* A; //一つ一つのバウムクーヘンの大きさ
void set_value(); //値のセットをする関数
bool set; //値のセットを行ったかどうかを判別する変数
long long* memo; //バウムクーヘンの面積をメモ
void memo_all_piece(); //バ... | a.cc:3:1: error: 'cin' does not name a type
3 | cin.tie(0);
| ^~~
a.cc:4:1: error: specializing member 'std::basic_ios<char>::sync_with_stdio' requires 'template<>' syntax
4 | ios::sync_with_stdio(false);
| ^~~
|
s252967772 | p00523 | C++ | #include<iostream>#include<vector>#include<algorithm>#include<string>#define rep(i,n) for(int i=0;i<(int)(n);i++)using namespace std;int n;vector<long long > rui;bool check(int i,long long m){ vector<long long >::iterator hoge=rui.end(); hoge = lower_bound(rui.begin() + i, rui.begin() +n-1+ i, m+rui[i]-1); if ... | a.cc:1:19: warning: extra tokens at end of #include directive
1 | #include<iostream>#include<vector>#include<algorithm>#include<string>#define rep(i,n) for(int i=0;i<(int)(n);i++)using namespace std;int n;vector<long long > rui;bool check(int i,long long m){ vector<long long >::iterator hoge=rui.end(); hoge =... |
s085089403 | p00523 | C++ | #include "bits/stdc++.h"
#define int long long
using namespace std;
#define rep(i, n) for(int i = 0; i < signed(n); i++)
#define REP(i, s, n) for(int i = (s); i < signed(n); i++)
#define rrep(i, n) for(int i = signed(n) - 1; i >= 0; i--)
#define all(co) co.begin(), co.end()
typedef pair<int, int> P;
typedef long long... | a.cc: In function 'int main()':
a.cc:3:13: error: expected primary-expression before 'long'
3 | #define int long long
| ^~~~
a.cc:40:29: note: in expansion of macro 'int'
40 | int ideal = int(((double)sum / 3.0) + 0.5);
| ^~~
|
s957800339 | p00523 | C++ | #include "bits/stdc++.h"
#define int long long
using namespace std;
#define rep(i, n) for(int i = 0; i < signed(n); i++)
#define REP(i, s, n) for(int i = (s); i < signed(n); i++)
#define rrep(i, n) for(int i = signed(n) - 1; i >= 0; i--)
#define all(co) co.begin(), co.end()
typedef pair<int, int> P;
typedef long long... | a.cc:53:33: error: macro "REP" requires 3 arguments, but only 2 given
53 | REP(k, n) if (cuts[k] - cuts[j] >= rem)
| ^
a.cc:7:9: note: macro "REP" defined here
7 | #define REP(i, s, n) for(int i = (s); i < signed(n); i++)
| ^~~
a.cc: In ... |
s270890895 | p00523 | C++ | #include "bits/stdc++.h"
#define int long long
using namespace std;
#define rep(i, n) for(int i = 0; i < signed(n); i++)
#define REP(i, s, n) for(int i = (s); i < signed(n); i++)
#define rrep(i, n) for(int i = signed(n) - 1; i >= 0; i--)
#define all(co) co.begin(), co.end()
typedef pair<int, int> P;
typedef long long... | a.cc:53:33: error: macro "REP" requires 3 arguments, but only 2 given
53 | REP(k, n) if (cuts[k] - cuts[j] >= rem)
| ^
a.cc:7:9: note: macro "REP" defined here
7 | #define REP(i, s, n) for(int i = (s); i < signed(n); i++)
| ^~~
a.cc: In ... |
s834674911 | p00523 | C++ | #include<cstdio>
#include<math.h>
#include<algorithm>
const int INF=1001001001;
#define rep(i,n) for(int i=0;i<n;i++)
int N;
int A[200004];
long long int B[100002];
int main(){
FILE *fp;
fp=fopen("F:\\1JOI本選\\2014\\joi2014-ho-data\\joi2014-ho-data\\2014-ho-t3\\in\\03-06.txt","r");
fscanf(fp,"%d",&N);
long long i... | a.cc: In function 'int main()':
a.cc:22:9: error: 'memcpy' was not declared in this scope
22 | memcpy(&A[N],A,sizeof(int)*N);
| ^~~~~~
a.cc:4:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<algorithm>
+++ |+#include ... |
s078046553 | p00523 | C++ | #include <cstdio>
using namespace std;
#define MAX_N 100000
#define MAX_A 1000000000
#define INF 100000000000000
typedef __int64 Int;
int N;
Int A[MAX_N * 2 + 1];
bool C(int p, Int x){
int lb, ub, mid;
int ed = p + N;
lb = p; ub = ed;
while(ub - lb > 1){
mid = (lb + ub) / 2;
if(A[mid] - A[p] >= x) ub = mid;... | a.cc:7:9: error: '__int64' does not name a type; did you mean '__int64_t'?
7 | typedef __int64 Int;
| ^~~~~~~
| __int64_t
a.cc:9:1: error: 'Int' does not name a type; did you mean 'int'?
9 | Int A[MAX_N * 2 + 1];
| ^~~
| int
a.cc:11:15: error: 'Int' has not been declared
... |
s702336092 | p00523 | C++ | #include<iostream>
#include <algorithm>
using namespace std;
int b;
int c;
int d;
int e;
int f;
int main(){
int n;
cin>>n;
int a[2n];
int z[n]
for(int i;i<n;i++){
cin>>a[i];
c=c+a{i}
a[n+i]=a[i];}
for(int j;j<n;j++){
d=j-1;
while(b<c/3){
d++;
b=b+a[d];
}
b=b-a[d]
... | a.cc: In function 'int main()':
a.cc:13:9: error: unable to find numeric literal operator 'operator""n'
13 | int a[2n];
| ^~
a.cc:15:3: error: expected initializer before 'for'
15 | for(int i;i<n;i++){
| ^~~
a.cc:15:13: error: 'i' was not declared in this scope
15 | for(int i;i<n;i+... |
s078686116 | p00523 | C++ | #include<iostream>
#include <algorithm>
using namespace std;
int n;
int b;
int c;
int d;
int e;
int f;
int main(){
cin>>n;
int a[2n];
int z[n]
for(int i;i<n;i++){
cin>>a[i];
c=c+a{i}
a[n+i]=a[i];}
for(int j;j<n;j++){
d=j-1;
while(b<c/3){
d++;
b=b+a[d];
}
b=b-a[d]
w... | a.cc: In function 'int main()':
a.cc:12:9: error: unable to find numeric literal operator 'operator""n'
12 | int a[2n];
| ^~
a.cc:14:3: error: expected initializer before 'for'
14 | for(int i;i<n;i++){
| ^~~
a.cc:14:13: error: 'i' was not declared in this scope
14 | for(int i;i<n;i+... |
s015826576 | p00523 | C++ | #include<iostream>
#include <algorithm>
using namespace std;
int n;
int b;
int c;
int d;
int e;
int f;
int main(){
cin>>n;
int a[200000];
int z[200000];
for(int i;i<n;i++){
cin>>a[i];
c=c+a[i];
a[n+i]=a[i];}
for(int j;j<n;j++){
d=j-1;
while(b<=c/3){
d++;
b=b+a[d];
}
... | a.cc: In function 'int main()':
a.cc:36:5: error: 'j' was not declared in this scope
36 | j=0;
| ^
a.cc:56:12: error: unable to find numeric literal operator 'operator""n'
56 | sort(z,z+2n);
| ^~
a.cc:57:11: error: unable to find numeric literal operator 'operator""n'
57 | co... |
s497707080 | p00523 | C++ | #include<iostream>
#include <algorithm>
using namespace std;
int n;
int b;
int c;
int d;
int e;
int f;
int main(){
cin>>n;
int a[200000];
int z[200000];
for(int i;i<n;i++){
cin>>a[i];
c=c+a[i];
a[n+i]=a[i];}
for(int j;j<n;j++){
d=j-1;
while(b<=c/3){
d++;
b=b+a[d];
}
b=... | a.cc: In function 'int main()':
a.cc:41:7: error: 'j' was not declared in this scope
41 | d=j-1;
| ^
a.cc:56:12: error: unable to find numeric literal operator 'operator""n'
56 | sort(z,z+2n);
| ^~
a.cc:57:11: error: unable to find numeric literal operator 'operator""n'
57 | ... |
s650928139 | p00523 | C++ | #include<iostream>
#include <algorithm>
using namespace std;
int n;
int b;
int c;
int d;
int e;
int f;
int ushi;
int uma;
int j;
int main(){
cin>>n;
int a[300000];
int z[300000];
for(int i;i<n;i++){
cin>>a[i];
c=c+a[i];
a[n+i]=a[i];}
for(int j;j<n;j++){
d=j-1;
while(b<=c/3){
d++;
... | a.cc: In function 'int main()':
a.cc:61:8: error: invalid conversion from 'int*' to 'int' [-fpermissive]
61 | uma=z+2*n;
| ~^~~~
| |
| int*
a.cc:62:7: error: no matching function for call to 'sort(int [300000], int&)'
62 | sort(z,uma);
| ~~~~^~~~~~~
In file includ... |
s211327825 | p00523 | C++ | #include<iostream>
#include<stdio.h>
#include<math.h>
#include <iomanip>
using namespace std;
int main(){
double a,b,c,d,e;
int num;
cin>>num;
long int A[100001];
for (int i=0; i<num; i++) {
cin>>A[i];
}
int mi=0;
for (int i=0; i<num-2; i++) {
for (int j=i+1; j<n... | a.cc: In function 'int main()':
a.cc:36:23: error: no matching function for call to 'max(int&, const long int&)'
36 | mi=max(mi,min(aa,min(bb,cc)));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bit... |
s166416814 | p00523 | C++ | ??£??£??£??? | a.cc:1:3: error: extended character £ is not valid in an identifier
1 | ??£??£??£???
| ^
a.cc:1:6: error: extended character £ is not valid in an identifier
1 | ??£??£??£???
| ^
a.cc:1:9: error: extended character £ is not valid in an identifier
1 | ??£??£??£???
| ^
a.cc:1:1... |
s635163939 | p00523 | C++ | #include<bits/stdc++.h>
using namespace std;
template <typename T>
T binary_search(function<bool(T)> func, T include, T exclude)
{
while (abs(exclude - include) > 1)
{
auto middle = (include + exclude) / 2;
(func(middle) ? include : exclude) = middle;
}
return include;
} | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s048473626 | p00523 | C++ | #include <vector>
using namespace std;
int main(){
long long num_cut = 0;
long long sum = 0L;
long long oneThird = 0L;
int cuts[100000];
long long min_piece=0L;
int a=0;
long long restCake=0L;
cin >> num_cut;
for(int i = 0; i < num_cut; i++){
cin >> a;
sum += a;
cuts[i] = a;
}
oneThird = (sum ... | a.cc: In function 'int main()':
a.cc:15:9: error: 'cin' was not declared in this scope
15 | cin >> num_cut;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include <vector>
+++ |+#include <iostream>
2 | ... |
s390560518 | p00523 | C++ | s | a.cc:1:1: error: 's' does not name a type
1 | s
| ^
|
s803260149 | p00523 | C++ | #include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (int)(k); i < (int)(n); i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) a.begin(), a.end()
#define MS(m,v) memset(m,v,sizeof(m))
typedef long long ll;
typedef long double ld;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef pair<int, ... | a.cc: In function 'int main()':
a.cc:78:9: error: jump to label 'end'
78 | end:;
| ^~~
a.cc:46:42: note: from here
46 | if (p == n) goto end;
| ^~~
a.cc:49:20: note: crosses initialization of 'll tmpc'
49 | ... |
s248084952 | p00523 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<functional>
#include<map>
#define int long long
using namespace std;
int a[200000];
signed main() {
int b;
cin >> b;
int c = 0;
for (int d = 0; d < b ; d++) {
int e; scanf("%lld", &e);... | a.cc: In function 'int main()':
a.cc:26:19: error: 'LLONG_MAX' was not declared in this scope
26 | int MIN = LLONG_MAX / 3;
| ^~~~~~~~~
a.cc:10:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
9 | #include<map>
+++ |+... |
s007502394 | p00523 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int n;
long long sum[110000];
bool Func(long long key){
for(int i=1;i<n;i++){
int f=lower_bound(sum+i,sum+n+1,key+sum[i-1]);
int g=lower_bound(f,sum+n+1,key+*f);
if(*g&&*g+key-sum[i-1]<=sum[n]){
return true;
}
}
return false;
}
int main(){
... | a.cc: In function 'bool Func(long long int)':
a.cc:12:34: error: invalid conversion from 'long long int*' to 'int' [-fpermissive]
12 | int f=lower_bound(sum+i,sum+n+1,key+sum[i-1]);
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
... |
s172702610 | p00523 | C++ | #include<bits/stdc++.h>
#define N 100005
using namespace std;
typedef long long ll;
ll n,sum,a[N],A[2*N];
ll bynary_search(){
}
void solve(){
ll ans=0;
for(int cut1=0;cut1<n;cut1++){
ll cut2=;
}
}
int main(){
cin>>n;
for(int i=0;i<n;i++)cin>>a[i];
A[0]=a[0];
for(int i=1;i<2*n;i++)A[i]=a... | a.cc: In function 'll bynary_search()':
a.cc:9:1: warning: no return statement in function returning non-void [-Wreturn-type]
9 | }
| ^
a.cc: In function 'void solve()':
a.cc:15:13: error: expected primary-expression before ';' token
15 | ll cut2=;
| ^
|
s001424779 | p00523 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
long InArray[100000] = {0};
int N = 0;
long sumArray(int, int);
long getLocalMin(int, int, int);
int main()
{
// initialize input
if(1){
FILE *inputFile = fopen("0600_in33.txt", "r");
fscanf(inputFile, "%d", &N);
for(int i = 0; i < N; i++){
fscanf... | a.cc: In function 'int main()':
a.cc:39:25: error: 'a3' was not declared in this scope; did you mean 'a1'?
39 | for(int a1 = 0; a3 < N-1; a1++){
| ^~
| a1
|
s907615874 | p00523 | C++ | #include <iostream>
#include <cstdio>
using namespace std;
long InArray[100000] = {0};
int N = 0;
long sumArray(int, int);
long getLocalMin(int, int, int);
int main()
{
// initialize input
if(0){
FILE *inputFile = fopen("0600_in33.txt", "r");
fscanf(inputFile, "%d", &N);
for(int i = 0; i < N; i++){
fscanf... | a.cc: In function 'int main()':
a.cc:39:25: error: 'a3' was not declared in this scope; did you mean 'a1'?
39 | for(int a1 = 0; a3 < N-1; a1++){
| ^~
| a1
|
s467952499 | p00523 | C++ | /* 2017/09/17
data will be seperated to 3 groups, a b c
the bigest(a) should >= sum / 3
then the second should >= (sum - a) / 3
loop to find the just data that comply with the previous conditions
*/
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
// end link to head
int InArray[200000] = {0};... | a.cc: In function 'int main()':
a.cc:27:21: error: 'start' was not declared in this scope
27 | for(int i = start; i < end; i++){
| ^~~~~
a.cc:27:30: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<'
27 | for(int i = s... |
s329283722 | p00523 | C++ | /* 2017/09/17
data will be seperated to 3 groups, a b c
the bigest(a) should >= sum / 3
then the second should >= (sum - a) / 3
loop to find the just data that comply with the previous conditions
*/
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
// end link to head
int InArray[200000] = {0};... | a.cc: In function 'int main()':
a.cc:74:2: error: expected '}' at end of input
74 | }
| ^
a.cc:12:1: note: to match this '{'
12 | {
| ^
|
s638195417 | p00523 | C++ | #include <stdio.h>
int main()
{
int InArray[200000] = {0}; // end is linked to start (Baumkuchen is round)
int N; // total data input
int i; // for counter
int inputBuffer; // buffer for input data
int a1, a2, a3; // the start index of each region
long long sum; // buffer for sum
long lo... | a.cc: In function 'int main()':
a.cc:66:2: error: expected '}' at end of input
66 | }
| ^
a.cc:4:1: note: to match this '{'
4 | {
| ^
|
s501827279 | p00523 | C++ | #include <cstdio>
#include <iostream>
int main()
{
int InArray[200000] = {0}; // end is linked to start (Baumkuchen is round)
int N; // total data input
int i; // for counter
int inputBuffer; // buffer for input data
int a1, a2, a3; // the start index of each region
long long sum; // buff... | a.cc: In function 'int main()':
a.cc:18:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
18 | cin >> inputBuffer;
| ^~~
| std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
6... |
s301828130 | p00523 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int N;
bool func(long long mid, vector<long long>&line) {
int lp = 0, hp = 1;
while (true) {
if (line[hp] - line[lp] >= mid) {/*
int fp = hp + 1;
int bp = lp + N;
while (fp < bp) {
int mp = (fp + bp) >> 1;
if (line[mp] - l... | a.cc: In function 'int main()':
a.cc:50:32: error: 'INT64_MAX' was not declared in this scope
50 | long long lp = 0, hp = INT64_MAX;
| ^~~~~~~~~
a.cc:4:1: note: 'INT64_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
3 | #... |
s530330465 | p00523 | C++ | import java.io.*;
public class Main{
public static void main(String[] args){
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = BufferedReader(is);
String str = br.readLine();
int kosuu = Integer.perseInt(str);
int[] A = new int[kosuu];//配列の宣言の仕方自信なし
int m = 2000000000, M = 0;... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main{
| ^~~~~~
|
s041844880 | p00523 | C++ | import java.io.*;
public class Main{
public static void main(String[] args){
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = BufferedReader(is);
String str = br.readLine();
int kosuu = Integer.perseInt(str);
int[] A = new int[kosuu];//配列の宣言の仕方自信なし
int m = 2000000000, M = 0;... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main{
| ^~~~~~
|
s240175574 | p00523 | C++ | import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str = br.readLine();
int N = Integer.parseInt(str);
int[] A = new int[N];
int m = 2000000000, M = 0... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main{
| ^~~~~~
|
s365018277 | p00523 | C++ | import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str = br.readLine();
int N = Integer.parseInt(str);
int[] A = new int[N];
long m = 200000000000, M ... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main{
| ^~~~~~
|
s651318847 | p00523 | C++ | import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str = br.readLine();
int N = Integer.parseInt(str);
int[] A = new int[N];
long m = 20000000000, M =... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main{
| ^~~~~~
|
s299945851 | p00523 | C++ | import java.io.*;
public class Main{
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str = br.readLine();
int N = Integer.parseInt(str);
long[] A = new long[N];
long m = 1000000000000L... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main{
| ^~~~~~
|
s061032101 | p00524 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.uti... | Main.java:61: error: non-static variable this cannot be referenced from a static context
for(int i=0;i<N;i++) list[i]=new MyArrayList();
^
1 error
|
s503653391 | p00524 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.uti... | Main.java:73: error: cannot find symbol
nh=H[N-1];
^
symbol: variable nh
location: class Main
Main.java:74: error: cannot find symbol
nv=N-1;
^
symbol: variable nv
location: class Main
Main.java:76: error: cannot find symbol
while(nv!=0){
^
symbol: variable nv
location: class Main
Main.java:77: ... |
s389999925 | p00524 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.uti... | Main.java:77: error: incompatible types: possible lossy conversion from long to int
int d=dist[nv]-dist[prev[nv]];
^
Main.java:87: error: cannot find symbol
out.printn(ans);
^
symbol: method printn(long)
location: variable out of type PrintWriter
2 errors
|
s203420650 | p00524 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.uti... | Main.java:66: error: incompatible types: possible lossy conversion from long to int
int T=ir.nextLong();
^
1 error
|
s427584018 | p00524 | Java | import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.uti... | Main.java:67: error: incompatible types: possible lossy conversion from long to int
if(H[A]>=T) list[A].add(new Edge(B,T));
^
Main.java:68: error: incompatible types: possible lossy conversion from long to int
if(H[B]>=T) list[B].add(new Edge(A,T));
... |
s021588533 | p00524 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:102: error: ';' expected
pque.offerLast(new int[]{d[to],to,nh})
^
1 error
|
s339016594 | p00524 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:100: error: cannot find symbol
if(d[to]>d[v]+re){
^
symbol: variable d
location: class G
Main.java:100: error: cannot find symbol
if(d[to]>d[v]+re){
^
symbol: variable d
location: class G
Main.java:101: error: cannot find symbol
d[to]=d[v]+re;
^
symbol: va... |
s523691763 | p00524 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:102: error: cannot find symbol
pque.offerLast(new int[]{dist[to],to,nh});
^
symbol: method offerLast(int[])
location: variable pque of type PriorityQueue<int[]>
1 error
|
s121095985 | p00524 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class Main{
static PrintWriter out... | Main.java:107: error: incompatible types: long[] cannot be converted to int[]
return dist;
^
1 error
|
s322487409 | p00524 | C++ | #include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include <queue>
#include <tuple>
#include <utility>
using namespace std;
using int64 = long long int;
const int64 INF = 1LL << 60;
int64 N, M, X, H[100010];
vector< pair<int64, int64> > G[100010];
int64 dist[100010][2];
struct Elem {
int... | a.cc:82:2: error: #error "uku"
82 | #error "uku"
| ^~~~~
|
s871266637 | p00524 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<cstdio>
#include<map>
#include<algorithm>
using namespace std;
#define INF 10000000
struct Tree{
int E;
int Time;
bool used;
};
int N,M,X;
int H[100001];
int dis[100001];
int from,to,time;
vector<Tree> t[100001];
Tree tree1,tree2;
bool used[1000... | a.cc:20:21: error: 'int time' redeclared as different kind of entity
20 | int from,to,time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/... |
s242310580 | p00524 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
struct EDGE {
int to;
LL time;
bool operator < (const EDGE &t) const {
return time > t.time;
}
};
const LL INF = 1LL << 60;
int n, m; LL x;
LL h[100000];
vector<EDGE> g[100000];
LL d[100000];
LL search(LL x)
{
for (int i = 0; i < n; i++) d[i] =... | a.cc: In function 'LL search(LL)':
a.cc:34:47: error: expected primary-expression before ')' token
34 | que.push((EDGE){ee.to, e.time + ee.time + /*diff*/});
| ^
|
s990676527 | p00524 | C++ | #include<cstdio>
#include<math.h>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define mp make_pair
const int INF=1001001001;
int N,M,X;
int H[100002];
vector< pair<int,long long int> > graph[100002];
long long int memo[100002];//djkstraメモ
int main()... | a.cc:30:39: error: extended character is not valid in an identifier
30 | queue< pair<int,long long int> > q1;//木の番号、到達コスト.木の上での位置はX-コストか0
| ^
a.cc:36:23: error: extended character is not valid in an identifier
36 | queue< pair<int,long long i... |
s039407187 | p00524 | C++ | #include <cstdio>
#include <vector>
using namespace std;
#define long long Int
typedef pair<Int, int> p;
typedef pair<int, int> pp;
int main(){
const int MAX_N = 100000;
int N, M, X, H[MAX_N + 1];
int u, v, c;
p d[MAX_N + 1];
vector<pp> V[MAX_N + 1];
bool updated;
int to, cost, height;
scanf("%d%d%d", &N, &... | a.cc:6:14: error: 'Int' was not declared in this scope; did you mean 'int'?
6 | typedef pair<Int, int> p;
| ^~~
| int
a.cc:6:22: error: template argument 1 is invalid
6 | typedef pair<Int, int> p;
| ^
a.cc: In function 'int main()':
a.cc:30:22: er... |
s643339462 | p00524 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define len(a) sizeof(a)
#... | a.cc: In function 'void solve()':
a.cc:29:2: error: 'dijkstra' was not declared in this scope
29 | dijkstra(0);
| ^~~~~~~~
a.cc: In function 'void dijkstra(int)':
a.cc:38:17: error: 'ti' was not declared in this scope; did you mean 'tm'?
38 | priority_queue<ti,vector<ti>,greater<ti>> que;
| ... |
s152614058 | p00524 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define len(a) sizeof(a)
#... | a.cc: In function 'void solve()':
a.cc:29:2: error: 'dijkstra' was not declared in this scope
29 | dijkstra(0);
| ^~~~~~~~
|
s846847076 | p00524 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define len(a) sizeof(a)
#... | a.cc: In function 'void solve()':
a.cc:29:2: error: 'dijkstra' was not declared in this scope
29 | dijkstra(0);
| ^~~~~~~~
|
s645823316 | p00524 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, int> pl;
typedef pair<ll, pl> pll;
#define fir first
#define sec second.first;
#define thr second.second;
#define INF (1ll << 60)
int n,m;
ll h[100800],dist[100800],ah[100800];
vector<pl> g[100800];
void dijkstra(ll height){
int i... | a.cc: In function 'void dijkstra(ll)':
a.cc:26:17: error: 'x' was not declared in this scope
26 | ah[i] = x;
| ^
|
s241711838 | p00524 | C++ | #include <iostream>
using namespace std;
int main() {
int n,m,mn=0,a[300001],b[300001];
int ain,binp;
long long int h[100001],t[300001],mt[100001],mh[100001],tin,x,t2,h2;
bool check_tree[100001];
cin >> n >> m >> x;
for(int i=1;i<=n;i++){
cin >> h[i];
mt[i]=-1;
check_tree[i]=false;
}
for(int i=1;i<=m;i++... | a.cc: In function 'int main()':
a.cc:52:91: error: invalid operands of types 'long long int' and 'const char [1]' to binary 'operator*'
52 | if(mt[b[j]]==-1 || mt[b[j]]-mh[b[j]]>t2-h2*"" || (mt[b[j]]-mh[b[j]]*2==t2-h2 && mh[b[j]]<h2)){
| ... |
s299610559 | p00524 | C++ | #include <iostream>
using namespace std;
int main() {
int n,m,mm=0,b[600001],first_a[100001],last_a[100001],next_a[600001],a_in,b_in;
long long int x,h[100001],tt[600001],mh[100001],mt[100001],t2,h2,t_in;
bool check_a[100001],f=true;
cin >> n >> m >> x;
for(int i=1;i<=n;i++){
cin >> h[i];
first_a[i]=-1;
las... | a.cc: In function 'int main()':
a.cc:53:58: error: 't' was not declared in this scope
53 | if(mh[i]>h[b[j]]+t[j]){
| ^
|
s392903290 | p00524 | C++ | #include<iostream>
#include<queue>
#include<algorithm>
#include<string>
#include<vector>
#include<cstdio>
using namespace std;
#define N 100000
#define M 300000
#define HT 1000000000
#define INF 2e18
#define int long long
#define MP(i, j) make_pair((i), (j))
typedef pair<int, int> P;
int n, m, x, ans = INF, tree[N + 1]... | a.cc:18:16: error: 'S' was not declared in this scope
18 | priority_queue<S> pq;
| ^
a.cc:18:17: error: template argument 1 is invalid
18 | priority_queue<S> pq;
| ^
a.cc:18:17: error: template argument 2 is invalid
a.cc:18:17: error: template argument 3 is invalid
a.cc:... |
s033668292 | p00524 | C++ | #include<bits/stdc++.h>
#define int long long
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef pair<int, int>P;
typedef long long ll;
struct st { int p, h; ll c; };
bool operator<(st a, st b) { return a.c > b.c; }
int h[100000], cnt[100000], s[100000];
unordered_map<int, ll>d[100000];
vector<P>E[10... | cc1plus: error: '::main' must return 'int'
|
s514890708 | p00524 | C++ | #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef pair<int, int>P;
typedef long long ll;
struct st { int p, h; ll c; };
bool operator<(st a, st b) { return a.c > b.c; }
int h[100000], s[100000];
ll d[100000][1000];
vector<P>E[100000];
int main() {
int n, m, x; scanf("%d%d%d"... | a.cc: In function 'int main()':
a.cc:41:34: error: request for member 'second' in 'p', which is of non-class type 'long long int'
41 | Min = min(Min, p.second + h[n - 1] - p.first);
| ^~~~~~
a.cc:41:56: error: request for member 'first' in 'p', which is of non-c... |
s850583485 | p00524 | C++ | #include <iostream>
#include <vector>
#include <queue>
#define INF 1e+18
#define int long long
using namespace std;
struct edge{ int to,cost; };
typedef pair<int,int> P;
signed main(){
int n,m,x,h[100000];
int d[100000];
vector<edge> G[100000];
cin >> n >> m >> x;
for(int i = 0;i < n;i++) {
cin >> h[i];
d[i]... | a.cc: In function 'int main()':
a.cc:61:47: error: no matching function for call to 'max(int, long long int)'
61 | else cout << d[n - 1] + h[n - 1] - max(0,x - d[n - 1]) << endl;
| ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
... |
s457171080 | p00524 | C++ | #include <stdio.h>
#include <vector>
#include <utility>
#include <queue>
#include <bitset>
using namespace std;
typedef pair<int,long long int> pi;
typedef pair<long long int,pi> plpi;
#define F first
#define S second
#define PB push_back
const int N=1e5+10;
const long long int INF=1LL<<60;
int main(){
int n,m,l,r;... | a.cc: In function 'int main()':
a.cc:52:40: error: expected primary-expression before '{' token
52 | for(pi i:graph[nxt.S.F])if({
| ^
a.cc:52:40: error: expected ')' before '{' token
52 | for(pi i:graph[nxt.S.F])if({
| ... |
s926830248 | p00524 | C++ | #include <stdio.h>
#include <vector>
#include <utility>
#include <queue>
#include <bitset>
using namespace std;
typedef pair<int,long long int> pi;
typedef pair<long long int,pi> plpi;
#define F first
#define S second
#define PB push_back
const int N=1e5+10;
const long long int INF=1LL<<60;
int main(){
int n,m,l,r;... | a.cc:74:5: error: expected unqualified-id before 'if'
74 | if(ans==INF)printf("-1\n");
| ^~
a.cc:75:5: error: expected unqualified-id before 'else'
75 | else printf("%lld\n",ans);
| ^~~~
a.cc:76:1: error: expected declaration before '}' token
76 | }
| ^
|
s226976536 | p00524 | C++ | #include <stdio.h>
#include <vector>
#include <utility>
#include <queue>
#include <bitset>
using namespace std;
typedef pair<int,long long int> pi;
typedef pair<long long int,pi> plpi;
#define F first
#define S second
#define PB push_back
const int N=1e5+10;
const long long int INF=1LL<<60;
int main(){
int n,m,l,r;... | a.cc: In function 'int main()':
a.cc:53:40: error: expected primary-expression before '{' token
53 | for(pi i:graph[nxt.S.F])if({
| ^
a.cc:53:40: error: expected ')' before '{' token
53 | for(pi i:graph[nxt.S.F])if({
| ... |
s825056959 | p00525 | C++ | #pragma comment(linker, "/STACK:36777216")
//#pragma GCC optimize ("O2")
#define LOCAL
//#include "testlib.h"
#include <functional>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <numeric>
#include <cstring>
#include <climits>
#include <cassert>
#include <comp... | a.cc:399:22: error: 'int y1 [100020]' redeclared as different kind of entity
399 | int x1[MAXN], y1[MAXN], x2[MAXN], y2[MAXN];
| ^
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/i... |
s500505044 | p00525 | C++ | #pragma comment(linker, "/STACK:36777216")
//#pragma GCC optimize ("O2")
#define LOCAL
//#include "testlib.h"
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<set>
#include<vector>
//#include <tr1/unordered_set>
//#include <tr1/unordered_map>
//#include <array>
using namespace std;
#define REP(i, n)... | a.cc:187:15: error: 'acos' was not declared in this scope
187 | const DB PI = acos(-1.0); //M_PI;
| ^~~~
a.cc: In function 'DB cot(DB)':
a.cc:214:31: error: 'tan' was not declared in this scope
214 | inline DB cot(DB x){return 1./tan(x);};
| ^~~
a.cc: In funct... |
s840620400 | p00525 | C++ | #pragma comment(linker, "/STACK:36777216")
//#pragma GCC optimize ("O2")
#define LOCAL
//#include "testlib.h"
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<set>
#include<vector>
//#include <tr1/unordered_set>
//#include <tr1/unordered_map>
//#include <array>
using namespace std;
#define REP(i, n)... | a.cc:187:15: error: 'acos' was not declared in this scope
187 | const DB PI = acos(-1.0); //M_PI;
| ^~~~
a.cc: In function 'DB cot(DB)':
a.cc:214:31: error: 'tan' was not declared in this scope
214 | inline DB cot(DB x){return 1./tan(x);};
| ^~~
a.cc: In funct... |
s130808646 | p00525 | C++ | #pragma comment(linker, "/STACK:36777216")
//#pragma GCC optimize ("O2")
#define LOCAL
//#include "testlib.h"
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<set>
#include<vector>
#include<cmath>
//#include <tr1/unordered_set>
//#include <tr1/unordered_map>
//#include <array>
using namespace std;
#d... | a.cc:367:22: error: 'int y1 [100020]' redeclared as different kind of entity
367 | int x1[MAXN], y1[MAXN], x2[MAXN], y2[MAXN];
| ^
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/i... |
s067371496 | p00525 | C++ | #pragma comment(linker, "/STACK:36777216")
//#pragma GCC optimize ("O2")
#define LOCAL
//#include "testlib.h"
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<set>
#include<vector>
//#include <tr1/unordered_set>
//#include <tr1/unordered_map>
//#include <array>
using namespace std;
#define REP(i, n) ... | a.cc:186:15: error: 'acos' was not declared in this scope
186 | const DB PI = acos(-1.0); //M_PI;
| ^~~~
a.cc:360:15: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch]
360 | int x1[MAXN], y1[MAXN], x2[MAXN], y2[MAXN];
| ^~
|
s457388517 | p00525 | C++ | #include <windows.h>
int WorkSize(void) {
typedef struct {
DWORD cb;
DWORD PageFaultCount;
SIZE_T PeakWorkingSetSize;
SIZE_T WorkingSetSize;
SIZE_T QuotaPeakPagedPoolUsage;
SIZE_T QuotaPagedPoolUsage;
SIZE_T QuotaPeakNonPagedPoolUsage;
SIZE_T QuotaNo... | a.cc:1:10: fatal error: windows.h: No such file or directory
1 | #include <windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s591383143 | p00525 | C++ | #include <bits/stdc++.h>
using namespace std;
struct Line {
int x1, y1, x2, y2;
Line (int x1, int y1, int x2, int y2) :
x1(x1), y1(y1), x2(x2), y2(y2) {}
};
struct Query {
int l, r, id;
Query (int l, int r, int id) :
l(l), r(r), id(id) {}
void dbg() {
cout << "Query " << ... | a.cc: In function 'void add(int, int)':
a.cc:53:9: error: reference to 'visit' is ambiguous
53 | if (visit[x]) return; visit[x] = 1;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
from a.cc:1:
/usr/include/c++/14/variant:1855:5: note: candidate... |
s284336431 | p00525 | C++ | #include <bits/stdc++.h>
using namespace std;
struct Line {
int x1, y1, x2, y2;
Line (int x1, int y1, int x2, int y2) :
x1(x1), y1(y1), x2(x2), y2(y2) {}
};
struct Query {
int l, r, id;
Query (int l, int r, int id) :
l(l), r(r), id(id) {}
void dbg() {
cout << "Query " << ... | a.cc: In function 'void add(int, int)':
a.cc:52:9: error: reference to 'visit' is ambiguous
52 | if (visit[x]) return; visit[x] = 1;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
from a.cc:1:
/usr/include/c++/14/variant:1855:5: note: candidate... |
s946342147 | p00526 | C++ | #include<iostream>
#define MAX_N 100000
int N;
int a[MAX_N]; //??¶???
int p[MAX_N]; //?????????, a[i] = a[i + 1]??????i???????´?
int p_tail; //p????????????????´?
int main()
{
scanf("%d", &N);
p[0] = -1;
p_tail = 0;
for (int i = 0; i < N; i++) {
scanf("%d", &a[i]);
if(i > 0 && a[i] == a[i - 1]) {
... | a.cc: In function 'int main()':
a.cc:17:9: error: 'tail' was not declared in this scope; did you mean 'p_tail'?
17 | p[tail + 1] = i - 1;
| ^~~~
| p_tail
|
s074090576 | p00526 | C++ | #include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <utility>
#include <functional>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <deque>
#include <ctime>
using nam... | a.cc: In function 'int main()':
a.cc:57:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
57 | if(t.size()==1) ans = n;
| ^~~
| abs
|
s145561649 | p00526 | C++ | //============================================================================
// Name : AOJ.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostr... | a.cc: In function 'int main()':
a.cc:16:12: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
16 | cin>N;
| ~~~^~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:16:12: not... |
s725730202 | p00526 | C++ | //============================================================================
// Name : AOJ.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostr... | a.cc: In function 'int main()':
a.cc:16:12: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
16 | cin>N;
| ~~~^~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:16:12: not... |
s781845444 | p00527 | C++ | #include<iostream>
#include<cstdio>
#include<math.h>
#include<algorithm>
using namespace std;
int N,M;
char S[2001],T[2001];
int dp[2000][2000][2];
int main() {
cin >> N >> M;
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
dp[i][j][1] = -INT_MAX;
dp[i][j][0] = 0;
}
}
scanf("%s", S + 1);
... | a.cc: In function 'int main()':
a.cc:14:40: error: 'INT_MAX' was not declared in this scope
14 | dp[i][j][1] = -INT_MAX;
| ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
... |
s522032311 | p00527 | C++ | #include<iostream>
#include<cstdio>
#include<math.h>
#include<algorithm>
using namespace std;
int N,M;
char S[2001],T[2001];
int dp[2000][2000][2];
int main() {
cin >> N >> M;
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
dp[i][j][1] = -INT_MAX;
dp[i][j][0] = 0;
}
}
scanf("%s", S + 1);
... | a.cc: In function 'int main()':
a.cc:14:40: error: 'INT_MAX' was not declared in this scope
14 | dp[i][j][1] = -INT_MAX;
| ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
... |
s522317126 | p00527 | C++ | #include<iostream>
#include<algorithm>
using namespace std;
int s[2000];
int t[2000];
int main(){
char hoge;
int m,n;
cin>>m>>n;
for(int i=0;i<m;i++){
cin>>hoge;
if(hoge=='I'){s[i]=1;}
else{s[i]=0;}
}
for(int i=0;i<n;i++){
cin>>hoge;
if(hoge=='I'){t[i]=1;}
else{t[i]=0;}
}
int ans=0;
for(int i=... | a.cc: In function 'int main()':
a.cc:43:64: error: 'si' was not declared in this scope; did you mean 'ci'?
43 | else if(s[ci]==0 and t[si]==0){loop = false;}
| ^~
| ... |
s370963346 | p00527 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define len(a) sizeof(a)
#... | a.cc: In function 'void solve()':
a.cc:42:12: error: 'o' was not declared in this scope
42 | if((n+m-o-d)&1) ma=max(ma,dp[i][j]);
| ^
a.cc:42:14: error: 'd' was not declared in this scope
42 | if((n+m-o-d)&1) ma=max(ma,dp[i][j]);
| ^
|
s797696922 | p00527 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define len(a) sizeof(a)
#... | a.cc: In function 'void solve()':
a.cc:41:14: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
41 | else cout<<0<<end;
| ~~~~~~~^~~~~
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14... |
s491230082 | p00527 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define len(a) sizeof(a)
#... | a.cc: In function 'void solve()':
a.cc:44:2: error: 'else' without a previous 'if'
44 | else cout<<p<<endl;
| ^~~~
|
s658834579 | p00527 | C++ | #include <bits/stdc++.h>
#define FOR(i,n) for(int i=0;i<(int)(n);i++)
#define FORR(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define pb(a) push_back(a)
#define mp(x,y) make_pair(x,y)
#define ALL(a) a.begin(),a.end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#define len(a) sizeof(a)
#... | a.cc: In function 'int dfs(int, int, int)':
a.cc:30:23: error: no matching function for call to 'max(int)'
30 | if(o<n) ma=max(ma,max(dfs(o+1,d,odd));
| ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bit... |
s809477572 | p00527 | C++ |
#include <stdio.h>
#include <algorithm>
using namespace std;
char s[2001], t[2001];
int dp[2001][2001][2];
int m, n;
int main()
{
scanf("%d %d", &m, &n);
scanf("%s", s); scanf("%s", t);
int ans = 0;
memset(dp, 0, sizeof(dp));
for (int i = m; i >= 0; --i)
{
for (int j = n; j >= 0; --j)
{
dp[i][j][0] = ... | a.cc: In function 'int main()':
a.cc:17:9: error: 'memset' was not declared in this scope
17 | memset(dp, 0, sizeof(dp));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <algorithm>
+++ |+#include <cs... |
s902376812 | p00527 | C++ | #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define INF (1<<29)
char s[2001], t[2001];
int n, m;
int dp[2001][2001][2];
int dfs(int is, int it, bool I) {
if (dp[is][it][I] != INF) return dp[is][it][I];
in... | a.cc: In function 'int main()':
a.cc:35:39: error: 'a' was not declared in this scope
35 | fill(dp[0][0], dp[m][0], INF);a
| ^
a.cc:40:35: error: 'ans' was not declared in this scope; did you mean 'abs'?
40 | if (res % 2 == 1) ans = max(ans, res)... |
s567011718 | p00527 | C++ | #include <iostream>
#include <algorithm>
constexpr int MAX=2001;
int n,m;
int dp[MAX][MAX][2];
bool S[MAX],T[MAX];
int main() {
std::cin>>n>>m;
char ch;
for(int i=1;i<=n;++i){
std::cin>>ch;
if(ch=='I')
S[i]=1;
}
for(int j=1;j<=m;++j){
std::cin>>ch;
if(ch=='I')
T[i]=1;
}
for(int i=1;i<=n;++i){... | a.cc: In function 'int main()':
a.cc:23:27: error: 'i' was not declared in this scope
23 | T[i]=1;
| ^
|
s151511388 | p00527 | C++ |
#include <iomanip>
#include <utility>
#include <algorithm>
#include <type_traits>
#include <set>
#include <string>
#include <iostream>
#include <fstream>
#include <cassert>
#include <memory>
#include <unordered_set>
#include <unordered_map>
#include <map>
#include <queue>
#include <vector>
#include <array>
#include <c... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s022023211 | p00527 | C++ | #include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
template<typename T>bool maxup(T& a, const T&& b) { if (a < b) { a = b; return true; }; }
int dp[2005][2005][2];
int main() {
int m, n; cin >> m >> n;
vector<int> s(m + 1);
s[m] = 0;
rep(i, m) {
char c; cin >> c;
s[i] =... | a.cc: In function 'int main()':
a.cc:30:42: error: cannot bind rvalue reference of type 'const int&&' to lvalue of type 'int'
30 | maxup(ans, dp[i + 1][j][1]);
| ~~~~~~~~~~~~~~^
a.cc:4:48: note: initializing argument 2 of 'bool maxup(T&, const T&&) [with T = int]'
... |
s581016554 | p00527 | C++ | #include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<functional>
#include<algorithm>
#include<cstdio>
using namespace std;
typedef long long ll;
ll n,m;
bool a[2000],b[2000];
ll dp[2000][2000][2];
map<bool, int>o;
ll s... | a.cc: In function 'll solve(ll, ll, bool)':
a.cc:26:17: error: 'l' was not declared in this scope
26 | l=true;
| ^
|
s840730863 | p00528 | C++ | #include<cstdio>
#include<algorithm>
#include<vector>
#include<queue>
#include<cmath>
#include<string.h>
using namespace std;
#define F first
#define S second
#define INF 0x7f7f7f7f
typedef long long LL;
typedef pair<LL, LL> P;
struct edge { LL to, cost,sw; };
vector<edge> g[200001];
LL d[200001][2];
bool flag[200001... | a.cc: In function 'int main()':
a.cc:62:27: error: cannot convert 'std::priority_queue<int, std::vector<int>, std::greater<int> >::top' from type 'const __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type& (std::priority_queue<int, std::vector<int>, std::greater<int> >::)() const' {aka 'const int& (std::pri... |
s758184423 | p00528 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s648478300 | p00528 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long int64;
typedef pair< int64, int > Pi;
const int64 INF = 1LL << 60;
struct edge {
int to, cost;
};
vector< edge > graph[400004];
int64 min_cost[400004];
int H, W, K;
vector< Pi > X[100001], Y[100001];
int64 Dijkstra()
{
fill_n(min_cost, 400004, INF);
... | a.cc: In function 'int64 Dijkstra()':
a.cc:25:13: error: 'e' does not name a type
25 | const e = graph[p.second][i];
| ^
a.cc:26:30: error: 'e' was not declared in this scope
26 | int64 next = p.first + e.cost;
| ^
a.cc: In function 'int main()':
a.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.