submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s054714730 | p01268 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class... | Main.java:36: error: <identifier> expected
boolean[] ret=new [a+1];
^
1 error
|
s752419883 | p01268 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;
public class... | Main.java:19: error: cannot find symbol
boolean[] p=sieveOfEratosthenes(170000);
^
symbol: method sieveOfEratosthenes(int)
location: class Main
Main.java:21: error: variable p is already defined in method solve()
int n=ir.nextInt(),p=ir.nextInt()-1;
^
Main.java:24: error: arra... |
s979940864 | p01268 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collections;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.... | Main.java:23: error: ';' expected
n=ir.nextInt(),p=ir.nextInt()-1;
^
1 error
|
s236031753 | p01268 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collections;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.... | Main.java:23: error: illegal start of type
ArrayList<> al=new ArrayList<>();
^
1 error
|
s232078642 | p01268 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collections;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.... | Main.java:20: error: incompatible types: boolean[] cannot be converted to BitSet
BitSet prime=sieveOfEratosthenes(115000);
^
1 error
|
s029481463 | p01268 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collections;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.... | Main.java:20: error: incompatible types: boolean[] cannot be converted to boolean
boolean prime=sieveOfEratosthenes(115000);
^
Main.java:28: error: array required, but boolean found
if(prime[i]) al.add(i);
^
2 errors
|
s688709898 | p01268 | Java | import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collections;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.... | Main.java:32: error: ';' expected
int sum=al.get(i)+al.get(j)
^
1 error
|
s358174674 | p01268 | Java | import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class TLE {
public static void main(String[] args) {
// TODO Auto-generated method stub
int size = 0;
int[] al = new int[200000];
for(int i = 2; i < 200000; i++){
boolean flg = true;... | Main.java:5: error: class TLE is public, should be declared in a file named TLE.java
public class TLE {
^
1 error
|
s129492560 | p01268 | C | #include <stdio.h>
#define INF 200001
int main (void){
int N, P;
int count;
int i, j;
int eratos[INF]={};//0???true
int memo;
eratos[1]=1;
for(i=2;i*i<INF;i++){
for(j=2;i*j<INF;j++){
eratos[i*j] = 1;
}
}
while(1){
scanf("%d %d",&N,&P);
if(... | main.c: In function 'main':
main.c:28:17: error: 'ip' undeclared (first use in this function); did you mean 'i'?
28 | ip = i;
| ^~
| i
main.c:28:17: note: each undeclared identifier is reported only once for each function it appears in
|
s187695297 | p01268 | C | #include <stdio.h>
#include <stdlib.h>
int comp(const void *a, const void *b) { return *(int *) a - *(int *) b; }
int main() {
while (1) {
int N, P;
scanf("%d %d", &N, &P);
if (N == -1 && P == -1) break;
int prime[1], primeSize = 0;
for (int n = N + 1; primeSize < P; n++) {
bool isPrime = ... | main.c: In function 'main':
main.c:13:7: error: unknown type name 'bool'
13 | bool isPrime = n != 1;
| ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
2 | #include <stdlib.h>
+++ |+#include <stdbool.h>
3 |
|
s002993022 | p01268 | C | #include <stdio.h>
#include <stdlib.h>
#define MAX_N 101000
int isPrime[ MAX_N + 1 ] = { 0, 0, 1 };
void insertionSort( int *, int );
void quickSort( int *, int );
void quickSort_body( int *, int, int );
int median( int, int, int );
int main( void ) {
int i, j, N, P, cnt, p[ 22 ], sum[ 253 ];
for ( i = 3; i <= M... | main.c: In function 'quickSort_body':
main.c:76:25: error: implicit declaration of function 'SWAP' [-Wimplicit-function-declaration]
76 | SWAP( data[ i ], data[ j ] );
| ^~~~
|
s030586228 | p01268 | C++ | #include <cstdio>
#include <iostream>
#include <cmath>
#include <ctype.h>
#include <string>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
using namespace std;
int min_prime(int n);
int isprime(int n);
int main()
{
... | a.cc: In function 'int min_prime(int)':
a.cc:49:22: error: 'i' was not declared in this scope
49 | else i++;
| ^
|
s422984429 | p01268 | C++ |
import java.util.*;
import java.io.*;
import java.math.BigDecimal;
import java.awt.geom.*;
import static java.util.Arrays.*;
import static java.lang.Math.*;
public class Main{
static final Reader sc = new Reader();
static final PrintWriter out = new PrintWriter(System.out,false);
public static void main... | a.cc:2:1: error: 'import' does not name a type
2 | import java.util.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.io.*;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: ... |
s661072831 | p01268 | C++ | #include<stdio.h>
int prime[1300001];
void isprime(void){
int i,j,n,c;
for(i = 4;i<1300001;i += 2)prime[i] = 1;
for (i = 3;i * i <= 1300001;i += 2){
if (prime[i] == 0){
for (j = i + i; j <= 1300001; j += i){
prime[j] = 1;
}
}
}
}
int main(void)... | a.cc: In function 'int main()':
a.cc:25:7: error: expected ';' before 'for'
25 | flag=0
| ^
| ;
26 | for(i = (n+1)*2;;i++){
| ~~~
a.cc:26:29: error: expected ';' before ')' token
26 | for(i = (n+1)*2;;i++){
| ^
| ... |
s744638303 | p01268 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<algorithm>
#include<vector>
#include<unordered_set>
#define INF 200000
using namespace std;
bool sosuu[INF];
int main() {
memset(sosuu, true, sizeof(sosuu));
sosuu[0] = sosuu[1] = false;
for (int a = 2; a < INF; a++) {
if (sosuu[a]) {
for (int b = a... | a.cc: In function 'int main()':
a.cc:12:9: error: 'memset' was not declared in this scope
12 | memset(sosuu, true, sizeof(sosuu));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include<unordered_set>
+++ |+... |
s373670458 | p01268 | C++ | #include <bits/stdc++.h>
using namespace std;
int a[10000]={2,3},i,j,k,c=2,b[100002][101],q,w[402];
int main(){
for(i=4;i<150000;i++){
for(k=1,j=2;j*j<=i;j++){
if(i%j==0){k=0;break;}
}
if(k)a[c++]=i;
}k=0;
for(i=0;i<=100000;i++){
if(i>a[k])k++;
for(q=0,j=k;j<k+20;j++){
for(c=j;c<j+... | In file included from /usr/include/c++/14/algorithm:61,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAcc... |
s257210510 | p01268 | C++ | #include <bits/stdc++.h>
using namespace std;
int a[10000]={2,3},i,j,k,c=2,b[100002][101],q,w[402];
int main(){
for(i=4;i<150000;i++){
for(k=1,j=2;j*j<=i;j++){
if(i%j==0){k=0;break;}
}
if(k)a[c++]=i;
}k=0;
for(i=0;i<=100000;i++){
if(i>a[k])k++;
for(q=0,j=k;j<k+20;j++){
for(c=j;c<j+... | In file included from /usr/include/c++/14/algorithm:61,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAcc... |
s191752622 | p01268 | C++ | #include<iostream>
#include<vector>
#include<cmath>
using namespace std;
void eratosthenes(vector<int> &n){
n[1] = 1;
for (int i = 2;i <= (120000/2); i++){
n[i * 2] = 1;
}
int p = 3;
while(p * p <= 120000){
for (int i = p; i <= (120000/p); i++){
n[i * p] = 1;
}
p++;
while(n[p] == 1)p++;
}
return;... | a.cc: In function 'int main()':
a.cc:57:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
57 | sort(list.begin(),list.end());
| ^~~~
| sqrt
|
s996938831 | p01268 | C++ | #include<iostream>
#include<vector>
#include<cmath>
using namespace std;
void eratosthenes(vector<int> &n){
n[1] = 1;
for (int i = 2;i <= (120000/2); i++){
n[i * 2] = 1;
}
int p = 3;
while(p * p <= 120000){
for (int i = p; i <= (120000/p); i++){
n[i * p] = 1;
}
p++;
while(n[p] == 1)p++;
}
return;... | a.cc: In function 'int main()':
a.cc:57:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
57 | sort(list.begin(),list.end());
| ^~~~
| sqrt
|
s466667663 | p01268 | C++ | #include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<vector>
#include<functional>
using namespace std;
bool a[200000];
int main() {
fill(a, a + 200000, true);
a[0] = false; a[1] = false;
for (int i = 0; i < 200000; i++) {
if (a[i]) {
int j = 2;
while (i*j < 200000) {
a[i*j] = fals... | a.cc: In function 'int main()':
a.cc:39:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
39 | sort(c, c + sum2);
| ^~~~
| sqrt
|
s991285421 | p01268 | C++ | #include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<vector>
#include<functional>
using namespace std;
bool a[200000];
int main() {
fill(a, a + 200000, true);
a[0] = false; a[1] = false;
for (int i = 0; i < 200000; i++) {
if (a[i]) {
int j = 2;
while (i*j < 200000) {
a[i*j] = fals... | a.cc: In function 'int main()':
a.cc:39:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
39 | sort(c, c + sum2);
| ^~~~
| sqrt
|
s684152361 | p01268 | C++ | #include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<vector>
#include<functional>
using namespace std;
bool a[200000];
int main() {
fill(a, a + 200000, true);
a[0] = false; a[1] = false;
for (int i = 0; i < 200000; i++) {
if (a[i]) {
int j = 2;
while (i*j < 200000) {
a[i*j] = fals... | a.cc: In function 'int main()':
a.cc:39:17: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
39 | sort(c, c + sum2);
| ^~~~
| sqrt
|
s999060839 | p01268 | C++ | m :#include<iostream>
#include<vector>
#include<cmath>
#include<algorithm>
using namespace std;
void eratosthenes(vector<int> &n){
n[0] = n[1] = 1;
for (int i = 2;i <= 120000; i++){
if (n[i] == 0){
for (int j = 2; j <= (120000/i); j++){
n[i * j] = 1;
}
}
}
return;
}
bool isPrime(int n){
if (n < ... | a.cc:1:4: error: stray '#' in program
1 | m :#include<iostream>
| ^
a.cc:1:3: error: found ':' in nested-name-specifier, expected '::'
1 | m :#include<iostream>
| ^
| ::
a.cc:1:1: error: 'm' does not name a type
1 | m :#include<iostream>
| ^
In file included from /usr/include/... |
s796329417 | p01268 | C++ | #include <bitset>
#include <functional>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
int main()
{
const auto primes = [] {
vector<int> r;
bitset<1'000'000> b;
auto t = b;
t.set();
t[0] = false;
t[1] = false;
int i = 0;
... | a.cc: In function 'int main()':
a.cc:48:24: error: 'upper_bound' was not declared in this scope
48 | const auto s = upper_bound(begin(primes), end(primes), n);
| ^~~~~~~~~~~
a.cc:55:9: error: 'sort' was not declared in this scope; did you mean 'short'?
55 | sort(begin(... |
s980701585 | p01268 | C++ | #include<bits/stdc++.h>
#define rep(i,a,b) for(int i=int(a);i<int(b);++i)
using namespace std;
typedef long long ll;
int INF = (1LL << 30) - 1;
int MOD = 1e9+7;
main(){
int psize = 1000000;
vector<int>num(psize+1);//prime is 0
num[0] = num[1] = 1;
for(int i = 2;i * i <= psize;i++){
if(num[i])con... | a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
7 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:20:14: error: redeclaration of 'int psize'
20 | } int psize = 1000000;
| ^~~~~
a.cc:8:9: note: 'int psize' previously declared here
8 |... |
s640973493 | p01268 | C++ | #include<iostream>
#include<vector>
#include<cmath>
#define MAX 1000000
using namespace std;
void eratos ( int n, vector<int> &v){
bool prime[MAX+1];
for ( int i = 0; i <= n; i++ ) prime[i] = false;
for ( int i = 3; i <= n; i += 2 ) prime[i] = true;
prime[2] = true;
int limit = (int)sqrt((double)n)... | a.cc:20:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
20 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:29:42: error: 'upper_bound' was not declared in this scope
29 | int s = distance(primes.begin(), upper_bound(primes.begin(), primes.end(), N));
| ... |
s842207279 | p01268 | C++ | #include <iostream>
#include <vector>
#define MAX_N 5000000
using namespace std;
vector<int> primes;
vector<bool> is_prime;
void Init()
{
is_prime.resize(MAX_N + 1, true);
for (int i = 2; i <= MAX_N; i++) {
if (is_prime[i]) {
primes.push_back(i);
for (int j = i * 2; j <= MAX_N; j += i) {
... | a.cc: In function 'int Func(int, int)':
a.cc:37:3: error: 'sort' was not declared in this scope; did you mean 'short'?
37 | sort(vi.begin(), vi.end());
| ^~~~
| short
|
s063490951 | p01268 | C++ | #include <iostream>
#include <vector>
#include <cstdlib>
#include <cstring>
#define MAX_N 5000000
using namespace std;
vector<int> primes;
vector<bool> is_prime;
void Init()
{
is_prime.resize(MAX_N + 1, true);
for (int i = 2; i <= MAX_N; i++) {
if (is_prime[i]) {
primes.push_back(i);
for (int ... | a.cc: In function 'int Func(int, int)':
a.cc:39:3: error: 'sort' was not declared in this scope; did you mean 'short'?
39 | sort(vi.begin(), vi.end());
| ^~~~
| short
|
s043710388 | p01268 | C++ | #include<iostream>
#include<cstring>
#include<vector>
using namespace std;
const int MAX = 1000000;
bool prime[MAX];
vector<int> V;
int N,P;
void make(){
memset(prime,true,sizeof(prime));
prime[0] = prime[1] = false;
for(int i = 2; i*i < MAX; i++)
if(prime[i])
for(int j = 2; i*j < MAX; j++)
prime[... | a.cc: In function 'void solve()':
a.cc:30:31: error: 'upper_bound' was not declared in this scope
30 | vector<int>::iterator ite = upper_bound(V.begin(),V.end(),N);
| ^~~~~~~~~~~
a.cc:36:3: error: 'sort' was not declared in this scope; did you mean 'short'?
36 | sort(M.begi... |
s727784343 | p01268 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(void)
{
int n,p;
int check;
int i1,i2;
while(1){
cin >> n >> p;
if(n==-1 && p==-1) break;
vector<int> sosu;
i1=n+1;
if(i1==1 || i1==2) {
sosu.push_back(2);
i1=3;
}
while(sosu.size()<=p){
check=0;
for(i2=2;i... | a.cc: In function 'int main()':
a.cc:50:17: error: 'sort' was not declared in this scope; did you mean 'short'?
50 | sort(matsuzaki.begin(), matsuzaki.end());
| ^~~~
| short
|
s971746148 | p01268 | C++ | include<iostream>
#include<algorithm>
#include<string>
#include<cstring>
#include<cstdlib>
#include<queue>
#include<vector>
#include<map>
#include<cmath>
#include<list>
#include<set>
using namespace std;
#define fr first
#define sc second
#define INFTY 1000000
typedef pair< int,int > iiP;
typedef pair< int,iiP > P;
int... | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/algorithm:60,
from a.cc:2:
/usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __g... |
s767980853 | p01268 | C++ | #include <iostream>
#include <vector>
using namespace std;
const int MAX = 1e6;
bool prime[MAX];
void is_prime(){
fill(prime,prime+MAX,true);
prime[0] = prime[1] = false;
for(int i = 2 ; i*i < MAX ; i++)
if(prime[i])
for(int j = i*i ; j < MAX ; j += i)
prime[j] = false;
}
int main(){
int n,p;
... | a.cc: In function 'int main()':
a.cc:38:5: error: 'sort' was not declared in this scope; did you mean 'short'?
38 | sort(ans.begin(),ans.end());
| ^~~~
| short
|
s042154777 | p01268 | C++ | import java.util.*;
public class Main {
void doIt() {
Scanner stdIn = new Scanner(System.in);
while(true) {
int N = stdIn.nextInt();
int P = stdIn.nextInt();
if(N == -1 && P == -1) break;
ArrayList<Integer> list = new ArrayList<Integer>(100);
int num = N;
while(list.size() < 100) {
bool... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: expected unqualified-id before 'public'
2 | public class Main {
| ^~~~~~
|
s053400203 | p01268 | C++ | #include <cstdlib>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;
#define N 100000
int main(){
int n, p, sosuu[100],count=0,sum[10000];
string keymoji;
cin >> n >> p;
while(n != -1 && p != -1){
int i=n;
count = 0;
... | a.cc: In function 'int main()':
a.cc:12:9: error: 'cin' was not declared in this scope
12 | cin >> n >> p;
| ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
4 | #include <algorithm>
+++ |+#include <iostream>
5 ... |
s045862089 | p01268 | C++ |
#include <cstdlib>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;
#define N 100000
int main(){
int n, p, sosuu[100],count=0,sum[10000];
string keymoji;
cin >> n >> p;
while(n != -1 && p != -1){
int i=n;
count = 0;
... | a.cc: In function 'int main()':
a.cc:13:9: error: 'cin' was not declared in this scope
13 | cin >> n >> p;
| ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
5 | #include <algorithm>
+++ |+#include <iostream>
6 ... |
s670653119 | p01268 | C++ | #include <cstdlib>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;
#define N 100000
int main(){
int n, p, sosuu[100],count=0,sum[10000];
string keymoji;
cin >> n >> p;
while(n != -1 && p != -1){
int i=n;
count = 0;
... | a.cc: In function 'int main()':
a.cc:12:9: error: 'cin' was not declared in this scope
12 | cin >> n >> p;
| ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
4 | #include <algorithm>
+++ |+#include <iostream>
5 ... |
s617367101 | p01268 | C++ | #include<iostream>
#include<vector>
using namespace std;
int prime[200000];
bool is_prime[200000];
int sieve(int n);
vector<int> prime_prime;
int main(){
sieve(200000);
int n,p;
int count=0;
while(cin>>n>>p){
count=0;
prime_prime.clear();
if(n==-1 && p==-1)break;
while(prime[count]<=n)count++;
... | a.cc: In function 'int main()':
a.cc:20:5: error: 'sort' was not declared in this scope; did you mean 'short'?
20 | sort(prime_prime.begin(),prime_prime.end());
| ^~~~
| short
|
s972419628 | p01268 | C++ | #include<iostream>
#include<vector>
using namespace std;
int prime[200000];
bool is_prime[200000];
int sieve(int n);
vector<int> prime_prime;
int main(){
sieve(200000);
int i,j;
int n,p;
int count=0;
while(cin>>n>>p){
count=0;
prime_prime.clear();
if(n==-1 && p==-1)break;
while(prime[count]<=n... | a.cc: In function 'int main()':
a.cc:21:5: error: 'sort' was not declared in this scope; did you mean 'short'?
21 | sort(prime_prime.begin(),prime_prime.end());
| ^~~~
| short
|
s918269656 | p01269 | Java | import java.util.*;
import java.util.regex.*;
import static java.lang.Math.*;
import static java.lang.System.out;
// AOJ4
public class Main {
final Scanner sc=new Scanner(System.in);
final int[] vx={0,1,0,-1,-1,1,1,-1}, vy={-1,0,1,0,-1,-1,1,1};
final int INF=1<<26;
final double EPS=1.0e-08;
public static void mai... | Main.java:302: error: class, interface, enum, or record expected
}import java.util.*;
^
Main.java:303: error: class, interface, enum, or record expected
import java.util.regex.*;
^
Main.java:304: error: class, interface, enum, or record expected
import static java.lang.Math.*;
^
Main.java:305: error: class, interface,... |
s319888534 | p01269 | C++ | include <iostream>
#include <queue>
#include <vector>
using namespace std;
int N, M, L;
struct edge {
int to, distance, enemy;
};
struct P {
int from, money, enemy;
bool operator >(const P& p) const {
return enemy > p.enemy;
}
};
int main() {
while (cin >> N >> M >> L, N|M|L) {
... | a.cc:1:1: error: 'include' does not name a type
1 | include <iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:62,
from /usr/include/c++/14/deque:62,
from /usr/include/c++/14/queue:62,
from a.cc:2:
/usr/include/c++/14/ext/type_... |
s291671419 | p01269 | C++ | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
int N, M, L;
struct edge {
int to, distance, enemy;
};
struct P {
int from, money, enemy;
bool operator >(const P& p) const {
return enemy > p.enemy;
}
};
struct edge {
int to, distance, enemy;
};
... | a.cc:21:8: error: redefinition of 'struct edge'
21 | struct edge {
| ^~~~
a.cc:9:8: note: previous definition of 'struct edge'
9 | struct edge {
| ^~~~
a.cc: In function 'int main()':
a.cc:36:9: error: 'city' was not declared in this scope
36 | city arr[N];
| ^~... |
s922121587 | p01269 | C++ | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
int N, M, L;
struct edge {
int to, distance, enemy;
};
struct P {
int from, money, enemy;
bool operator >(const P& p) const {
return enemy > p.enemy;
}
};
struct edge {
int to, distance, enemy;
... | a.cc:21:8: error: redefinition of 'struct edge'
21 | struct edge {
| ^~~~
a.cc:9:8: note: previous definition of 'struct edge'
9 | struct edge {
| ^~~~
a.cc:27:2: error: expected ';' after struct definition
27 | }
| ^
| ;
a.cc: In function 'int main()':
a.cc:40:9: error... |
s542848379 | p01269 | C++ | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
int N, M, L;
struct edge {
int to, distance, enemy;
};
struct P {
int from, money, enemy;
bool operator >(const P& p) const {
return enemy > p.enemy;
}
};
struct pair {
int money, enemy;
}
... | a.cc:23:2: error: expected ';' after struct definition
23 | }
| ^
| ;
a.cc: In function 'int main()':
a.cc:36:9: error: 'city' was not declared in this scope
36 | city arr[N];
| ^~~~
a.cc:38:13: error: 'arr' was not declared in this scope
38 | arr[i].money = 0;
... |
s620872453 | p01269 | C++ | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
int N, M, L;
struct edge {
int to, distance, enemy;
};
struct P {
int from, money, enemy;
bool operator >(const P& p) const {
return enemy > p.enemy;
}
};
struct pair {
int money, ene... | a.cc: In function 'int main()':
a.cc:36:9: error: 'city' was not declared in this scope
36 | city arr[N];
| ^~~~
a.cc:38:13: error: 'arr' was not declared in this scope
38 | arr[i].money = 0;
| ^~~
a.cc:48:28: error: 'arr' was not declared in this scope
48 | ... |
s333280111 | p01269 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <sstream>
#include <map>
#include <queue>
#include <stack>
using namespace std;
typedef pair<int,int> P;
typedef pair<int,P... | a.cc: In function 'int solve()':
a.cc:68:38: error: no matching function for call to 'min(int&, __gnu_cxx::__alloc_traits<std::allocator<long int>, long int>::value_type&)'
68 | for(int i=1;i<=l;i++) ans=min(ans,memo[n-1][i]);
| ~~~^~~~~~~~~~~~~~~~~~
In file included f... |
s547683497 | p01269 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
typedef struct {
int to;
int D;
int E;
} Edge;
class State {
public:
int now;
int money;
int damaged;
State(int now, int money, int damaged) {
this->now = now;
this->money = money;
this->damaged = damaged;... | a.cc: In function 'int main()':
a.cc:65:29: error: expected '(' before 'each'
65 | for each (Edge e in G[s.now])
| ^~~~
| (
a.cc:65:40: error: expected primary-expression before 'e'
65 | for each (E... |
s342488225 | p01269 | C++ | #include<iostream>
#include<fstream>
#include<algorithm>
#include<vector>
#include<queue>
#include<array>
#define fin cin
using std::cout;
using std::endl;
class Input{
public:
int a;
int b;
int d;
int e;
Input(int _a, int _b, int _d, int _e){
a = _a;
b = _b;
d = _d;
e = _e;
}
operator < (Input& other... | a.cc:25:9: error: ISO C++ forbids declaration of 'operator<' with no type [-fpermissive]
25 | operator < (Input& other)
| ^~~~~~~~
a.cc:29:9: error: ISO C++ forbids declaration of 'operator>' with no type [-fpermissive]
29 | operator > (Input& other)
| ^~~~~~~~
a.cc: In... |
s348471843 | p01269 | C++ | #include<iostream>
#include<fstream>
#include<algorithm>
#include<vector>
#include<queue>
#include<array>
#define fin cin
using std::cin;
using std::cout;
using std::endl;
class Input{
public:
int a;
int b;
int d;
int e;
Input(int _a, int _b, int _d, int _e){
a = _a;
b = _b;
d = _d;
e = _e;
}
operator... | a.cc:26:9: error: ISO C++ forbids declaration of 'operator<' with no type [-fpermissive]
26 | operator < (Input& other)
| ^~~~~~~~
a.cc:30:9: error: ISO C++ forbids declaration of 'operator>' with no type [-fpermissive]
30 | operator > (Input& other)
| ^~~~~~~~
|
s094677984 | p01269 | C++ | #include<iostream>
#include<fstream>
#include<algorithm>
#include<vector>
#include<queue>
#include<array>
#define fin cin
using std::cin;
using std::cout;
using std::endl;
class Input{
public:
int a;
int b;
int d;
int e;
Input(int _a, int _b, int _d, int _e){
a = _a;
b = _b;
d = _d;
e = _e;
}
operator... | a.cc:26:9: error: ISO C++ forbids declaration of 'operator<' with no type [-fpermissive]
26 | operator < (Input& other)
| ^~~~~~~~
a.cc:30:9: error: ISO C++ forbids declaration of 'operator>' with no type [-fpermissive]
30 | operator > (Input& other)
| ^~~~~~~~
|
s067966610 | p01269 | C++ | #include<iostream>
#include<fstream>
#include<algorithm>
#include<vector>
#include<queue>
#include<array>
#define fin cin
using std::cin;
using std::cout;
using std::endl;
class Input{
public:
int a;
int b;
int d;
int e;
Input(int _a, int _b, int _d, int _e){
a = _a;
b = _b;
d = _d;
e = _e;
}
operator... | a.cc:26:9: error: ISO C++ forbids declaration of 'operator<' with no type [-fpermissive]
26 | operator < (Input& other){
| ^~~~~~~~
a.cc:29:9: error: ISO C++ forbids declaration of 'operator>' with no type [-fpermissive]
29 | operator > (Input& other){
| ^~~~~~~~
|
s184902255 | p01269 | C++ | #include<iostream>
#include<fstream>
#include<algorithm>
#include<vector>
#include<queue>
#include<array>
#define fin cin
using std::cin;
using std::cout;
using std::endl;
class Input{
public:
int a;
int b;
int d;
int e;
Input(int _a, int _b, int _d, int _e){
a = _a;
b = _b;
d = _d;
e = _e;
}
operator... | a.cc:26:9: error: ISO C++ forbids declaration of 'operator<' with no type [-fpermissive]
26 | operator < (Input& other){
| ^~~~~~~~
a.cc:29:9: error: ISO C++ forbids declaration of 'operator>' with no type [-fpermissive]
29 | operator > (Input& other){
| ^~~~~~~~
|
s804338624 | p01269 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<queue>
#include<vector>
using namespace std;
struct road
{
int to, cost, k;//???????????????????????????
};
vector<road>rinsetu[100];
int mincost[100][101];//i??°??????j????????£?????????
struct A
{
int x, y, z;//??´????????????????????????
};
bool ope... | a.cc: In function 'int main()':
a.cc:34:17: error: 'memset' was not declared in this scope
34 | memset(mincost, 0x3f, sizeof(mincost));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<qu... |
s164316417 | p01269 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<functional>
using namespace std;
#define REP(i, a, n) for(int i=a; i<n; i++)
#define INF INT_MAX/2
struct St {
int node;
int money;
int attack;
St(int _node, int _money, int _attack) {
node = _node;
money = _money;
... | a.cc: In function 'int main()':
a.cc:9:13: error: 'INT_MAX' was not declared in this scope
9 | #define INF INT_MAX/2
| ^~~~~~~
a.cc:35:66: note: in expansion of macro 'INF'
35 | p[i][j].first = p[i][j].second = INF;
| ... |
s143782805 | p01269 | C++ | #include <bits/stdc++.h>
using namespace std;
int n, m, l;
int V;
int vv(int v, int mon)
{
return v * (l + 1) + mon;
}
vector<int> dijkstra(int s, vector<vector<pair<int, int>>> &edge)
{
const int INF = 1e9;
vector<int> d(V, INF);
d[s] = 0;
priority_queue<pair<int, int>> que; //cost v
que.push... | a.cc:79:5: error: expected unqualified-id before 'return'
79 | return 0;
| ^~~~~~
a.cc:80:1: error: expected declaration before '}' token
80 | }
| ^
|
s422555981 | p01269 | C++ | #include <bits/stdc++.h>
using namespace std;
int n, m, l;
int V;
int vv(int v, int mon)
{
return v * (l + 1) + mon;
}
vector<int> dijkstra(int s, vector<vector<pair<int, int>>> &edge)
{
const int INF = 1e9;
vector<int> d(V, INF);
d[s] = 0;
priority_queue<pair<int, int>> que; //cost v
que.push... | a.cc:79:5: error: expected unqualified-id before 'return'
79 | return 0;
| ^~~~~~
a.cc:80:1: error: expected declaration before '}' token
80 | }
| ^
|
s879686834 | p01269 | C++ | #include <bits/stdc++.h>
using namespace std;
int n, m, l;
int V;
int vv(int v, int mon)
{
return v * (l + 1) + mon;
}
vector<int> dijkstra(int s, vector<vector<pair<int, int>>> &edge)
{
const int INF = 1e9;
vector<int> d(V, INF);
d[s] = 0;
priority_queue<pair<int, int>> que; //cost v
que.push... | a.cc: In function 'std::vector<int> dijkstra(int, std::vector<std::vector<std::pair<int, int> > >&)':
a.cc:32:26: error: 'make_paird' was not declared in this scope
32 | que.push(make_paird[to], to));
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:56:42: error: 'make... |
s488303923 | p01269 | C++ | #include <bits/stdc++.h>
using namespace std;
int n, m, l;
int V;
int vv(int v, int mon)
{
return v * (l + 1) + mon;
}
vector<int> dijkstra(int s, vector<vector<pair<int, int>>> &edge)
{
const int INF = 1e9;
vector<int> d(V, INF);
d[s] = 0;
priority_queue<pair<int, int>> que; //cost v
que.pu... | a.cc: In function 'std::vector<int> dijkstra(int, std::vector<std::vector<std::pair<int, int> > >&)':
a.cc:32:35: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
32 | que.push(make_pair[to], to));
| ^
a.cc: At global scope:... |
s921430093 | p01269 | C++ | #include <bits/stdc++.h>
using namespace std;
int n, m, l;
int V;
int vv(int v, int mon)
{
return v * (l + 1) + mon;
}
vector<int> dijkstra(int s, vector<vector<pair<int, int>>> &edge)
{
const int INF = 1e9;
vector<int> d(V, INF);
d[s] = 0;
priority_queue<pair<int, int>> que; //cost v
que.pu... | a.cc: In function 'std::vector<int> dijkstra(int, std::vector<std::vector<std::pair<int, int> > >&)':
a.cc:32:26: error: 'make_paird' was not declared in this scope
32 | que.push(make_paird[to], to));
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:56:42: error: 'make... |
s702170208 | p01269 | C++ | #include <bits/stdc++.h>
using namespace std;
int n, m, l;
int V;
int vv(int v, int mon)
{
return v * (l + 1) + mon;
}
vector<int> dijkstra(int s, vector<vector<pair<int, int>>> &edge)
{
const int INF = 1e9;
vector<int> d(V, INF);
d[s] = 0;
priority_queue<pair<int, int>> que; //cost v
que.pu... | a.cc: In function 'std::vector<int> dijkstra(int, std::vector<std::vector<std::pair<int, int> > >&)':
a.cc:32:35: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
32 | que.push(make_pair[to], to));
| ^
|
s913559727 | p01269 | C++ | #include <bits/stdc++.h>
using namespace std;
int n, m, l;
int V;
int vv(int v, int mon)
{
return v * (l + 1) + mon;
}
vector<int> dijkstra(int s, vector<vector<pair<int, int>>> &edge)
{
const int INF = 1e9;
vector<int> d(V, INF);
d[s] = 0;
priority_queue<pair<int, int>> que; //cost v
que.pu... | a.cc: In lambda function:
a.cc:32:40: error: expected '{' before ',' token
32 | que.push(make_pair([to], to));
| ^
a.cc: In function 'std::vector<int> dijkstra(int, std::vector<std::vector<std::pair<int, int> > >&)':
a.cc:32:25: error: no matching function... |
s245055970 | p01269 | C++ | #include <bits/stdc++.h>
using namespace std;
int n, m, l;
int V;
int vv(int v, int mon)
{
return v * (l + 1) + mon;
}
vector<int> dijkstra(int s, vector<vector<pair<int, int>>> &edge)
{
const int INF = 1e9;
vector<int> d(V, INF);
d[s] = 0;
priority_queue<pair<int, int>> que; //cost v
que.pu... | a.cc: In lambda function:
a.cc:32:40: error: expected '{' before ',' token
32 | que.push(make_pair([to], to));
| ^
a.cc: In function 'std::vector<int> dijkstra(int, std::vector<std::vector<std::pair<int, int> > >&)':
a.cc:32:25: error: no matching function... |
s446947665 | p01269 | C++ | #include <bits/stdc++.h>
using namespace std;
int n, m, l;
int V;
int vv(int v, int mon)
{
return v * (l + 1) + mon;
}
vector<int> dijkstra(int s, vector<vector<pair<int, int>>> &edge)
{
const int INF = 1e9;
vector<int> d(V, INF);
d[s] = 0;
priority_queue<pair<int, int>> que; //cost v
que.... | a.cc: In lambda function:
a.cc:32:40: error: expected '{' before ',' token
32 | que.push(make_pair([to], to));
| ^
a.cc: In function 'std::vector<int> dijkstra(int, std::vector<std::vector<std::pair<int, int> > >&)':
a.cc:32:25: error: no matching function... |
s634757165 | p01269 | C++ | #include <bits/stdc++.h>
using namespace std;
int n, m, l;
int V;
int vv(int v, int mon)
{
return v * (l + 1) + mon;
}
vector<int> dijkstra(int s, vector<vector<pair<int, int>>> &edge)
{
const int INF = 1e9;
vector<int> used(V,0);
vector<int> d(V, INF);
d[s] = 0;
priority_queue<pair<int, int>> q... | a.cc: In function 'std::vector<int> dijkstra(int, std::vector<std::vector<std::pair<int, int> > >&)':
a.cc:35:26: error: 'make_paird' was not declared in this scope
35 | que.push(make_paird[to], to));
| ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:59:42: error: 'make... |
s341975213 | p01269 | C++ | #include <iostream>
#include <utility>
#include <stack>
#include <algorithm>
std::pair<int, int> road[101][101]; //first?????¢ second???
int dp[101][101];//[??????][??´???] = ??¢????\????????????°
struct Node {
int pos, money, attacked;
};
int main() {
int n, m, l;
while (std::cin >> n >> m >> l && (n || m || l))... | a.cc: In function 'int main()':
a.cc:16:22: error: 'memset' is not a member of 'std'; did you mean 'wmemset'?
16 | std::memset(dp, 0, sizeof(dp));
| ^~~~~~
| wmemset
|
s560898663 | p01269 | C++ | #include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1e9+7
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
using namespace std;
typedef struct E{
int to,cost,cost2;
}edge;
vector<vector<edge> >E(110);
int memo[110][110];
bool used[110]={};
int n,m,l;... | a.cc: In function 'void dfs(int, int, int)':
a.cc:27:21: error: no matching function for call to 'min(int&, int [110])'
27 | memo[i][now]=min(sum,memo[now]);
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++... |
s174391590 | p01269 | C++ | #include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1e9+7
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
using namespace std;
typedef struct E{
int to,cost,cost2;
}edge;
vector<vector<edge> >E(110);
int memo[110][110];
bool used[110]={};
int n,m,l;... | a.cc: In function 'void dfs(int, int, int)':
a.cc:25:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
25 | if(memo[now]<=sum)return;
| ~~~~~~~~~^~~~~
a.cc:26:14: error: incompatible types in assignment of 'int' to 'int [110]'
26 | memo[now]=sum;
| ~~~~~~~... |
s636862412 | p01269 | C++ | #include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1e9+7
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
using namespace std;
typedef struct E{
int to,cost,cost2;
}edge;
vector<vector<edge> >E(110);
int memo[110]={};
bool used[110]={};
int n,m,l;
i... | a.cc: In function 'void dfs(int, int, int)':
a.cc:25:18: error: invalid types 'int[int]' for array subscript
25 | if(memo[nokori][now]<=sum)return;
| ^
a.cc:27:12: error: invalid types 'int[int]' for array subscript
27 | memo[i][now]=sum;
| ^
a.cc: In function 'int ma... |
s123536176 | p01269 | C++ | #include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1e9+7
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
using namespace std;
typedef struct E{
int to,cost,cost2;
}edge;
vector<vector<edge> >E(110);
int memo[110][110]={};
bool used[110]={};
int n,m... | a.cc:19:13: error: 'ori' does not name a type
19 | int ans=INF;ori-E[now][i].cost>=0){
| ^~~
a.cc:21:8: error: expected unqualified-id before 'else'
21 | }else
| ^~~~
a.cc:23:7: error: 'used' does not name a type
23 | used[E[now][i].to]=false;
| ^~~~
a.cc:... |
s912800043 | p01269 | C++ | #include<iostream>
#include<queue>
#include<map>
#define LEN 100
#define BASE 25
using namespace std;
int maps[LEN][LEN];
int off[LEN][LEN];
int checker[4];
int ncheck[4];
map<int, int> points[LEN];
class State {
public:
char where;
int enemy;
int budget;
int check[4];
State() {check[0]=0;check[1]=0;check[2]=... | a.cc: In function 'int main()':
a.cc:115:41: error: class template argument deduction failed:
115 | status = priority_queue();
| ^
a.cc:115:41: error: no matching function for call to 'priority_queue()'
In file included from /usr/include/c++/14/queue:66,
... |
s036799071 | p01269 | C++ | #include<iostream>
#include<queue>
#include<map>
#define LEN 100
#define BASE 25
using namespace std;
int maps[LEN][LEN];
int off[LEN][LEN];
//int checker[4];
//int ncheck[4];
map<int, int> points[LEN];
class State {
public:
char where;
int enemy;
int budget;
//int check[4];
State() {}
// State() {check[0]=0... | a.cc: In function 'void insert(int, int, int)':
a.cc:91:30: error: expected ';' before '}' token
91 | min++
| ^
| ;
92 | }
| ~
|
s059989186 | p01269 | C++ | #include<iostream>
#include<queue>
#include<map>
#define LEN 100
#define BASE 25
using namespace std;
int maps[LEN][LEN];
int off[LEN][LEN];
int checker[4];
int ncheck[4];
map<int, int> points[LEN];
class State {
public:
char where;
int enemy;
int budget;
int check[4];
State() {}
State() {check[0]=0;check[1]... | a.cc:24:9: error: 'State::State()' cannot be overloaded with 'State::State()'
24 | State() {check[0]=0;check[1]=0;check[2]=0;check[3]=0;}
| ^~~~~
a.cc:23:9: note: previous declaration 'State::State()'
23 | State() {}
| ^~~~~
|
s866181872 | p01269 | C++ | #include<iostream>
#include<queue>
#include<map>
#define LEN 100
#define BASE 25
using namespace std;
int maps[LEN][LEN];
int off[LEN][LEN];
int checker[4];
int ncheck[4];
map<int, int> points[LEN];
class State {
public:
char where;
int enemy;
int budget;
int check[4];
State() {check[0]=0;check[1]=0;check[2]=... | a.cc: In function 'void insert(int, int, int)':
a.cc:83:42: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator>'
83 | if ((*itr).second>min) {
| ~~~~~~~~~~~~~^~~~
a.cc:84:49: error: cannot resolve overloaded... |
s600051306 | p01269 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<stack>
#include<queue>
#include<map>
#include<cstdio>
#include<cstring>
#include<cmath>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
const int MAXN = 101, MAXL = 101, INF = 110000 ;
int d[MAXN][MAXL];
struct edge{i... | a.cc: In function 'int main()':
a.cc:52:22: error: expected primary-expression at end of input
52 | if(now ==
| ^
a.cc:52:22: error: expected ')' at end of input
52 | if(now ==
| ~ ^
| )
a.cc:52:22: error: expec... |
s452127486 | p01269 | C++ | #include <stdio.h>
#include <queue>
#include <vector>
#include <algorithm>
#include <utility>
using namespace std;
typedef pair<int,int> P;
typedef pair<int,P> PP;
int main(void){
int n, m, l, a, b, d[100][100], e[100][100], f[100][101], i, j, k, x, y, z, mn;
priority_queue<PP,vector<PP>,greater<PP> > que;
while(... | a.cc: In function 'int main()':
a.cc:18:17: error: 'memset' was not declared in this scope
18 | memset(d,-1,sizeof(d));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <utility>
+++ |+... |
s050935024 | p01270 | Java | import java.util.*;
public class AOJ2152
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
int N;
boolean aaa = true;
while(true)
{
N = in.nextInt();
if(N == 0)break;
if(!aaa)System.out.println();
aaa = false;
LinkedList<P> list = new LinkedList<P>();
l... | Main.java:3: error: class AOJ2152 is public, should be declared in a file named AOJ2152.java
public class AOJ2152
^
1 error
|
s290587201 | p01270 | C | #include<stdio.h>
int F[1000000000],R[1000000000];
int main()
{
int i,j,t=0,n,y,x;
char ch;
while(1){
scanf("%d",&n);
if(n==0)break;
for(i=0;i<1000000000;i++){
F[i]=-1;
}
for(i=0;i<n*2;i++){
scanf("%c",&ch);
if(ch=='W'){
scanf("%d%d",&x,&y);
for(j=0;y!... | /tmp/cc6KbKFl.o: in function `main':
main.c:(.text+0x1c8): relocation truncated to fit: R_X86_64_PC32 against symbol `R' defined in .bss section in /tmp/cc6KbKFl.o
main.c:(.text+0x1fe): relocation truncated to fit: R_X86_64_PC32 against symbol `R' defined in .bss section in /tmp/cc6KbKFl.o
collect2: error: ld returned ... |
s677103794 | p01270 | C | #include<stdio.h>
#define SS 1000000000
int F[SS],R[SS];
int main()
{
int i,j,t=0,n,y,x;
char ch;
while(1){
scanf("%d",&n);
if(n==0)break;
for(i=0;i<SS;i++){
F[i]=-1;
}
for(i=0;i<n*2;i++){
scanf("%c",&ch);
if(ch=='W'){
scanf("%d%d",&x,&y);
for(j=0;y!=0... | /tmp/cck8pD24.o: in function `main':
main.c:(.text+0x1c8): relocation truncated to fit: R_X86_64_PC32 against symbol `R' defined in .bss section in /tmp/cck8pD24.o
main.c:(.text+0x1fe): relocation truncated to fit: R_X86_64_PC32 against symbol `R' defined in .bss section in /tmp/cck8pD24.o
collect2: error: ld returned ... |
s039848515 | p01270 | C++ | #pragma GCC optimize ("O3")
#pragma GCC target ("tune=native")
#pragma GCC target ("avx")
#include <bits/stdc++.h>
// 汎用マクロ
#define ALL_OF(x) (x).begin(), (x).end()
#define REP(i,n) for (long long i=0, i##_len=(n); i<i##_len; i++)
#define RANGE(i,is,ie) for (long long i=(is), i##_end=(ie); i<=i##_end; i++)
#define DS... | In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:5:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<std::tuple<long long int, long long ... |
s680527030 | p01270 | C++ | #pragma GCC optimize ("O3")
#pragma GCC target ("tune=native")
#pragma GCC target ("avx")
#include <bits/stdc++.h>
// 汎用マクロ
#define ALL_OF(x) (x).begin(), (x).end()
#define REP(i,n) for (long long i=0, i##_len=(n); i<i##_len; i++)
#define RANGE(i,is,ie) for (long long i=(is), i##_end=(ie); i<=i##_end; i++)
#define DS... | In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:5:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<std::tuple<long long int, long long ... |
s264412033 | p01270 | C++ | #pragma GCC optimize ("O3")
#pragma GCC target ("tune=native")
#pragma GCC target ("avx")
#include <bits/stdc++.h>
// 汎用マクロ
#define ALL_OF(x) (x).begin(), (x).end()
#define REP(i,n) for (long long i=0, i##_len=(n); i<i##_len; i++)
#define RANGE(i,is,ie) for (long long i=(is), i##_end=(ie); i<=i##_end; i++)
#define DS... | In file included from /usr/include/c++/14/string:43,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
from a.cc:5:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::_Vector_base<std::tuple<long long int, long long ... |
s975835593 | p01270 | C++ | /*
2152: Restrictive Filesystem
*/
#include <iostream>
#include <queue>
#include <utility>
#include <algorithm>
using namespace std;
typedef pair<int, int> P_ii;
class datlst {
private:
priority_queue<P_ii> lst;
public:
void push_file(int, int);
void erase_file(int);
};
void datlst::push_file(int ident, int cou... | a.cc: In member function 'void datlst::push_file(int, int)':
a.cc:26:39: error: 'iterator' is not a member of 'std::priority_queue<std::pair<int, int> >'
26 | priority_queue<P_ii>::iterator it = lst.begin();
| ^~~~~~~~
|
s541814144 | p01270 | C++ | #include <cstdio>
#include <cstring>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
struct data{
int lidl,ridl;
int idl;
int l,r;
data(){}
data(int iidl,int ll,int rr,int lll,int rrr){
idl=iidl;
lidl=ll;
ridl=rr;
l=lll;
r=rrr;
}
};
vector<data> dat;
map<int,int> idl;
vector... | a.cc:22:12: error: template argument 1 is invalid
22 | vector<data> dat;
| ^
a.cc:22:12: error: template argument 2 is invalid
a.cc:29:5: error: cannot declare '::main' to be a global variable
29 | int main(voidl){
| ^~~~
a.cc:29:10: error: 'voidl' was not declared in this scope; did yo... |
s513103244 | p01270 | C++ | #include <map>
#include <cstdio>
using namespace std;
void solve(int T){
map<pair<int,int>,int> m;
char cmd[2];
int n,k;
for(;T--;){
scanf("%s%d",cmd,&n);
if(*cmd=='D'){
for(auto it=m.begin();it!=m.end();)if(it->second==n)m.erase(it++);else ++it;
}else if(*cmd=='R'){
auto it=m.lower_bound(make_pair(n,20... | a.cc: In function 'void solve(int)':
a.cc:17:59: error: decrement of member 'std::pair<int, int>::first' in read-only object
17 | printf("%d\n",--it->first.first<=n&&n<=it->first.second ? it->second : -1);
| ~~~~~~~~~~^~~~~
|
s068701920 | p01270 | C++ | #include <map>
#include <cstdio>
using namespace std;
int main(){for(int T;~scanf("%d",&T)&&T;puts("")){
map<pair<int,int>,int>m;
char C[2];
int n,k;
for(;T--;){
scanf("%s%d",C,&n);
if(*C=='D'){
for(auto it=m.begin();it!=m.end();)if(it->second==n)m.erase(it++);else ++it;
}else if(*C=='R'){
auto it=m.low... | a.cc: In function 'int main()':
a.cc:19:55: error: 'cur' was not declared in this scope
19 | int d=it->first.first-cur;
| ^~~
|
s568418524 | p01270 | C++ | #include<map>
#include<cstdio>
using namespace std;
int main(){for(int T;~scanf("%d",&T)&&T;puts("")){
map<pair<int,int>,int>m;
char C[2];
int n,k;
for(;T--;){
scanf("%s%d",C,&n);
if(*C=='D'){
for(auto it=m.begin();it!=m.end();)if(it->second==n)m.erase(it++);else ++it;
}else if(*C=='R'){
auto it=m.lower... | a.cc: In function 'int main()':
a.cc:24:38: error: no matching function for call to 'std::map<std::pair<int, int>, int>::insert(<brace-enclosed initializer list>, int&)'
24 | if(k)m.insert({c,c+k-1},n);
| ~~~~~~~~^~~~~~~~~~~~~
In file included from /usr/incl... |
s795451065 | p01270 | C++ | #include<map>
#include<cstdio>
using namespace std;
int main(){for(int T;~scanf("%d",&T)&&T;puts("")){
map<pair<int,int>,int>m;
char C[2];
int n,k;
for(;T--;){
scanf("%s%d",C,&n);
if(*C=='D'){
for(auto it=m.begin();it!=m.end();)if(it->second==n)m.erase(it++);else ++it;
}else if(*C=='R'){
auto it=m.lower... | a.cc: In function 'int main()':
a.cc:24:26: error: no match for 'operator&&' (operand types are 'int' and 'std::pair<std::_Rb_tree_iterator<std::pair<const std::pair<int, int>, int> >, bool>')
24 | k&&m.insert({{c,c+k-1},n});
| ~^~~~~~~~~~~~~~~~~~~~~~~~~
| ... |
s028936826 | p01270 | C++ | #include<map>
#include<cstdio>
using namespace std;
int main(){for(int T;~scanf("%d",&T)&&T;puts("")){
map<pair<int,int>,int>m;
char C[2];
int n,k;
for(;T--;){
scanf("%s%d",C,&n);
if(*C=='D'){
for(auto it=m.begin();it!=m.end();)if(it->second==n)m.erase(it++);else ++it;
}else if(*C=='R'){
auto it=m.lower... | a.cc: In function 'int main()':
a.cc:24:28: error: no match for 'operator&&' (operand types are 'bool' and 'std::pair<std::_Rb_tree_iterator<std::pair<const std::pair<int, int>, int> >, bool>')
24 | !!k&&m.insert({{c,c+k-1},n});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~
... |
s247805112 | p01270 | C++ | #include<map>
#include<cstdio>
using namespace std;
int main(){for(int T;~scanf("%d",&T)&&T;puts("")){
map<pair<int,int>,int>m;
char C[2];
int n,k;
for(;T--;){
scanf("%s%d",C,&n);
if(*C=='D'){
for(auto it=m.begin();it!=m.end();)if(it->second==n)m.erase(it++);else ++it;
}else if(*C=='R'){
auto it=m.lower... | a.cc: In function 'int main()':
a.cc:20:47: error: no matching function for call to 'std::map<std::pair<int, int>, int>::emplace(<brace-enclosed initializer list>, int&)'
20 | if(d)m.emplace({c,c+d-1},n);
| ~~~~~~~~~^~~~~~~~~~~~~
In file incl... |
s158605344 | p01270 | C++ | #include<map>
#include<cstdio>
using namespace std;
int main(){for(int T;scanf("%d",&T),T;puts("")){
map<pair<int,int>,int>m;
char C[2];
int n,k;
for(;T--&&scanf("%s%d",C,&n);;){
if(*C=='D'){
for(auto it=m.begin();it!=m.end();)if(it->second==n)m.erase(it++);else ++it;
}else if(*C=='R'){
auto it=m.lower_bo... | a.cc: In function 'int main()':
a.cc:8:38: error: expected primary-expression before ';' token
8 | for(;T--&&scanf("%s%d",C,&n);;){
| ^
a.cc:8:38: error: expected ')' before ';' token
8 | for(;T--&&scanf("%s%d",C,&n);;){
| ~ ... |
s530762652 | p01270 | C++ | #include <bits/stdc++.h>
using namespace std;
#define pii pair<int,int>
int main(){
int n;
while(cin >> n,n){
// ?????????????????????????????±
priority_queue<pii,vector<pii>,greater<pii>> pq;
// ?????\??????????????????????´???????????????????
map<int,vector<p... | a.cc: In function 'int main()':
a.cc:54:26: error: 'm1' was not declared in this scope; did you mean 'mp'?
54 | if(it == m1.end()){
| ^~
| mp
|
s275488482 | p01270 | C++ | //25min
#include <iostream>
#include <vector>
using namespace std;
int main(){
int N;
while(cin >> N && N>0){
vector<int> M;
int max;
for(int j=0;j<N;j++){
char command;
int i,s,p;
cin >> command;
switch(command){
case 'W':
cin >> i >> s;
int index=0;
while(s>0){
if(... | a.cc: In function 'int main()':
a.cc:30:12: error: jump to case label
30 | case 'D':
| ^~~
a.cc:18:13: note: crosses initialization of 'int index'
18 | int index=0;
| ^~~~~
a.cc:36:12: error: jump to case label
36 | case 'R':
| ^~~
a.cc:... |
s036262377 | p01270 | C++ | //:55-
#include <iostream>
#include <utility>
#include <map>
using namespace std;
int main(){
int N;
while(cin >> N && N>0){
map<pair<int,int>,int> files;
for(int j=0;j<N;j++){
char cmd;
int I,S,P;
int h=0, e;
bool flg;
cin >> cmd;
map<pair<int,int>,int>::iterator f;
... | a.cc: In function 'int main()':
a.cc:28:24: error: expected ']' before '(' token
28 | map[make_pair(h,e-1)]=I;
| ^
| ]
a.cc:28:33: error: class template argument deduction failed:
28 | map[make_pair(h,e-1)]=I;
| ... |
s036139660 | p01270 | C++ | //:55-
#include <iostream>
#include <utility>
#include <map>
using namespace std;
int main(){
int N;
while(cin >> N && N>0){
map<pair<int,int>,int> files;
for(int j=0;j<N;j++){
char cmd;
int I,S,P;
int h=0, e;
bool flg;
cin >> cmd;
map<pair<int,int>,int>::iterator f;
... | a.cc: In function 'int main()':
a.cc:61:9: error: 'If' was not declared in this scope; did you mean 'f'?
61 | If(f==files.end()) cout << -1 << endl;
| ^~
| f
|
s920306707 | p01270 | C++ | #include <stdio.h>
#include <vector>
#include <string>
using namespace std;
struct DATA{
int start;
int end;
int fileID;
DATA(int start, int end, int fileID){
this->start = start, this->end = end, this->fileID = fileID;
}
};
vector<DATA> data;
void Write(int fileID, int file_length)
{
int size = (int)data.s... | a.cc: In function 'void Write(int, int)':
a.cc:20:25: error: reference to 'data' is ambiguous
20 | int size = (int)data.size();
| ^~~~
In file included from /usr/include/c++/14/vector:69,
from a.cc:2:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidat... |
s147553879 | p01270 | C++ | import java.util.*;
public class Main
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
int N;
while(true)
{
N = in.nextInt();
if(N == 0)break;
LinkedList<P> list = new LinkedList<P>();
list.add(new P(0,0,-1));
String c;
int I,S;
for(int i=0;i<N;i++)
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main
| ^~~~~~
a.cc:92:11: error: expected ':' before 'int'
92 | public in... |
s310442679 | p01270 | C++ | import java.util.*;
class Main
{
public static void main(String args[])
{
Scanner in = new Scanner(System.in);
int N;
while(true)
{
N = in.nextInt();
if(N == 0)break;
LinkedList<P> list = new LinkedList<P>();
list.add(new P(0,0,-1));
String c;
int I,S;
for(int i=0;i<N;i++)
{
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:11: error: expected ':' before 'static'
8 | public static void main(String args[])
| ^~~~~~~
| :
a.cc:8:29: error: 'S... |
s689994304 | p01270 | C++ | #include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <climits>
#include <ctime>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <deque>
#include <complex>
#include <string>
#include <iomanip>... | a.cc:48:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
48 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:52:21: error: 'class std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >' has no member named 'clear'
5... |
s259076304 | p01271 | Java | import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;
public class Main {
MyScanner sc = new MyScanner();
Scanner sc2 = new Scanner(System.in);
final int MOD = 1000000007;
int[] dx = { 1, 0, 0, -1 };
int[] dy = { 0, 1, -1, 0 };
void run() {
for (;;) {
int w = sc.nextInt();
int ... | Main.java:98: error: <identifier> expected
new?\Main().run();
^
Main.java:98: error: illegal character: '\'
new?\Main().run();
^
2 errors
|
s635618095 | p01271 | Java | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Collection;
import java.util.Scanner;
import java.util.Queue;
import java.util.ArrayDeque;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
p... | Main.java:32: error: incompatible types: int[] cannot be converted to int
final int dh = new int[]{0, -1, 0, 1};
^
Main.java:33: error: incompatible types: int[] cannot be converted to int
final int dw = new int[]{-1, 0, 1, 0};
^
Main.java:34: error: incompa... |
s243265943 | p01271 | Java | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Collection;
import java.util.Scanner;
import java.util.Queue;
import java.util.ArrayDeque;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
p... | Main.java:32: error: incompatible types: int[] cannot be converted to int
int dh = new int[]{0, -1, 0, 1};
^
Main.java:33: error: incompatible types: int[] cannot be converted to int
int dw = new int[]{-1, 0, 1, 0};
^
Main.java:34: error: incompatible types: int[] canno... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.