submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s437537537 | p02264 | C++ | #include <stdio.h>
#include <string.h>
#include <iostream>
using namespace std;
#define MAX 100000
int mycount = 0;
typedef struct _queue {
char name[10];
int time;
}queuecell;
queuecell queue[MAX];
void enqueue(char *name, int time) {
strcpy(queue[mycount].name, name);
queue[mycount].time = time;
... | a.cc: In function 'int main()':
a.cc:45:31: error: 'queuecell' {aka 'struct _queue'} has no member named 't'
45 | scanf("%d", &queue[i].t)
| ^
|
s374385866 | p02264 | C++ | #include <stdio.h>
#include <string.h>
#include <iostream>
using namespace std;
#define MAX 100000
int mycount = 0;
typedef struct _queue {
char name[10];
int time;
}queuecell;
queuecell queue[MAX];
void enqueue(char *name, int time) {
strcpy(queue[mycount].name, name);
queue[mycount].time = time;
... | a.cc: In function 'int main()':
a.cc:45:36: error: expected ';' before '}' token
45 | scanf("%d", &queue[i].time)
| ^
| ;
46 | }
| ~
|
s082247798 | p02264 | C++ | #include <iostream>
#include <string>
#include<string.h>
#include <cstdio>
using namespace std;
#define size 100005
typedef struct pu {
int time;
string name;
}P;
P Q[size];
int head, tail, n;//先頭尻尾、要素数
void enqueue(P x) {
Q[tail] = x;
tail = (tail + 1) % size;
}
P dequeue() {
P x = Q[head];
head = (head + 1) ... | a.cc: In function 'int main()':
a.cc:48:50: error: 'elaps' was not declared in this scope; did you mean 'elps'?
48 | cout << u.name << " " << elaps << endl;
| ^~~~~
| elps
|
s587436398 | p02264 | C++ | #include <iostream>
#include <cstring>
#include <queue>
using namespace std;
int main() {
int n, q;
cin>>n>>q;
queue<pair<string,int> > Q;
int name, t;
for (int i=0; i<n; i++) {
cin>>name>>t;
Q.push(make_pair(name,t));
}
pair<string,int> u;
int elaps=0;
while (!Q.empty()) {
u=Q.front();
... | a.cc: In function 'int main()':
a.cc:13:11: error: no matching function for call to 'std::queue<std::pair<std::__cxx11::basic_string<char>, int> >::push(std::pair<int, int>)'
13 | Q.push(make_pair(name,t));
| ~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/queue:66,
... |
s217021306 | p02264 | 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
| |
s645064567 | p02264 | C++ | Last login: Thu Mar 1 15:54:29 on console
YHnoMacbook-pro:~ derodontus$ ls
AnacondaProjects Untitled.ipynb Untitled6.ipynb
Applications Untitled1.ipynb Untitled7.ipynb
Desktop Untitled10.ipynb Untitled8.ipynb
Documents Untitled11.ipynb Untitled9.ipynb
Downloads Untitled12.ipynb VirtualBox VMs
Dropbox Untitled... | a.cc:31:93: error: invalid digit "9" in octal constant
31 | YHnoMacbook-pro:beginner derodontus$ cd /Users/derodontus/Desktop/言語/C++/contest/beginner/089
| ^~~
a.cc:32:17: error: invalid digit "9" in octal constant
3... |
s994323753 | p02264 | C++ | // キュー
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<vector>
//const int MAX_N = 100000;
const int STR_LEN = 10;
// キュー関連の定義
const int Max_Queue = 1000;
int queue_pointer = 0;
typedef struct q_e
{
// 配列の要素No.
int id;
// プロセス名
char process_name[STR_LEN];
// プロセスの... | a.cc: In function 'int main()':
a.cc:48:9: error: 'strcpy' was not declared in this scope
48 | strcpy(&(que_ele.process_name[0]), &str[0]);
| ^~~~~~
a.cc:7:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include<vector>
+++ ... |
s322694221 | p02264 | C++ | // キュー
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<vector>
//const int MAX_N = 100000;
const int STR_LEN = 10;
// キュー関連の定義
const int Max_Queue = 1000;
int queue_pointer = 0;
typedef struct q_e
{
// 配列の要素No.
int id;
// プロセス名
char process_name[STR_LEN];
// プロセスの... | a.cc: In function 'int main()':
a.cc:48:9: error: 'strcpy' was not declared in this scope
48 | strcpy(&(que_ele.process_name[0]), &str[0]);
| ^~~~~~
a.cc:7:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include<vector>
+++ ... |
s971321972 | p02264 | C++ | // キュー
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<vector>
//const int MAX_N = 100000;
const int STR_LEN = 10;
// キュー関連の定義
const int Max_Queue = 1000;
int queue_pointer = 0;
typedef struct q_e
{
// 配列の要素No.
int id;
// プロセス名
char process_name[STR_LEN];
// プロセスの... | a.cc: In function 'int main()':
a.cc:48:9: error: 'strcpy' was not declared in this scope
48 | strcpy(&(que_ele.process_name[0]), &str[0]);
| ^~~~~~
a.cc:7:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include<vector>
+++ ... |
s669352484 | p02264 | C++ | // キュー
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<vector>
//const int MAX_N = 100000;
const int STR_LEN = 10;
// キュー関連の定義
const int Max_Queue = 1000;
int queue_pointer = 0;
typedef struct q_e
{
// 配列の要素No.
int id;
// プロセス名
char process_name[STR_LEN];
// プロセスの... | a.cc: In function 'int main()':
a.cc:48:9: error: 'strcpy' was not declared in this scope
48 | strcpy(&(que_ele.process_name[0]), &str[0]);
| ^~~~~~
a.cc:7:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include<vector>
+++ ... |
s510062499 | p02264 | C++ | // キュー
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<vector>
//const int MAX_N = 100000;
const int STR_LEN = 10;
// キュー関連の定義
const int Max_Queue = 1000;
int queue_pointer = 0;
typedef struct q_e
{
// 配列の要... | a.cc: In function 'int enqueue(queue_element)':
a.cc:114:16: error: 'INT_MIN' was not declared in this scope
114 | return INT_MIN;
| ^~~~~~~
a.cc:12:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
11 | #include<vector>
+++ ... |
s227009266 | p02264 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#define len 150000;
using namespace std;
struct A
{
char name[100];
int time;
};
int head, tail,N, interval;
A a[len];
A dequeue()
{
A x = a[head++];
head = head%len;
return x;
}
void enqueue(A m)
{
a[tail] = m;
tail = (tail + 1) % len;
}
int main()
{
... | a.cc:4:19: error: expected ']' before ';' token
4 | #define len 150000;
| ^
a.cc:16:5: note: in expansion of macro 'len'
16 | A a[len];
| ^~~
a.cc:16:8: error: expected unqualified-id before ']' token
16 | A a[len];
| ^
a.cc: In function 'A dequeue()':
a.cc:20:15... |
s866570399 | p02264 | C++ | //
// 4.cpp
// Algorithms and Data Structures
//
// Created by kawauso on 2018/04/06.
//
#include "4.hpp"
#include <iostream>
#include <string>
#include <vector>
#include <cassert>
#include <sstream>
#include <tuple>
#define MAIN() c_4_3()
#ifdef MAIN
int main(int argc, const char * argv[]) {
std::ios::sync_with... | a.cc:8:10: fatal error: 4.hpp: No such file or directory
8 | #include "4.hpp"
| ^~~~~~~
compilation terminated.
|
s291610183 | p02264 | C++ | #include <iostream>
#define INT_MAX 2147483647
int MAX_SIZE = 0;
struct Process{
std::string name;
int time;
};
class Queue {
private:
Process Table[MAX_SIZE];
int head;
int top;
public:
Queue(){ head=0; top=0; };
void Enqueue(Process P){ Table[top] = P; top = (top+1)%MAX_SIZE };
Process Dequeue(){ re... | a.cc:12:17: error: size of array 'Table' is not an integral constant-expression
12 | Process Table[MAX_SIZE];
| ^~~~~~~~
a.cc: In member function 'void Queue::Enqueue(Process)':
a.cc:17:67: error: expected ';' before '}' token
17 | void Enqueue(Process P){ Table[top] = P; top = (top+1)%M... |
s635954192 | p02264 | C++ | #include <iostream>
#define INT_MAX 2147483647
struct Process{
std::string name;
int time;
};
class Queue {
private:
Process Table[100005];
int head;
int top;
public:
Queue(){ head=0; top=0; };
void Enqueue(Process P){ Table[top] = P; top = (top+1)%100005 };
Process Dequeue(){ return Table[head]; head... | a.cc: In member function 'void Queue::Enqueue(Process)':
a.cc:16:65: error: expected ';' before '}' token
16 | void Enqueue(Process P){ Table[top] = P; top = (top+1)%100005 };
| ^
a.cc: In member function 'Process Queue::Dequeue()':
a.cc:17:65: ... |
s236995188 | p02264 | C++ | //队列的简单使用
/**
队列的常用函数size(),
front(),返回队首元素
pop() 从队列中取出并删除元素
push() 向队尾添加元素
empty()
**/
#include <algorithm>
#include <iostream>
#include <queue>
#include <string>
using namespace std;
int main() {
int n, q, t;
string name;
queue<pair<string, int> que>;
cin >> n >> q;
for (int i = 0; i < n; i++) {
cin... | a.cc: In function 'int main()':
a.cc:19:30: error: template argument 1 is invalid
19 | queue<pair<string, int> que>;
| ^
a.cc:19:30: error: template argument 2 is invalid
a.cc:24:5: error: 'que' was not declared in this scope
24 | que.push(make_pair(name, t));
| ... |
s427870582 | p02264 | C++ | #include<iostream>
#define SIZE 200000
struct Queue{
int table[SIZE];
int tail,head;
void init(){
head=tail=0;
}
bool empty(){
return head==tail;
}
void inqueue(int x){
table[tail]=x;
tail++;
tail%=SIZE;
}
int dequeue(){
if(empty())return 0;
int res=table[he... | a.cc: In function 'int main()':
a.cc:35:3: error: 'string' was not declared in this scope
35 | string table[SIZE];
| ^~~~~~
a.cc:35:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/... |
s069809146 | p02264 | C++ |
#include<iostream>
#define SIZE 200000
struct Queue{
int table[SIZE];
int tail,head;
void init(){
head=tail=0;
}
bool empty(){
return head==tail;
}
void inqueue(int x){
table[tail]=x;
tail++;
tail%=SIZE;
}
int dequeue(){
if(empty())return 0;
int res=table[h... | a.cc: In function 'int main()':
a.cc:36:3: error: 'string' was not declared in this scope
36 | string table[SIZE];
| ^~~~~~
a.cc:36:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/... |
s120664885 | p02264 | C++ | #include<string>
#include<queue>
int main()
{
int i,all_time=0,sa;
#include<iostream>
int n,q;
std::string name[100];
int time[100];
std::cin>>n>>q;
for(i=0; i<n; i++){
std::cin>>name[i]>>time[i];
}
for (i = 0; i < n; i++) {
if (time[i] < q) {
all_time += time[i];
std::cout << name[i] << " " <<all_... | In file included from /usr/include/c++/14/ios:41,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a.cc:7:
/usr/include/c++/14/exception: In function 'int main()':
/usr/include/c++/14/exception:41:8: error: expected unqualified-id before ... |
s886927742 | p02264 | C++ | class Queue():
def __init__(self, size=10):
self.queue = [None] * size
self.head = self.tail = 0
self.MAX = size
self.num_items = 0
def is_empty(self):
return self.num_items == 0
def is_full(self):
return self.num_items == self.MAX
def enqueue(self, x):... | a.cc:73:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
73 | if __name__ == '__main__':
| ^~~~~~~~~~
a.cc:1:13: error: expected unqualified-id before ')' token
1 | class Queue():
| ^
|
s853541256 | p02264 | C++ | #include<iostream>
#include<string>
#include<queue>
int main()
{
int n;
int q;
int time_cnt=0;
queue<string> name;
queue<int> time;
string name1[100];
int time1[100];
string k_name;
int k_time;
std::cin>>n>>q;
for(int i=0; i<n; i++){
std::cin>>name1[i]>>time1[i];
name.push(name1[i]);
... | a.cc: In function 'int main()':
a.cc:10:3: error: 'queue' was not declared in this scope; did you mean 'std::queue'?
10 | queue<string> name;
| ^~~~~
| std::queue
In file included from /usr/include/c++/14/queue:66,
from a.cc:3:
/usr/include/c++/14/bits/stl_queue.h:96:11: note: 'std... |
s851443784 | p02264 | C++ | #include<iostream>
#include<queue>
#include<string>
int main(){
queue<string> x1;
queue<int> x2;
string x01;
int x02;
int max_datasets=500000;
int all_time=0;
int n,q;
string name[max_datasets];
int time[max_datasets];
cin>>n>>q;
for(int i=0;i<n;i++){
cin>>name[i]>>time[i];
x1.push(... | a.cc: In function 'int main()':
a.cc:6:3: error: 'queue' was not declared in this scope; did you mean 'std::queue'?
6 | queue<string> x1;
| ^~~~~
| std::queue
In file included from /usr/include/c++/14/queue:66,
from a.cc:2:
/usr/include/c++/14/bits/stl_queue.h:96:11: note: 'std::q... |
s043042019 | p02264 | C++ | #include<iostream>
#include<queue>
#include<string>
int main(){
std::queue<string> x1;
std::queue<int> x2;
std::string x01;
int x02;
int max_datasets=500000;
int all_time=0;
int n,q;
std::string name[max_datasets];
int time[max_datasets];
std::cin>>n>>q;
for(int i=0;i<n;i++){
std::cin>>na... | a.cc: In function 'int main()':
a.cc:5:14: error: 'string' was not declared in this scope
5 | std::queue<string> x1;
| ^~~~~~
a.cc:5:14: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /us... |
s969792302 | p02264 | C++ | #include<iostream>
#include<string>
#include<queue>
int main(){
int n,q;
std::cin>>n>>q;
std::pair<string,int> p;
std::queue<pair<string,int>> Q;
int total=0;
int n,q;
std::cin>>n>>q;
for(int i=0;i<n;i++){
string name;
int time;
std::cin>>name>>time;
p=make_pair(name,time);
Q.push... | a.cc: In function 'int main()':
a.cc:9:13: error: 'string' was not declared in this scope
9 | std::pair<string,int> p;
| ^~~~~~
a.cc:9:13: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /u... |
s070723794 | p02264 | C++ | #include<iostream>
#include<string>
#include<queue>
#include<utility>
int main(){
int n,q;
std::cin>>n>>q;
std::pair<string,int> p;
std::queue<pair<string,int>> Q;
int total=0;
int n,q;
std::cin>>n>>q;
for(int i=0;i<n;i++){
string name;
int time;
std::cin>>name>>time;
p=make_pair(name,... | a.cc: In function 'int main()':
a.cc:9:13: error: 'string' was not declared in this scope
9 | std::pair<string,int> p;
| ^~~~~~
a.cc:9:13: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
from /usr/include/c++/14/ios:40,
from /u... |
s843862982 | p02264 | C++ | #include<iostream>
#include<string>
#include<queue>
#include<utility>
int main(){
int n,q;
std::cin>>n>>q;
pair<string,int> p;
std::queue<pair<string,int>> Q;
int total=0;
int n,q;
std::cin>>n>>q;
for(int i=0;i<n;i++){
string name;
int time;
std::cin>>name>>time;
p=make_pair(name,time)... | a.cc: In function 'int main()':
a.cc:9:3: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
9 | pair<string,int> p;
| ^~~~
| std::pair
In file included from /usr/include/c++/14/string:48,
from /usr/include/c++/14/bits/locale_classes.h:40,
fro... |
s340197845 | p02264 | 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
| |
s566799209 | p02264 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include <algorithm>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
using namespace std;
typedef long long ll;
const int MAXN = 100100;
int head, tail;
int T[MAXN];
char P[MAXN][10];
void enque(int t,... | a.cc: In function 'void enque(int, char*)':
a.cc:20:9: error: 'strcpy_s' was not declared in this scope
20 | strcpy_s(P[tail],q);
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:40:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
40 | scanf_s("%d", &... |
s269008736 | p02264 | C++ | #include<iostream>
#include<cstdio>
#include<string>
#include<vector>
#include <algorithm>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
using namespace std;
typedef long long ll;
const int MAXN = 100100;
int head, tail;
int T[MAXN];
char P[MAXN][10];
void enque(int t,... | a.cc: In function 'void enque(int, char*)':
a.cc:20:9: error: 'strcpy_s' was not declared in this scope
20 | strcpy_s(P[tail],q);
| ^~~~~~~~
a.cc: In function 'int main()':
a.cc:40:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
40 | scanf_s("%d", &... |
s758092721 | p02264 | C++ | #include<iostream>
#include<queue>
using namespace std;
int main(){
int n, q, w_time = 0;
cin >>n >>q;
queue qu;
//string name[n];
//int time[n];
struct process{
string name;
int time;
};
struct process p[n];
for(int i = 0; i < n; i++){
cin >>p[i].name >>p[i... | a.cc: In function 'int main()':
a.cc:9:11: error: class template argument deduction failed:
9 | queue qu;
| ^~
a.cc:9:11: error: no matching function for call to 'queue()'
In file included from /usr/include/c++/14/queue:66,
from a.cc:2:
/usr/include/c++/14/bits/stl_queue.h:195:9... |
s322761852 | p02264 | C++ | #include <iostream>
using namespace std;
#define LEN 100005
struct Process {
char name[100];
int t;
};
Process Q[LEN];
int head,tail,n;
// tailの位置にxを追加する
void enqueue(Process x){
// tailの位置に追加して,tailを増やす
Q[tail] = x;
tail = (tail+1)%LEN;
}
// headの位置の要素を取り出す
Process dequeue(){
// headが指していた要素を返す
Proce... | a.cc: In function 'int main()':
a.cc:50:5: error: 'elaps' was not declared in this scope
50 | elaps += diff;
| ^~~~~
|
s011307293 | p02264 | C++ | #include<stdio.h>
#include<string.h>
#define LEN 100005
typedef struct pp {
char name[100];
int t;
} P;
P Q[LEN];
int head, tail, n;
void enqueue(P x) {
Q[tail] = x;
tail = (tail + 1) % LEN;
}
P dequeue() {
P x = Q[head];
head = (head + 1) % LEN;
return x
}
int min(int a, int b) { retur... | a.cc: In function 'P dequeue()':
a.cc:21:13: error: expected ';' before '}' token
21 | return x
| ^
| ;
22 | }
| ~
a.cc: In function 'int main()':
a.cc:32:27: error: expected ';' before ')' token
32 | for(i = 1, i <= n, i++) {
| ... |
s843200390 | p02264 | C++ | #include<stdio.h>
#include<string.h>
#define LEN 100005
typedef struct pp{
} P;
P Q[LEN];
int head, tail, n;
void enqueue(P x) {
Q[tail] = x;
if ( tail + 1 == LEN ) {
tail = 0;
} else {
tail++;
}
}
P dequeue() {
x = Q[head];
if ( head + 1 == LEN ) {
head = 0;
} else {
head++;
}
ret... | a.cc: In function 'P dequeue()':
a.cc:21:3: error: 'x' was not declared in this scope
21 | x = Q[head];
| ^
a.cc: In function 'int min(int, int)':
a.cc:31:1: warning: no return statement in function returning non-void [-Wreturn-type]
31 | }
| ^
a.cc: In function 'int main()':
a.cc:40:22: error: 'P... |
s027870981 | p02264 | C++ | #include<stdio.h>
#include<string.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
} P;
P Q[LEN];
int head, tail, n;
void enqueue(P x) {
Q[tail] = x;
if ( tail + 1 == LEN ) {
tail = 0;
} else {
tail++;
}
}
P dequeue() {
x = Q[head];
if ( head + 1 == LEN ) {
head = 0;
} e... | a.cc: In function 'P dequeue()':
a.cc:23:3: error: 'x' was not declared in this scope
23 | x = Q[head];
| ^
a.cc: In function 'int min(int, int)':
a.cc:33:1: warning: no return statement in function returning non-void [-Wreturn-type]
33 | }
| ^
a.cc: In function 'int main()':
a.cc:43:24: error: 't... |
s963671685 | p02264 | C++ | #include<stdio.h>
#include<string.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
} P;
P Q[LEN];
int head, tail, n;
void enqueue(P x) {
Q[tail] = x;
if ( tail + 1 == LEN ) {
tail = 0;
} else {
tail++;
}
}
P dequeue() {
P x = Q[head];
if ( head + 1 == LEN ) {
head = 0;
}... | a.cc: In function 'int min(int, int)':
a.cc:32:41: error: expected ':' before ';' token
32 | int min(int a, int b) { return a < b ? a; b; }
| ^
| :
a.cc:32:41: error: expected primary-expression before ';' token
a.cc: In func... |
s053385229 | p02264 | C++ | #include<stdio.h>
#include<string.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
} P;
P Q[LEN];
int head, tail, n;
void enqueue(P x) {
Q[tail] = x;
if ( tail + 1 == LEN ) {
tail = 0;
} else {
tail++;
}
}
P dequeue() {
P x = Q[head];
if ( head + 1 == LEN ) {
head = 0;
}... | a.cc: In function 'int min(int, int)':
a.cc:32:41: error: expected ':' before ';' token
32 | int min(int a, int b) { return a < b ? a; b; }
| ^
| :
a.cc:32:41: error: expected primary-expression before ';' token
|
s399792901 | p02264 | C++ | #include<queue>
#include<iostream>
#include<string>
using namespace std;
int main() {
int n, q;
pair<string, int> proces[n];
int time = 0;
queue<pair<string, int> > Q;
for (int i = 0; i < n; i++) {
cin >> proces.first >> proces.second;
Q.push(proces);
}
while (!Q.empty()) {
pair<string, int> tmp = Q.front(... | a.cc: In function 'int main()':
a.cc:11:31: error: request for member 'first' in 'proces', which is of non-class type 'std::pair<std::__cxx11::basic_string<char>, int> [n]'
11 | cin >> proces.first >> proces.second;
| ^~~~~
a.cc:11:47: error: request for member 'se... |
s752257680 | p02264 | C++ | #include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
using namespace std;
map <int ,int> mpa,mpb;
#define LEN 100005
typedef struct pp{
char name[100];
int t;
} P;
P Q[LEN];
int hea... | a.cc: In function 'int min(int, int)':
a.cc:35:3: error: 'retrun' was not declared in this scope
35 | retrun a<b?a:b;
| ^~~~~~
a.cc:36:1: warning: no return statement in function returning non-void [-Wreturn-type]
36 | }
| ^
a.cc: In function 'int main()':
a.cc:54:5: error: 'elasp' was not declare... |
s983292091 | p02264 | C++ | #include<iostream>
#include<string>
#define SIZE 200000
using namespace std;
struct Task {
string name;
int time;
};
struct Queue {
Task table[SIZE];
int tail;
int head;
void init() {
head = tail = 0;
}
bool isEmpty() {
return head == tail;
}
void enqueue(Task t) {
table[tail] = t... | a.cc: In function 'int main()':
a.cc:47:22: error: 'n' was not declared in this scope
47 | for(int i = 0; i < n; i++){
| ^
a.cc:58:7: error: 'now' was not declared in this scope
58 | now += t.time;
| ^~~
|
s381400898 | p02264 | C++ | #include<iostream>
#include<string>
#define SIZE 200000
using namespace std;
struct Task {
string name;
int time;
};
struct Queue {
Task table[SIZE];
int tail;
int head;
void init() {
head = tail = 0;
}
bool isEmpty() {
return head == tail;
}
void enqueue(Task t) {
table[tail] = t... | a.cc: In function 'int main()':
a.cc:58:7: error: 'now' was not declared in this scope
58 | now += t.time;
| ^~~
|
s107298977 | p02264 | C++ | 5 100
p1 150
p2 80
p3 200
p4 350
p5 20
| a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 5 100
| ^
|
s196527963 | p02264 | C++ | #include<iostream>
#include<string>
using namespace std;
class Proc{
public:
string nam;
int tim;
Proc(){
nam = "";
tim = 0;
}
};
Proc Q[100001];
class Queue{
private:
int f;
int r;
public:
Queue(){
f = 0;
r = 0;
}
int next(int p) const{
return (p+1)%100001;
}
bool isFull() c... | a.cc: In function 'int main()':
a.cc:64:5: error: 'que' was not declared in this scope; did you mean 'qu'?
64 | que.push(p);
| ^~~
| qu
|
s018838913 | p02264 | C++ | #include <stdio.h>
#include <string.h>
#define LEN 100005
// 構造体
typedef struct pp {
char name[100];
int t;
} P;
P Q[LEN];
int head, tail, n;
void enqueue(P x) {
Q[tail] = x;
tail = (tail + 1) % LEN;
}
P dequeue() {
P x = Q[head];
head = (head + 1) % LEN;
return x;
}
int min(int a, int ... | a.cc: In function 'int main()':
a.cc:44:16: error: expected primary-expression before '+=' token
44 | elaps =+= c;
| ^~
|
s726415293 | p02264 | C++ | #include <stdio.h>
#include <queue>
#include <string>
#include <algorithm>
using namespace std;
int main() {
int n, q, t;
string name;
queue<pair<string, int> > Q;
scanf("%d %d", &n, &q);
for (int i=0; i<n; i++) {
cin >> name >> q;
Q.push(make_pair(name, t));
}
... | a.cc: In function 'int main()':
a.cc:15:9: error: 'cin' was not declared in this scope
15 | cin >> name >> q;
| ^~~
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>
... |
s595660014 | p02264 | C++ | #include <stdio.h>
typedef struct{
int time;
char name[10];
}pr;
int main(){
int i,n,q,time,sum=0;
pr p[100000],array;
scanf("%d %d",&n,&time);
for(i=0;i<n;i++)scanf("%s %d",p[i].names,&p[i].time);
while(1){
if(n==0)break;
if(p[0].time<=time){
sum+=p[0].time;
printf("%s %d\n",p[0].... | a.cc: In function 'int main()':
a.cc:10:38: error: 'struct pr' has no member named 'names'; did you mean 'name'?
10 | for(i=0;i<n;i++)scanf("%s %d",p[i].names,&p[i].time);
| ^~~~~
| name
a.cc:15:29: error: 'struct pr' has no memb... |
s375239910 | p02264 | C++ | typedef struct{
int time;
char names[10];
}pr;
int main(){
int i,n,q,time,sum=0;
pr p[100000],array;
scanf("%d %d",&n,&time);
for(i=0;i<n;i++)scanf("%s %d",p[i].names,&p[i].time);
while(1){
if(n==0)break;
if(p[0].time<=time){
sum+=p[0].time;
printf("%s %d\n",p[0].names,sum);
for(... | a.cc: In function 'int main()':
a.cc:8:3: error: 'scanf' was not declared in this scope
8 | scanf("%d %d",&n,&time);
| ^~~~~
a.cc:14:7: error: 'printf' was not declared in this scope
14 | printf("%s %d\n",p[0].names,sum);
| ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio... |
s380855861 | p02264 | C++ | #include<stdio.h>
#include <string.h>
typedef struct{
int time;
char names[10];
}pr;
int main(){
int i,n,q,time,sum=0,head=0;
pr p[100000],array;
scanf("%d %d",&n,&time);
for(i=0;i<n;i++)scanf("%s %d",p[i].names,&p[i].time);
while(1){
if(n+1==head)break;
if(p[head].time<=time){
sum+=p[head].... | a.cc:32:1: error: 'call' does not name a type
32 | call
| ^~~~
|
s445473794 | p02264 | C++ | #include <stdio.h>
#define N 100000
#define Q 1000
void enq1(int);
int deq1(void);
void enq2(int);
int deq2(void);
int head=0,tail=0,p;
int S1[N],S2[N];
int main(){
int n,q,i,T=0,a,b,c=0;
char name[N][10];
int time[N];
scanf("%d %d",&n,&q);
for(i=0 ; i<n ; i++){
scanf("%s %d",name[i],&time[i]);
... | a.cc:82:5: error: redefinition of 'int head'
82 | int head=0,tail=0,p;
| ^~~~
a.cc:11:5: note: 'int head' previously defined here
11 | int head=0,tail=0,p;
| ^~~~
a.cc:82:12: error: redefinition of 'int tail'
82 | int head=0,tail=0,p;
| ^~~~
a.cc:11:12: note: 'int tail' pre... |
s262865488 | p02264 | C++ | #include <iostream>
#include <string>
#include <vector>
struct task {
std::string name;
int time;
bool done;
};
int main() {
std::vector<task> queue;
int n, q;
int done = 0;
int time = 0;
// input
std::ios::sync_with_stdio(false)
std::cin >> n >> q;
for (int i=0; i<n;... | a.cc: In function 'int main()':
a.cc:18:37: error: expected ';' before 'std'
18 | std::ios::sync_with_stdio(false)
| ^
| ;
19 | std::cin >> n >> q;
| ~~~
|
s813313879 | p02264 | C++ | #include<stdio.h>
#include<string.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
}P;
P Q[LEN+1];
int head, tail, n;
void enqueue(P x){
Q[tail] = x;
if((tail+1) == MAX){
tail = 0;
} else tail++;
}
P dequeue(){
x = Q[head];
if((head+1) == MAX){
had = 0;
}
else head++;
retu... | a.cc: In function 'void enqueue(P)':
a.cc:15:18: error: 'MAX' was not declared in this scope
15 | if((tail+1) == MAX){
| ^~~
a.cc: In function 'P dequeue()':
a.cc:21:3: error: 'x' was not declared in this scope
21 | x = Q[head];
| ^
a.cc:22:18: error: 'MAX' was not declared in t... |
s298626383 | p02264 | C++ | #include<iostream>
#include<queue>
#include<string>
#include<algorithm>
using namespace std;
int main(){
int n,q,t;
string name;
queue<pair<string,int> > p;
cin>>n>>q;
while(n--){
cin>>name>>t;
p.push(make_pair(name,t));
}
pair<string,int> u;
int elaps=0;
int a=0;
while(!p.emt... | a.cc: In function 'int main()':
a.cc:20:14: error: 'class std::queue<std::pair<std::__cxx11::basic_string<char>, int> >' has no member named 'emty'; did you mean 'empty'?
20 | while(!p.emty()){
| ^~~~
| empty
|
s029806425 | p02264 | 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
| |
s694778671 | p02264 | C++ | #include<stdio.h>
#include <iostream>
#include <string.h>
using namespace std;
typedef struct{
char name[11];
int time;
}Process;
class ProcessQueue{
public:
ProcessQueue(int size):
m_size(size),
m_head(0),
m_tail(0),
number(0)
{
m_process = new Process[m_si... | a.cc:96:78: error: invalid digit "8" in octal constant
96 | Judge: 10/10 C++ CPU: 00:01 sec Memory: 1792 KB Length: 1373 B 2016-08-05 18:21
| ^~
a.cc:98:6: error: stray '#' in program
98 | Case # Verdict CPU Time M... |
s347634048 | p02264 | C++ | #include<iostream>
#include<string>
#include<cstdlib>
#define N 100000
using namespace std;
typedef struct{
int num[N];
int head;
int tail;
}Queque;
//grobal
Queque que;
//add to head position
void Enqueue(int);
//delete head position
void Dequeue(void);
//return now of stck
int front(void);
int main(){
... | a.cc: In function 'void Enqueue(int)':
a.cc:97:18: error: 'tail' was not declared in this scope
97 | if(que.tail==N)tail=0;
| ^~~~
|
s409260157 | p02265 | Java | import java.util.*;
//Javaプログラマのためのアルゴリズム とデータ構造p.150~参照
//双方向リストのためのセルを定義したクラス
class CellDouble{
CellDouble prev;
CellDouble next;
Integer data;
CellDouble(Integer data){
prev = next = null;
this.data = data;
}
}
public class Main {
Scanner sc = new Scanner(System.in);
StringBuilder output = new StringBui... | Main.java:27: error: invalid method declaration; return type required
public ProblemC() {
^
1 error
|
s560125989 | p02265 | Java | import java.util.*;
import java.io.*;
public class Main {
StringBuilder output = new StringBuilder();
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
Deque<Integer> List = new ArrayDeque<Integer>();
int n;
String order;
int data;
public void input() throws NumberFormatException... | Main.java:39: error: unreported exception IOException; must be caught or declared to be thrown
obj.input();
^
1 error
|
s094239617 | p02265 | Java | import java.util.ArrayList;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
try {
int n = Integer.parseInt(sc.nextLine());
Node head = ... | Main.java:49: error: cannot find symbol
StringJoiner sj = new StringJoiner(" ");
^
symbol: class StringJoiner
location: class Main
Main.java:49: error: cannot find symbol
StringJoiner sj = new StringJoiner(" ");
^
symbol: class StringJoiner... |
s446404555 | p02265 | Java | import java.util.*;
public class DoublyLinkedList {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
try {
int n = Integer.parseInt(sc.nextLine());
Node head = new Node();
Node tail = new Node();
head.next = tail;
... | Main.java:3: error: class DoublyLinkedList is public, should be declared in a file named DoublyLinkedList.java
public class DoublyLinkedList {
^
1 error
|
s627791993 | p02265 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Scanner;
class Main {
static void main(String[] args) {
Scanner scan = new Scanner(System.in);
NodeList node = new NodeList();
int n = Integer.parseInt(scan.next());
int ... | Main.java:49: error: toString() in NodeList.Node cannot override toString() in Object
String toString(){
^
attempting to assign weaker access privileges; was public
1 error
|
s953221058 | p02265 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new scanner(System.in);
n = sc.nextInt();
}
}
| Main.java:5: error: cannot find symbol
Scanner sc = new scanner(System.in);
^
symbol: class scanner
location: class Main
Main.java:6: error: cannot find symbol
n = sc.nextInt();
^
symbol: variable n
location: class Main
2 errors
|
s174420666 | p02265 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
n = sc.nextInt();
}
}
| Main.java:6: error: cannot find symbol
n = sc.nextInt();
^
symbol: variable n
location: class Main
1 error
|
s892512034 | p02265 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String[] str = new String[2];
for(int loop = 0; loop < n; loop++){
str = sc.nextLint().split(" ");
}
}
}
| Main.java:9: error: cannot find symbol
str = sc.nextLint().split(" ");
^
symbol: method nextLint()
location: variable sc of type Scanner
1 error
|
s250980313 | p02265 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int loop = 0; loop < n; loop++){
String str = sc.nextLint().split(" ");
}
}
}
| Main.java:8: error: cannot find symbol
String str = sc.nextLint().split(" ");
^
symbol: method nextLint()
location: variable sc of type Scanner
1 error
|
s089007254 | p02265 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int loop = 0; loop < n; loop++){
String str = sc.nextLine().split(" ");
}
}
}
| Main.java:8: error: incompatible types: String[] cannot be converted to String
String str = sc.nextLine().split(" ");
^
1 error
|
s343348278 | p02265 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int loop = 0; loop < n; loop++){
String[] str = sc.nextLine().split(" ");
if(str[0].equal(" "))
}
}
}
| Main.java:10: error: illegal start of statement
}
^
1 error
|
s890730071 | p02265 | Java | import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int loop = 0; loop < n; loop++){
String[] str = sc.nextLine().split(" ");
if(str[0].equal("insert")){
int i = 0;
... | Main.java:9: error: cannot find symbol
if(str[0].equal("insert")){
^
symbol: method equal(String)
location: class String
1 error
|
s586856617 | p02265 | Java | import java.util.*;
import java.io.BufferedReader;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
Deque<Integer> dq = new ArrayDeque<Integer>();
StringBuilder sb = new StringBuilder();
BufferedReader br = new BufferedReader(new InputSt... | Main.java:8: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class InputStreamReader
location: class Main
Main.java:12: error: cannot find symbol
String command = br.nextLine();... |
s945654647 | p02265 | Java | import java.util.*;
import java.io.BufferedReader;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
Deque<Integer> dq = new ArrayDeque<Integer>();
StringBuilder sb = new StringBuilder();
BufferedReader br = new BufferedReader(new InputSt... | Main.java:8: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class InputStreamReader
location: class Main
Main.java:28: error: cannot find symbol
}catch(IOException e){}
... |
s349018166 | p02265 | Java | import java.util.*;
import java.io.*;
public class Main{
public static void main(String[] args){
try{
Scanner sc = new Scanner(System.in);
Deque<Integer> dq = new ArrayDeque<Integer>();
StringBuilder sb = new StringBuilder();
BufferedReader br = new BufferedRe... | Main.java:17: error: 'else' without 'if'
else if(command.contains("deleteLast"))
^
1 error
|
s928685878 | p02265 | Java | import java.util.*;
import java.io.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
Deque<Integer> dq = new ArrayDeque<Integer>();
StringBuilder sb = new StringBuilder();
BufferedReader br = new BufferedReader(new InputStreamReader(Sy... | Main.java:20: error: cannot find symbol
dq.remove(Integer.parseint(str[1]));
^
symbol: method parseint(String)
location: class Integer
Main.java:22: error: cannot find symbol
dq.addFirst(Integer.parseint(str[1]));
... |
s416069993 | p02265 | Java | import java.util.*;
import java.io.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
Deque<Integer> dq = new ArrayDeque<Integer>();
StringBuilder sb = new StringBuilder();
BufferedReader br = new BufferedReader(new InputStreamReader(Sy... | Main.java:11: error: unreported exception IOException; must be caught or declared to be thrown
String command = br.readLine();
^
1 error
|
s276341551 | p02265 | Java | import java.util.LinkedList;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
LinkedList<String> lnk=new LinkedList<String>();
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
for(int i=0;i<n;i++){
String s=sc.next();
if(s.equals("deleteFirst"))lnk.remove();
e... | Main.java:14: error: incompatible types: int cannot be converted to String
else {String a=sc.nextInt();
^
1 error
|
s466207018 | p02265 | Java | package aizu;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
public class AizuALDS1_3_C {
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br=n... | Main.java:10: error: class AizuALDS1_3_C is public, should be declared in a file named AizuALDS1_3_C.java
public class AizuALDS1_3_C {
^
1 error
|
s425507733 | p02265 | Java | import java.util.Scanner;
public class Main{
static Node head = null;
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int cnt = new Integer(s.nextLine()).intValue();
for(int i=0 ; i<cnt ; i++) {
String[] str = s.nextLine().split(" ");
if("insert".equals(str[0])) {
inse... | Main.java:10: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal
int cnt = new Integer(s.nextLine()).intValue();
^
Main.java:14: warning: [removal] Integer(String) in Integer has been deprecated and marked for removal
insert(new Integer(str[1]).intValue());
... |
s456098973 | p02265 | Java | import java.util.Scanner;
public class Main{
static Node head = null;
static DoubleLinkedList a = new DoubleLinkedList();
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int cnt = new Integer(s.nextLine()).intValue();
for(int i=0 ; i<cnt ; i++) {
String[] str = s.nextLine().... | Main.java:7: error: cannot find symbol
static DoubleLinkedList a = new DoubleLinkedList();
^
symbol: class DoubleLinkedList
location: class Main
Main.java:7: error: cannot find symbol
static DoubleLinkedList a = new DoubleLinkedList();
^
symbol: class DoubleLinkedLis... |
s861669962 | p02265 | Java | import java.util.*;
import java.io.*;
class Main {
public static void main( String[] args ) {
try {
BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
int n = Integer.parseInt( kb.readLine( ) );
Deque<Integer> dq = new Deque<Integer>( );
String[... | Main.java:10: error: Deque is abstract; cannot be instantiated
Deque<Integer> dq = new Deque<Integer>( );
^
1 error
|
s251593091 | p02265 | Java | import java.util.*;
import java.io.*;
class Main {
public static void main( String[] args ) {
try {
BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
int n = Integer.parseInt( kb.readLine( ) );
Deque<Integer> dq = new ArrayList<Integer>( );
Str... | Main.java:10: error: incompatible types: ArrayList<Integer> cannot be converted to Deque<Integer>
Deque<Integer> dq = new ArrayList<Integer>( );
^
1 error
|
s526559156 | p02265 | Java | import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStreamReader;
class Elem {
Elem next;
Elem prev;
int key;
Elem(int key) {
this.key = key;
}
}
class DoubleyLinkedList {
Elem head;
DoubleyLinkedList() {
head = new Elem(-1);
head.next = head;
head.prev = head;
}
void ... | Main.java:37: error: incompatible types: unexpected return value
return e.key;
^
Main.java:40: error: incompatible types: unexpected return value
return -1;
^
Main.java:47: error: incompatible types: unexpected return value
return e.key;
^
Main.java:54: error: incompatible types: ... |
s823355775 | p02265 | Java | import java.util.Scanner;
import java.util.ArrayList;
public class DoublyLinkedList {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = Integer.parseInt(scan.nextLine());
ArrayList<Integer> list = new ArrayList<Integer>();
for (int i = 0; i < n; i++) {
String[] input ... | Main.java:3: error: class DoublyLinkedList is public, should be declared in a file named DoublyLinkedList.java
public class DoublyLinkedList {
^
1 error
|
s493585476 | p02265 | Java | import java.io.*;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(reader.readLine());
ArrayList<Integer> list = new ArrayList<Integer>();
String[] inp... | Main.java:12: error: cannot find symbol
command = input[0];
^
symbol: variable command
location: class Main
Main.java:13: error: cannot find symbol
switch (command) {
^
symbol: variable command
location: class Main
2 errors
|
s244009154 | p02265 | Java | public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
String[] commands;
int num;
LinkedList<Integer> list = new LinkedList<Integer>();
for (int i = 0; i < n; i++) {
... | Main.java:4: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:4: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
... |
s206534326 | p02265 | Java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
class Main {
static ArrayDeque<String> queue = new ArrayDeque<String>();
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));... | Main.java:33: error: reached end of file while parsing
}
^
1 error
|
s025472764 | p02265 | Java | import java.util.*;
class Elem {
Elem next;
Elem prev;
int key;
Elem(int key) {
this.key = key;
}
}
class DoubleyLinkedList {
Elem head;
DoubleyLinkedList() {
head = new Elem(-1);
head.next = head;
head.prev = head;
}
void insert(i... | Main.java:66: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class Main
Main.java:66: error: cannot find symbol
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
... |
s956756725 | p02265 | Java | import java.util.Scanner;
import java.util.ArrayList;
import java.lang.Integer;
import java.lang.StringBuilder;
import java.lang.Math;
class Node {
public Node next;
public Node prev;
public int value;
public Node(int value) {
this.value = value;
}
}
class LinkedList {
private Node head;
private N... | Main.java:114: error: cannot find symbol
private static ArrayList<Cmd> cmds;
^
symbol: class Cmd
location: class Main
Main.java:119: error: cannot find symbol
for (Cmd cmd: cmds) {
^
symbol: class Cmd
location: class Main
Main.java:145: error: cannot find symbol
... |
s305823577 | p02265 | Java | import java.util.Scanner;
import java.util.ArrayList;
import java.lang.Integer;
import java.lang.StringBuilder;
import java.lang.Math;
class Node {
public Node next;
public Node prev;
public int value;
public Node(int value) {
this.value = value;
}
}
class LinkedList {
private Node head;
private N... | Main.java:163: error: class, interface, enum, or record expected
ozawa@ozamac-2:~/workspace/algo$ javac Main.java
^
Main.java:163: error: class, interface, enum, or record expected
ozawa@ozamac-2:~/workspace/algo$ javac Main.java
^
Main.java:165: error: class, interface, enum, or record expected
ozawa@oza... |
s998333528 | p02265 | Java | import java.util.Scanner;
import java.util.ArrayList;
import java.lang.Integer;
import java.lang.StringBuilder;
import java.lang.Math;
class Node {
public Node next;
public Node prev;
public int value;
public Node(int value) {
this.value = value;
}
}
class LinkedList {
private Node head;
private N... | Main.java:114: error: cannot find symbol
private static ArrayList<Cmd> cmds;
^
symbol: class Cmd
location: class Main
Main.java:119: error: cannot find symbol
for (Cmd cmd: cmds) {
^
symbol: class Cmd
location: class Main
Main.java:145: error: cannot find symbol
... |
s320667040 | p02265 | Java | import java.util.Scanner;
import java.util.ArrayList;
import java.lang.Integer;
import java.lang.StringBuilder;
import java.lang.Math;
class Node {
public Node next;
public Node prev;
public int value;
public Node(int value) {
this.value = value;
}
}
class LinkedList {
private Node head;
private N... | Main.java:114: error: cannot find symbol
private static ArrayList<Cmd> cmds;
^
symbol: class Cmd
location: class Main
Main.java:119: error: cannot find symbol
for (Cmd cmd: cmds) {
^
symbol: class Cmd
location: class Main
Main.java:145: error: cannot find symbol
... |
s958963407 | p02265 | Java | import java.util.Scanner;
import java.util.ArrayList;
import java.lang.Integer;
import java.lang.StringBuilder;
import java.lang.Math;
enum CmdOp {
INSERT("insert"),
DELETE("delete"),
DELETE_FIRST("deleteFirst"),
DELETE_LAST("deleteLast"),
UNDEFINED("UNDEFINED");
private String name;
private CmdOp(St... | Main.java:163: error: cannot find symbol
private static ArrayList<Cmd> cmds;
^
symbol: class Cmd
location: class Main
Main.java:168: error: cannot find symbol
for (Cmd cmd: cmds) {
^
symbol: class Cmd
location: class Main
Main.java:194: error: cannot find symbol
... |
s594787907 | p02265 | Java | import java.util.Scanner;
import java.util.ArrayList;
import java.lang.Integer;
import java.lang.StringBuilder;
import java.lang.Math;
enum CmdOp {
INSERT("insert"),
DELETE("delete"),
DELETE_FIRST("deleteFirst"),
DELETE_LAST("deleteLast"),
UNDEFINED("UNDEFINED");
private String name;
private CmdOp(Stri... | Main.java:161: error: cannot find symbol
private static ArrayList<Cmd> cmds;
^
symbol: class Cmd
location: class Main
Main.java:166: error: cannot find symbol
for (Cmd cmd: cmds) {
^
symbol: class Cmd
location: class Main
Main.java:192: error: cannot find symbol
... |
s062612303 | p02265 | Java | import java.util.Scanner;
import java.lang.Integer;
import java.lang.StringBuilder;
import java.lang.Math;
class Node {
Node prev;
Node next;
int value;
public Node(int x) {
this.value = x;
}
}
class LinkedList {
Node head;
Node tail;
public LinkedList() {
head = null;
tail = null;
}
... | Main.java:142: error: reached end of file while parsing
oz
^
1 error
|
s961023833 | p02265 | Java | import java.io.*;
import java.util.*;
public class Main
{
public static void main(String[] args)
{
LinkedList<Integer> list = new LinkedList<Integer>;
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
for(int i=0; i<n; i++)
{
String command = sc... | Main.java:8: error: '(' or '[' expected
LinkedList<Integer> list = new LinkedList<Integer>;
^
1 error
|
s431114486 | p02265 | Java | import java.io.*;
import java.util.*;
public class Main
{
public static void main(String[] args)
{
LinkedList<Integer> list = new LinkedList<Integer>();
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
for(int i=0; i<n; i++)
{
String command = ... | Main.java:14: error: cannot find symbol
String command = scan.nextString();
^
symbol: method nextString()
location: variable scan of type Scanner
Main.java:37: error: cannot find symbol
if(i!=lit.size()-1)
^
symbol: variable lit
loca... |
s289384758 | p02265 | Java | import java.io.*;
import java.util.*;
public class Main
{
public static void main(String[] args)
{
LinkedList<Integer> list = new LinkedList<Integer>();
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
for(int i=0; i<n; i++)
{
String command = ... | Main.java:19: error: ')' or ',' expected
list.add(scan.nextInt();;
^
1 error
|
s203773830 | p02265 | Java | import java.io.*;
import java.util.*;
public class Main
{
public static void main(String[] args)
{
LinkedList<Integer> list = new LinkedList<Integer>();
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int memory[] = new int[1000000000];
int num;
fo... | Main.java:24: error: variable num is already defined in method main(String[])
int num=scan.nextInt();
^
1 error
|
s983648536 | p02265 | Java | import java.io.*;
import java.util.*;
public class Main
{
public static void main(String[] args)
{
LinkedList<Integer> list = new LinkedList<Integer>();
Scanner scan = new Scanner(System.in);
int hash = 2000000;
int n = scan.nextInt();
int memory[] = new int[hash];
... | Main.java:28: error: ')' or ',' expected
list.remove((Integer)num;
^
Main.java:30: error: illegal start of expression
}*/
^
Main.java:30: error: illegal start of expression
}*/
... |
s865772423 | p02265 | Java | import java.io.*;
import java.util.*;
public class Main
{
public static void main(String[] args)
{
LinkedList<Integer> list = new LinkedList<Integer>();
Scanner scan = new Scanner(System.in);
int hash = 2000000;
int n = scan.nextInt();
int memory[] = new int[hash];
... | Main.java:28: error: ')' or ',' expected
list.remove((Integer)num;
^
1 error
|
s814213402 | p02265 | Java |
import java.util.ArrayDeque;
import java.util.Scanner;
public class Main {
public static void main(String [] args){
ArrayDeque<Integer> list = new ArrayDeque<Integer>();
Scanner scanner = new Scanner(System.in);
int n = Integer.parseInt(scanner.nextLine());
String str;
for(int i=0; i<n; i++){
s... | Main.java:20: error: unclosed character literal
}else if(str.charAt(6) == 'f''){
^
Main.java:22: error: 'else' without 'if'
}else{
^
2 errors
|
s885370041 | p02265 | Java | import java.io.*;
import java.util.*;
public class Main
{
public static void main(String[] args)
{
// LinkedList<Integer> list = new LinkedList<Integer>();
Scanner scan = new Scanner(System.in);
// int hash = 20000000;
int n = scan.nextInt();
// int memory[] = new int[hash]... | Main.java:33: error: cannot find symbol
list.remove((integer)scan.nextInt());
^
symbol: class integer
location: class Main
1 error
|
s434886891 | p02265 | Java | import java.io.*;
import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
Deque<Integer> list = new ArrayDeque<Integer>();
int num;
for(int i=0; i<n; i++)
{
String... | Main.java:20: error: : or -> expected
case 'd'
^
1 error
|
s165029008 | p02265 | Java | import java.io.*;
import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
Deque<Integer> list = new ArrayDeque<Integer>();
int num;
for(int i=0; i<n; i++)
{
String... | Main.java:15: error: cannot find symbol
switch(command.chatAt(1))
^
symbol: method chatAt(int)
location: variable command of type String
Main.java:21: error: cannot find symbol
switch(command.chatAt(6))
^
symbol: metho... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.