submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s158661761 | 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;
tail++;
if(tail==LEN){
tail=1;
}
}
P dequeue(){
if(head==LEN){
head=1;
}
head++;
}
int main(){
int elaps = 0, c;
int i, q;
//P u;
... | main.c: In function 'main':
main.c:35:1: error: stray '\343' in program
35 | <U+3000>c=1;
| ^~~~~~~~
|
s490814907 | 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;
int noelm(void);
void enqueue(P);
P dequeue(void);
int moelm(void){
if(head == tail) return 1;
else retrun 1;
}
void enqueue(P x){
Q[tail]=x;
if(tail != LEN)tail++;
e... | main.c: In function 'moelm':
main.c:20:8: error: 'retrun' undeclared (first use in this function)
20 | else retrun 1;
| ^~~~~~
main.c:20:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:14: error: expected ';' before numeric constant
20 | else re... |
s168172624 | 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=0, tail, n;
void enqueue(P x){
strcpy( Q[tail].name,x.name);
Q[tail].t=x.t;
tail++;
}
int main(){
int elaps = 0, c;
int i, q,l=0;
scanf("%d %d", &n, &q);
tail=n+1;
for ( i ... | main.c: In function 'main':
main.c:44:15: error: 'brea' undeclared (first use in this function)
44 | if(l==n)brea }
| ^~~~
main.c:44:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:44:19: error: expected ';' before '}' token
44 | ... |
s347283309 | p02264 | C | File Edit Options Buffers Tools C Help
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define LEN 100005
typedef struct pp{
char name[15];
int t;
}P;
P Q[LEN+1];
int head=0, tail, n;
void enqueue(P x){
strcpy( Q[tail].name,x.name);
Q[tail].t=x.t;
tail++;
}
int main(){
int elaps = 0, c;
int i, q,l... | main.c:1:1: error: unknown type name 'File'
1 | File Edit Options Buffers Tools C Help
| ^~~~
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Options'
1 | File Edit Options Buffers Tools C Help
| ^~~~~~~
main.c:1:11: error: unknown type name 'Options'
In file i... |
s276687415 | p02264 | C | int sum=0, tail=0, n,c=0;
void enqueue(int,int);
int main(){
int i, q;
scanf("%d%d",&n,&q);
tail = n;
for ( i = 1; i <= n; i++){
scanf("%s", Q[i].name);
scanf("%d", &Q[i].t);
}
i=1;
while(c < n)
{
enqueue(q,i);
i++;
}
return 0;
}
void enqueue(int q,int i)
{
int y;
y... | main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
7 | scanf("%d%d",&n,&q);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int sum=0, tail=0, n,c=0;
main.c:7:3: warn... |
s430725524 | 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==LEN+1) tail=1;
else tail++;
}
P dequeue(){
N x;
x=Q[head];
if(head+1==LEN+1)head=1;
else head++;
return x;
}
int main(){... | main.c: In function 'dequeue':
main.c:21:3: error: unknown type name 'N'
21 | N x;
| ^
main.c:22:5: error: incompatible types when assigning to type 'int' from type 'P' {aka 'struct pp'}
22 | x=Q[head];
| ^
main.c:25:10: error: incompatible types when returning type 'int' but 'P' {aka 'struc... |
s516215751 | p02264 | C | #include<stdio.h>
#include<string.h>
#define LEN 100005
int min(int a, int b) {return a < b ? a : b;}
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==LEN)tail=1;
else tail++;
}
P dequeue(){
P x =Q[head];
if(head==LEN)head=1;
else head++;
return x... | main.c: In function 'main':
main.c:29:13: error: expected expression before ',' token
29 | int elaps=0;,c,i,q;
| ^
main.c:29:14: error: 'c' undeclared (first use in this function)
29 | int elaps=0;,c,i,q;
| ^
main.c:29:14: note: each undeclared identifier is reported only once... |
s918355517 | 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;
tail++;
}
P dequeue(){
++head;
return Q[head];
}
int main(){
int elaps = 0;
int i, q = 0;
P u;
scanf("%d %d", &n, &q);
for ( ... | main.c: In function 'main':
main.c:45:1: error: expected declaration or statement at end of input
45 | }
| ^
|
s113518167 | 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;
tail++;
}
P dequeue(){
++head;
return Q[head];
}
int main(){
int elaps = 0;
int i, q = 0;
P u;
scanf("%d %d", &n, &q);
for ( ... | main.c: In function 'main':
main.c:51:1: error: expected declaration or statement at end of input
51 | }
| ^
|
s568984830 | p02264 | C | #include<stdio.h>
#include<string.h>
#define LEN 100005
int min(int a, int b){return a<b?a:b;}
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 == LEN) tail = 1;
else tail++;
}
P dequeue(){
P x = Q[head];
if(head==LEN) head = 1;
else h... | main.c: In function 'main':
main.c:46:7: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
46 | pritnf("%s %d\n",u.name,elaps);
| ^~~~~~
| printf
|
s603537091 | 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;
tail++;
if(LEN < tail) tail = 0;
return x;
}
P dequeue(){
P x;
x = Q[head];
head++;
if(LEN < head) head = 0;
return x;
}
int ... | main.c: In function 'enqueue':
main.c:18:10: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
18 | return x;
| ^
main.c:13:6: note: declared here
13 | void enqueue(P x){
| ^~~~~~~
main.c: In function 'main':
main.c:50:7: error: implicit declaration of functi... |
s207081341 | p02264 | C | #include <stdio.h>
#include <stdlib.h>
void push(int);
int pop();
int isempty();
int dtoi(char);
void print_stack();
int stack[max+1],p;
main()
{
char c;
p = 0;
printf("Input data by Reverse Polish Notation: ");
for(;c != '\n';){
c = getchar();
if(c >= '1' && c <= '9'){
push(dtoi(c));... | main.c:10:11: error: 'max' undeclared here (not in a function)
10 | int stack[max+1],p;
| ^~~
main.c:12:1: error: return type defaults to 'int' [-Wimplicit-int]
12 | main()
| ^~~~
|
s649953436 | p02264 | C | #include <stdio.h>
#include <stdlib.h>
void push(int);
int pop();
int isempty();
int dtoi(char);
void print_stack();
int stack[max+1],p;
main()
{
char c;
p = 0;
printf("Input data by Reverse Polish Notation: ");
for(;c != '\n';){
c = getchar();
if(c >= '1' && c <= '9'){
push(dtoi(c));... | main.c:10:11: error: 'max' undeclared here (not in a function)
10 | int stack[max+1],p;
| ^~~
main.c:12:1: error: return type defaults to 'int' [-Wimplicit-int]
12 | main()
| ^~~~
|
s218532945 | p02264 | C | #include <stdio.h>
#include <stdlib.h>
void push(int);
int pop();
int isempty();
int dtoi(char);
void print_stack();
int stack[max+1],p;
int main()
{
char c;
p = 0;
printf("Input data by Reverse Polish Notation: ");
for(;c != '\n';){
c = getchar();
if(c >= '1' && c <= '9'){
push(dtoi(... | main.c:10:11: error: 'max' undeclared here (not in a function)
10 | int stack[max+1],p;
| ^~~
|
s346785179 | p02264 | C | #include<stdio.h>
#include<string.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
}P;
void enqueue(P);
P dequeue();
P Q[LEN+1];
int head=0, tail=0, n;
void enqueue(P x){
if(tail == n) tail=1;
else tail +=1;
Q[tail] = x;
}
P dequeue(){
if(head == n) head=1;
else head++;
}
int main(){... | main.c:59:16: error: redefinition of 'struct pp'
59 | typedef struct pp{
| ^~
main.c:5:16: note: originally defined here
5 | typedef struct pp{
| ^~
main.c:62:2: error: conflicting types for 'P'; have 'struct pp'
62 | }P;
| ^
main.c:8:2: note: previous declarat... |
s463858416 | p02264 | C | #include<stdio.h>
#include<string.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
}P;
void enqueue(P);
P dequeue();
P Q[LEN+1];
int head=0, tail=0, n;
void enqueue(P x){
if(tail == n) tail=1;
else tail +=1;
Q[tail] = x;
}
P dequeue(){
if(head == n) head=1;
else head++;
}
int main(){... | main.c:59:16: error: redefinition of 'struct pp'
59 | typedef struct pp{
| ^~
main.c:5:16: note: originally defined here
5 | typedef struct pp{
| ^~
main.c:62:2: error: conflicting types for 'P'; have 'struct pp'
62 | }P;
| ^
main.c:8:2: note: previous declarat... |
s811365196 | p02264 | C | #include<stdio.h>
#include<string.h>
int main(){
int i,ko,kuontamu,time[50000],j=0,goukei=0,dai2;
char s[50001][10];
scanf("%d%d",&ko,&kuontamu);
for(i=0;i<ko;i++){
scanf("%s%d",&s[i][0],&time[i]);
}
while(1){
time[j]-=kuontamu;
if(time[j]<=0){
goukei+=(kuontamu+time[j]);
time[j]=gou... | main.c: In function 'main':
main.c:31:3: error: expected declaration or statement at end of input
31 | return 0;
| ^~~~~~
|
s983819854 | p02264 | C++ | #include<stdio.h>
#include<string.h>
#define LEN 10005
typedef struct pp{
char mane[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){ return a < b ? a : b; }
int ma... | a.cc: In function 'int main()':
a.cc:32:34: error: 'P' {aka 'struct pp'} has no member named 'name'
32 | scanf("%s", Q[i].name);
| ^~~~
a.cc:44:44: error: 'P' {aka 'struct pp'} has no member named 'name'
44 | printf("%s %d\n",u.name,el... |
s228398857 | p02264 | C++ |
include <stdio.h>
#define MAX_N 100002
typedef struct { char *p; int tm; } Q;
Q que[(MAX_N<<1)+2]; int top, end;
char name[MAX_N][20];
char buf[20], *p;
int in()
{
int n = 0;
while (*p >= '0') n = 10*n + (*p++ & 0xf);
p++;
return n;
}
int main()
{
int n, q, tm, i;
Q t;
fgets(p=buf, 20, stdin);
n = in(),... | a.cc:55:75: error: invalid digit "9" in octal constant
55 | Judge: 10/10 C CPU: 00:00 sec Memory: 4224 KB Length: 776 B 2018-04-30 11:09
| ^~
a.cc:57:6: error: stray '#' in program
57 | Case # Verdict CPU Time Memory In Out Case Name
... |
s477892279 | p02264 | C++ | (パチーン)
話をしよう、あれは今から36万・・・いや、1万4000年前だったか、
まぁいい、私にとってはつい昨日の出来事だが、君たちにとっては多分明日の出来事だ
彼には72通りの名前があるから、なんて呼べばいいのか
確か最初に会ったときは、イーノック、そうあいつは最初から言う事を聞かなかった。
私の言うとおりにしておけばな、まぁいいやつだったよ
そんな装備で大丈夫か
大丈夫だ、問題ない
(うめき声)ウゥッ!?ウェッ!?ウォッ!?
神は言っている―――ここで死ぬ定めではないと―――
イーノック、そんな装備で大丈夫か?
一番いいのを頼む
(ドヤ顔)
神は言っている―――全てを救えと―――
やぁ、私のサポートが心配なのか?
い... | a.cc:2:1: error: extended character 、 is not valid in an identifier
2 | 話をしよう、あれは今から36万・・・いや、1万4000年前だったか、
| ^
a.cc:2:1: error: extended character 、 is not valid in an identifier
a.cc:2:1: error: extended character 、 is not valid in an identifier
a.cc:3:1: error: extended character 、 is not valid in an identi... |
s695613012 | p02264 | C++ | #include<bits/stdc++.h>
using namespace std;
struct pro{string x;int y;};
int main(){
int n,time = 0,rim,sougo = 0;
cin>>n>>rim;
pro aho[n];
aho[n].y = ;
pro v;
for(int i = 0;i<n;i++){
cin>>aho[i].x>>aho[i].y;
}
for(int i = 0;i<n;i++){
sougo += aho[i].y;
}
int i = 0;
while(time<=sougo && i<n){
if(aho[... | a.cc: In function 'int main()':
a.cc:8:20: error: expected primary-expression before ';' token
8 | aho[n].y = ;
| ^
|
s987301745 | p02264 | C++ | a
| a.cc:1:1: error: 'a' does not name a type
1 | a
| ^
|
s704380023 | p02264 | C++ | #include <iostream>
#include <string>
#include <stdio.h>
#include <cstdlib>
using namespace std;
int LEN = 1000000;
struct P{
char name[100];
int time;
};
P Q[MAX];
int head = 0;
int tail = 0;
void enqueue(P x){
Q[tail] = x;
tail = (tail + 1) % LEN;
}
P dequeue(){
P x = Q[head];
head = (head + 1) % LEN... | a.cc:14:5: error: 'MAX' was not declared in this scope
14 | P Q[MAX];
| ^~~
a.cc: In function 'void enqueue(P)':
a.cc:19:3: error: 'Q' was not declared in this scope
19 | Q[tail] = x;
| ^
a.cc: In function 'P dequeue()':
a.cc:24:9: error: 'Q' was not declared in this scope
24 | P x = Q[he... |
s420766345 | p02264 | C++ | #include <iostream>
#include <string>
#include <queue>
using namespace std;
int n,q;
pair<string,int> process,temp;
queue<pair<string,int>> Q;
void solve()
{
int time=0;
while(!Q.empty())
{
temp=Q.front();Q.pop();
if(temp.second<=q)
{
time+=temp.second;
cout<... | a.cc: In function 'int main()':
a.cc:34:24: error: 'struct std::pair<std::__cxx11::basic_string<char>, int>' has no member named 'firs'; did you mean 'first'?
34 | cin >> process.firs t>> process.second;
| ^~~~
| first
|
s296846224 | p02264 | C++ | #include <string>
#include <stack>
#include <stdlib.h>
#include <iostream>
#include <queue>
#include <utility>
using namespace std;
int main()
{
cin>>n>>q;
for(int i=0;i<n;i++)
{
cin>>process1.first>>process1.second;
Q.push(process1);
}
while(!Q.empty())
{
process1=Q.fro... | a.cc: In function 'int main()':
a.cc:11:10: error: 'n' was not declared in this scope
11 | cin>>n>>q;
| ^
a.cc:11:13: error: 'q' was not declared in this scope
11 | cin>>n>>q;
| ^
a.cc:14:14: error: 'process1' was not declared in this scope
14 | cin>>process1.fi... |
s587176016 | p02264 | C++ | #include <string>
#include <stack>
#include <stdlib.h>
#include <iostream>
#include <queue>
#include <utility>
using namespace std;
#if 0
queue<pair<string, int>>はダメです。queue<pair<string, int> >の中の’’は必要です。
#endif
pair<string, int> process;
queue<pair<string, int> > Q;
int main()
{
int j = 0, times = 0;
int n, q;
... | a.cc:11:25: error: extended character 。 is not valid in an identifier
11 | queue<pair<string, int>>はダメです。queue<pair<string, int> >の中の’’は必要です。
| ^
a.cc:11:62: error: extended character ’ is not valid in an identifier
11 | queue<pair<string, int>>はダメです。queue<pair<string, int> >の中の’’は必要... |
s920368075 | p02264 | C++ | 3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<stdio.h>
#include<stack>
#include<queue>
#include<stdlib.h>
#define LEN 100005
using namespace std;
int ma... | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 3
| ^
In file included from /usr/include/c++/14/iosfwd:42,
from /usr/include/c++/14/ios:40,
from /usr/include/c++/14/ostream:40,
from /usr/include/c++/14/iostream:41,
from a... |
s829045142 | p02264 | C++ | #include<iostream>
#include<queue>
#include<string>
using namespace std;
int main(){
int n,q,t;
string name;
queue<pair<string,int>>Q;
cin>>n>>q;
for(int i=0;i<n;i++){
cin>>name>>t;
Q.push(make_pair(name,t));
}
pair<string,int>u;
int elaps=0,a;
while(!Q=empty()){
... | a.cc: In function 'int main()':
a.cc:17:11: error: no match for 'operator!' (operand type is 'std::queue<std::pair<std::__cxx11::basic_string<char>, int> >')
17 | while(!Q=empty()){
| ^~
a.cc:17:11: note: candidate: 'operator!(bool)' (built-in)
a.cc:17:11: note: no known conversion for argument... |
s476682005 | p02264 | C++ | #include<iostream>
#include<queue>
#include<string>
using namespace std;
int main(){
int n,q,t;
string name;
queue<pair<string,int> >Q;
cin>>n>>q;
for(int i=0;i<n;i++){
cin>>name>>t;
Q.push(make_pair(name,t));
}
pair<string,int>u;
int elaps=0,a;
while(!Q=empty()){
... | a.cc: In function 'int main()':
a.cc:17:11: error: no match for 'operator!' (operand type is 'std::queue<std::pair<std::__cxx11::basic_string<char>, int> >')
17 | while(!Q=empty()){
| ^~
a.cc:17:11: note: candidate: 'operator!(bool)' (built-in)
a.cc:17:11: note: no known conversion for argument... |
s090717562 | p02264 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,q,y;
string x;
cin >> n >> q;
queue<pair<string,int> > a;
pair<string,int> b;
for(int i=0;i<n;i++){
cin >> b.first >> b.second;
a.push(b);
}
while(! a.empty()){
if(a.front().second<=q){
cout << a.front().first << ' ' << a.... | a.cc: In function 'int main()':
a.cc:16:38: error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '__gnu_cxx::__alloc_traits<std::allocator<std::pair<std::__cxx11::basic_string<char>, int> >, std::pair<std::__cxx11::basic_string<char>, int> >::value_type' {aka 'std::pair<std::__cxx11::basic... |
s019287174 | p02264 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,q,y;
string x;
cin >> n >> q;
queue<pair<string,int> > a;
pair<string,int> b;
for(int i=0;i<n;i++){
cin >> b.first >> b.second;
a.push(b);
}
while(! a.empty()){
b=a.front();
if(b.second<=q){
b=a
cout << b.first <... | a.cc: In function 'int main()':
a.cc:17:9: error: no match for 'operator=' (operand types are 'std::pair<std::__cxx11::basic_string<char>, int>' and 'std::queue<std::pair<std::__cxx11::basic_string<char>, int> >')
17 | b=a
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
... |
s802954199 | p02264 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,q,y;
string x;
cin >> n >> q;
queue<pair<string,int> > a;
pair<string,int> b;
for(int i=0;i<n;i++){
cin >> b.first >> b.second;
a.push(b);
}
while(! a.empty()){
b=a.front();
if(b.second<=q){
cout << b.first << ' ' << b... | a.cc: In function 'int main()':
a.cc:21:9: error: 'struct std::pair<std::__cxx11::basic_string<char>, int>' has no member named 'secoond'; did you mean 'second'?
21 | b.secoond=b.second-q;
| ^~~~~~~
| second
|
s485687989 | p02264 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,q,y,t;
string x;
cin >> n >> q;
queue<pair<string,int> > a;
pair<string,int> b;
for(int i=0;i<n;i++){
cin >> b.first >> b.second;
a.push(b);
}
while(! a.empty()){
b=a.front();
if(b.second<=q){
t+=b.second;
cout <... | a.cc: In function 'int main()':
a.cc:25:11: error: expected ';' before '}' token
25 | t+=q
| ^
| ;
26 | }
| ~
|
s588997543 | p02264 | C++ | #include <algorithm>
#include <iostream>
#include <vector>
int main(){
int n, q;
std::cin >> n >> q;
std::vector<std::string> names(n);
std::vector<int> times(n);
std::vector<bool> flags(n, false);
int val, buf, totalTime = 0;
for(int i = 0; i < n; ++i){
std::cin >> names.at(i) >> ... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/algorithm:60,
from a.cc:1:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_equals_val<_Value>::operator()(_Iterator) [with _Iterator = __gnu_cxx::__no... |
s162212114 | p02264 | C++ | #include <algorithm>
#include <iostream>
#include <vector>
int main(){
int n, q;
std::cin >> n >> q;
std::vector<std::string> names(n);
std::vector<int> times(n);
int val, buf, totalTime = 0;
for(int i = 0; i < n; ++i){
std::cin >> names.at(i) >> val;
buf = std::min(q, val);
... | In file included from /usr/include/c++/14/bits/stl_algobase.h:71,
from /usr/include/c++/14/algorithm:60,
from a.cc:1:
/usr/include/c++/14/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_equals_val<_Value>::operator()(_Iterator) [with _Iterator = __gnu_cxx::__no... |
s219831528 | p02264 | C++ | //#include <algorithm>
#include <iostream>
#include <vector>
int main(){
int n, q;
std::cin >> n >> q;
std::vector<std::string> names(n);
std::vector<int> times(n);
int val, buf, totalTime = 0;
for(int i = 0; i < n; ++i){
std::cin >> names.at(i) >> val;
buf = std::min(q, val);
... | a.cc: In function 'int main()':
a.cc:23:51: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, main()::<lambda(int)>)'
23 | std::vector<int>::iterator itr = std::find(times.begin(), times.end(), [] (int elem) {return 0 != elem;});
| ... |
s885523093 | p02264 | C++ | #include<iostream>
#include<queue>
using namespace std;
struct process{
char name[11];
int time;
process(char n[], int t){strcpy(name, n); time = t;}
};
int main(){
char nm[11];
int i, n, t, q, t_elapsed = 0;
int *tp;
queue<process> prcs;
cin >> n >> q;
for(i=0;i<n;i++){
cin >> nm >> t;
prcs.push(proces... | a.cc: In constructor 'process::process(char*, int)':
a.cc:7:34: error: 'strcpy' was not declared in this scope
7 | process(char n[], int t){strcpy(name, n); time = t;}
| ^~~~~~
a.cc:3:1: note: 'strcpy' is defined in header '<cstring>'; this is probably fixable by addin... |
s547029561 | 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;
return x;
}
int min(int a,int b){return a<b?a:b;}
int main(){
int elaps=0,c;
int i,q;
P u;
scanf("%d %d",&n,&q);
for(i=1;i<=n;i++){
sc... | a.cc:41:8: warning: missing terminating " character
41 | printf("%s %d\n,u.name,elaps):
| ^
a.cc:41:8: error: missing terminating " character
41 | printf("%s %d\n,u.name,elaps):
| ^~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'void enqueue(P)':
a.cc:17:8: error: return-statement with a value... |
s071101335 | p02264 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>
using namespace std;
#define ll long long
#define vvi vector< vector<int> >
#define All(X) X.begin(),X.end()
#define FO... | a.cc: In function 'int main()':
a.cc:37:29: error: invalid use of member function 'std::queue<std::pair<std::__cxx11::basic_string<char>, int> >::front' (did you forget the '()' ?)
37 | int tmp = Q.front.second;
| ~~^~~~~
a.cc:40:35: error: invalid use of member functi... |
s053580948 | p02264 | C++ | #include <cstdio>
typedef struct{
char name[10];
int time;
}QUEUE;
QUEUE q[100000];
int head, tail;
void enqueue(char *name, int time){
int len = strlen(name);
for(int i = 0; i < len; i++){
q[tail].name[i] = name[i];
}
q[tail].time = time;
tail = (tail+1) % 100000;
}
QUEUE *dequeue(){
head = (head + 1) % ... | a.cc: In function 'void enqueue(char*, int)':
a.cc:12:19: error: 'strlen' was not declared in this scope
12 | int len = strlen(name);
| ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include <cstdio>
... |
s061940159 | p02264 | C++ | e | a.cc:1:1: error: 'e' does not name a type
1 | e
| ^
|
s100603840 | p02264 | C++ | //できるだけ単純に実装する
//c++での文字列の扱い方も難しい.
//c++でも文字列を扱うときはchar[]を使った方がなにをやってるか
//明確になるのでバグも減るかも
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
#include <vector>
#include <string>
#define LEN 100005
using namespace std;
//new演算子の役割は動的確保を行うこと
/*通常のキュー
class Queue{
private:
vector<string> s_v;
vector<int> t_v;
pu... | a.cc: In function 'int main()':
a.cc:123:13: error: expected primary-expression before 'while'
123 | for(while true){
| ^~~~~
a.cc:139:9: error: expected primary-expression before 'return'
139 | return 0;
| ^~~~~~
a.cc:137:10: error: expected ';' before 'return'
137... |
s968384394 | p02264 | C++ | #include<string>
#include<iostream>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<queue>
#include<algorithm>
using namespace std;
struct PAIR {
string first;
int second;
};
int main(){
int number;
scanf("%d",&number);
int qu;
scanf("%d",&qu);
queue<PAIR> Q;
string name;
int t;
for(i... | a.cc: In function 'int main()':
a.cc:38:38: error: 'struct PAIR' has no member named 'seond'; did you mean 'second'?
38 | int elapse=c.seond+time
| ^~~~~
| second
|
s245051215 | p02264 | C++ | #include<string>
#include<iostream>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<queue>
#include<algorithm>
using namespace std;
struct PAIR {
string first;
int second;
};
int main(){
int number;
scanf("%d",&number);
int qu;
scanf("%d",&qu);
queue<PAIR> Q;
string name;
int t;
for(i... | a.cc: In function 'int main()':
a.cc:39:25: error: expected ',' or ';' before 'cout'
39 | cout <<c.first<<" "<< elapse << endl;
| ^~~~
|
s342867880 | p02264 | C++ | #include <iostream>
#include <string>
using namespace std;
struct Process {
string name;
int time;
};
const int LEN = 100005;
Process p_queue[LEN];
int head, tail, n;
void enqueue(Process p) {
p_queue[tail] = p;
tail = (tail + 1 ) % LEN;
}
Process dequeue() {
Process p = p_queue[head];
head = (head + 1... | a.cc: In function 'int main()':
a.cc:28:23: error: redeclaration of 'int i'
28 | int total_time = 0, i;
| ^
a.cc:27:7: note: 'int i' previously declared here
27 | int i, q;
| ^
a.cc:48:5: error: 'c' was not declared in this scope
48 | c = min(q, u.t);
| ... |
s403381864 | p02264 | C++ | #include <iostream>
#include <string>
using namespace std;
struct Process {
string name;
int time;
};
const int LEN = 100005;
Process p_queue[LEN];
int head, tail, n;
void enqueue(Process p) {
p_queue[tail] = p;
tail = (tail + 1 ) % LEN;
}
Process dequeue() {
Process p = p_queue[head];
head = (head + 1... | a.cc: In function 'int main()':
a.cc:52:5: error: 'c' was not declared in this scope
52 | c = min(q, u.t);
| ^
a.cc:52:18: error: 'struct Process' has no member named 't'
52 | c = min(q, u.t);
| ^
a.cc:53:7: error: 'struct Process' has no member named 't'
53 | u.t -... |
s851107929 | p02264 | C++ | #include <iostream>
#include <string>
using namespace std;
struct Process {
string name;
int time;
};
const int LEN = 100005;
Process p_queue[LEN];
int head, tail, n;
void enqueue(Process p) {
p_queue[tail] = p;
tail = (tail + 1 ) % LEN;
}
Process dequeue() {
Process p = p_queue[head];
head = (head + 1... | a.cc: In function 'int main()':
a.cc:52:18: error: 'struct Process' has no member named 't'
52 | c = min(q, u.t);
| ^
a.cc:53:7: error: 'struct Process' has no member named 't'
53 | u.t -= c;
| ^
a.cc:55:11: error: 'struct Process' has no member named 't'
55 | if ... |
s592048098 | p02264 | C++ | #include <iostream>
#include <string>
using namespace std;
struct Process {
string name;
int t;
};
const int LEN = 100005;
Process p_queue[LEN];
int head, tail, n;
void enqueue(Process p) {
p_queue[tail] = p;
tail = (tail + 1 ) % LEN;
}
Process dequeue() {
Process p = p_queue[head];
head = (head + 1) %... | a.cc: In function 'int main()':
a.cc:45:16: error: 'struct Process' has no member named 'time'
45 | p_queue[i].time = time;
| ^~~~
|
s159872354 | p02264 | C++ | #include<bits/stdc++.h>
using namespace std;
int main()
{
cin.tie(0);
ios::ios_base::sync_with_stdio(false);
int taskam, q, time = 0;
cin >> taskam >> q;
for (int i = 0; i < taskam; ++i) {
string name;
int thistask;
cin >> name >> thistask;
if (thistask <= q) {
time += thistask;
cout << name << " "... | a.cc: In function 'int main()':
a.cc:20:17: error: 'tasks' was not declared in this scope; did you mean 'taskam'?
20 | tasks.emplace(make_pair(name, thistask-q));
| ^~~~~
| taskam
a.cc:22:17: error: 'tasks' was not declared in this scope; did you mean 'task... |
s321698467 | p02264 | C++ | #include<iostream>
#include<string>
#include<utility>
#include<algorithm>
#include<queue>
using namespace std;
int main()
{
cin.tie(0);
ios::ios_base::sync_with_stdio(false);
int taskam, q, time = 0;
cin >> taskam >> q;
for (int i = 0; i < taskam; ++i) {
string name;
int thistask;
cin >> name >> thistask;
... | a.cc: In function 'int main()':
a.cc:24:17: error: 'tasks' was not declared in this scope; did you mean 'taskam'?
24 | tasks.emplace(make_pair(name, thistask-q));
| ^~~~~
| taskam
a.cc:26:17: error: 'tasks' was not declared in this scope; did you mean 'task... |
s466043245 | p02264 | C++ |
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int p = sc.nextInt();
ArrayList<Process> ar = new ArrayList<Process>();
ArrayList<Process> result = new ArrayList<Process>();
for (int i = 0; i < n; i++) {
ar.add(new Process(sc.next(),sc.nextInt... | a.cc:3:9: error: expected unqualified-id before 'public'
3 | public static void main(String[] args) {
| ^~~~~~
|
s026778971 | p02264 | C++ | N_str, q_str = raw_input().spilit()
N = int(N_str)
q = int (q_str)
A =[]
B =[]
total =0
for i in N:
t = raw_input().spilit()
A.append(t[0],int(t[1]))
while A:
name, time = A.pop(0)
if time < q:
total += time
B.append(name, time)
else:
time -= q
total += q
... | a.cc:1:1: error: 'N_str' does not name a type
1 | N_str, q_str = raw_input().spilit()
| ^~~~~
|
s316283495 | p02264 | C++ | #include <iostream>
#include <vector>
#include <string>
#include <queue>
int main(){
int n, q;
std::queue<std::pair<std::string, int> >qu;
std::string name;
int num, sum = 0;
std::cin >> n >> q;
for (int i = 0; i < n; i++){
std::cin >> name >> num;
if (num <= q){
sum += num;
std::cout << name << ... | a.cc: In function 'int main()':
a.cc:31:63: error: invalid use of non-static member function 'void std::queue<_Tp, _Sequence>::pop() [with _Tp = std::pair<std::__cxx11::basic_string<char>, int>; _Sequence = std::deque<std::pair<std::__cxx11::basic_string<char>, int>, std::allocator<std::pair<std::__cxx11::basic_string<... |
s650082284 | p02264 | C++ | #include <queue>
#include <utility>
#include <string>
#include <iostream>
using namespace std;
int main(){
pair<string, int> schedule;
queue<pair <string, int> > Q;
int total;
int n,q;
cin >> n >> q;
for(int i=0;i<n;i++){
string s;
int ms;
cin >> s >> ms;
schedu... | a.cc: In function 'int main()':
a.cc:22:28: error: expression cannot be used as a function
22 | if(Q.front().second()<=q){
| ~~~~~~~~~~~~~~~~^~
a.cc:23:38: error: expression cannot be used as a function
23 | total += Q.front().second();
| ~~~~~~~~~~~... |
s521943850 | p02264 | C++ | #include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cstdlib>
#include <map>
#include <set>
#include <stack>
#include <queue>
using namespace std;
#define pb(n) push_back(n)... | a.cc: In function 'int main()':
a.cc:57:25: error: no matching function for call to 'std::queue<std::pair<int, std::__cxx11::basic_string<char> > >::push()'
57 | que.push();
| ~~~~~~~~^~
In file included from /usr/include/c++/14/queue:66,
from a.cc:15:
/usr/incl... |
s215811888 | p02264 | C++ | #include <algorithm>
#include <iostream>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <cmath>
#include <functional>
#include <cassert>
#include <iomanip>
#include <array>
#include <time.h>
#include <limits.h>
#pragma comment(lib, "winmm.lib")
#defin... | a.cc: In function 'void CheckQueue(std::queue<task>)':
a.cc:31:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
31 | printf_s("check start---\n");
| ^~~~~~~~
| printf
|
s733488161 | p02264 | C++ | #include <algorithm>
#include <iostream>
#include <fstream>
#include <cstdio>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <cmath>
#include <functional>
#include <cassert>
#include <iomanip>
#include <array>
#include <time.h>
#include <limits.h>
#pragma comment(lib, "winmm.lib")
#defin... | a.cc: In function 'void CheckQueue(std::queue<task>)':
a.cc:31:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
31 | printf_s("check start---\n");
| ^~~~~~~~
| printf
|
s066810684 | p02264 | C++ | import collections
n, q = map(int, input().split())
q_list = collections.deque()
for i in range(n):
name, time = input().split()
q_list.append([name, int(time)])
time = 0
while q_list:
if q_list[0][1] == 0:
q_list.popleft()
elif q_list[0][1] == 100:
time += 100
print (q_list[0][... | a.cc:1:1: error: 'import' does not name a type
1 | import collections
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
|
s640910676 | p02264 | C++ | #include <string>
#include <queue>
using namespace std;
struct process {
string name;
int time;
};
int main()
{
int n, q;
int name, time, total = 0;
process tmp;
queue<process> qu;
cin >> n >> q;
for ( int i = 0; i < n; ++i ) {
cin >> tmp.name >> tmp.time;
qu.push(tm... | a.cc: In function 'int main()':
a.cc:18:5: error: 'cin' was not declared in this scope
18 | cin >> n >> q;
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
2 | #include <queue>
+++ |+#include <iostream>
3 |
a.cc:31:1... |
s975113023 | p02264 | C++ | #include <iostream>
#include <list>
#include <string>
using namespace std;
class Task {
public:
void input() {
cin >> name >> time;
}
string name;
int time;
}
int main() {
int n, q;
list<Task&> tasks;
cin >> n >> q;
for (int i=0; i<n; i++) {
auto task = Task;
task.input();
tasks.push_... | a.cc:13:2: error: expected ';' after class definition
13 | }
| ^
| ;
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/c++allocator.h:33,
from /usr/include/c++/14/bits/allocator.h:46,
from /usr/include/c++/14/string:43,
from /usr/include/... |
s627282725 | p02264 | C++ | #include <iostream>
#include <list>
#include <string>
using namespace std;
class Task {
public:
void input() {
cin >> name >> time;
}
string name;
int time;
}
int main() {
int n, q;
list<Task&> tasks;
cin >> n >> q;
for (int i=0; i<n; i++) {
auto task = Task;
task.input();
tasks.push_... | a.cc:13:2: error: expected ';' after class definition
13 | }
| ^
| ;
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/c++allocator.h:33,
from /usr/include/c++/14/bits/allocator.h:46,
from /usr/include/c++/14/string:43,
from /usr/include/... |
s482345469 | p02264 | C++ | #include <iostream>
#include <list>
#include <string>
using namespace std;
class Task {
public:
void input() {
cin >> name >> time;
}
string name;
int time;
};
int main() {
int n, q;
list<Task> tasks;
cin >> n >> q;
for (int i=0; i<n; i++) {
auto task = Task;
task.input();
tasks.pu... | a.cc: In function 'int main()':
a.cc:21:21: error: expected primary-expression before ';' token
21 | auto task = Task;
| ^
a.cc:32:19: error: no matching function for call to 'std::__cxx11::list<Task>::splice(<unresolved overloaded function type>, std::__cxx11::list<Task>&, std::__cxx11... |
s618984812 | p02264 | C++ | #include <iostream>
#include <queue>
#include <string>
using namespace std;
class Task {
public:
void input() {
cin >> name >> time;
}
string name;
int time;
};
int main() {
int n, q;
queue<Task> tasks;
cin >> n >> q;
for (int i=0; i<n; i++) {
auto task = Task();
task.input();
t... | a.cc: In function 'int main()':
a.cc:28:16: error: missing template arguments before '.' token
28 | while (!queue.empty) {
| ^
a.cc:29:24: error: missing template arguments before '.' token
29 | auto currnt = queue.front(); queue.pop();
| ^
a.cc:29:39: error... |
s393262638 | p02264 | C++ | #include<iostream>
#include<cstdlib>
#include<climits>
using namespace std;
struct process{
char name[11];
int time;
};
const long LEN=100000;
class queue {
process data[LEN];
int head, tail;
public:
queue(): head(0), tail(0) {} //
void enqueue(const process&);
process dequeue();
bool isEmpty();
bool isFul... | a.cc:88:2: error: expected unqualified-id before '?' token
88 | }???
| ^
|
s212021995 | p02264 | C++ | include<iostream>
#include<string>
#include<queue>
#include<algorithm>
using namespace std;
int main(){
int n,q,t;
string name;
queue<pair<string,int> >Q;
cin>>n>>q;
for(int i=0;i<n;i++){
cin>>name>>t;
Q.push(make_pair(name,t));
}
pair<string,int>u;
int elaps=0,a;
while(!Q.empty()){
u=... | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
In file included from /usr/include/c++/14/bits/char_traits.h:42,
from /usr/include/c++/14/string:42,
from a.cc:2:
/usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type... |
s586407560 | p02264 | C++ | #include <iostream>
#include <cstdio>
#define MAX 100000
using namespace std;
char name[MAX][10];
int task[MAX];
int quantum; //ms
int n;
int time;
int main(void){
int i;
int count=0; //?????§??£?¶?????????????????????????????????°
int clock=0;
scanf("%d %d",&n,&quantum);
for(i=0;i<n;i++){
scanf("%s %d",&nam... | a.cc:10:5: error: 'int time' redeclared as different kind of entity
10 | int time;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
... |
s760826686 | p02264 | C++ | a | a.cc:1:1: error: 'a' does not name a type
1 | a
| ^
|
s521140077 | p02264 | C++ | a | a.cc:1:1: error: 'a' does not name a type
1 | a
| ^
|
s286089712 | p02264 | C++ | #include <iostream>
#include <cstdlib>
#include <cmath>
#include <cstdio>
#include <string>
#include <stack>
#include <queue>
#include <stdlib.h>
#include <sstream>
using namespace std;
int n, m;
string p[100000];
int a[100000];
queue<int> q;
int c, s, t;
int u;
int main()
{
cin >> n >> m;
c=n;
u=0;
for(int i=0; i<... | a.cc: In function 'int main()':
a.cc:48:18: error: expected '}' at end of input
48 | return 0;
| ^
a.cc:18:1: note: to match this '{'
18 | {
| ^
|
s497058960 | p02264 | C++ | #include<iostream>
#include<string>
using namespace std;
pair<string,int> D[10000000];
int n,q,b[100000];string a[100000];
int main(){
scanf("%d%d",&n,&q);
int cnt=0,t=0;
for(int i=0;i<n;i++){
cin>>s[i]>>b[i];
D[cnt]=make_pair(s[i],b[i]);cnt++;
}
for(int i=0;i<cnt;i++){
if(D[i].second>q){
t+=q;
D[cnt]=... | a.cc: In function 'int main()':
a.cc:10:22: error: 's' was not declared in this scope
10 | cin>>s[i]>>b[i];
| ^
a.cc:16:59: error: no match for 'operator-' (operand types are 'std::pair<std::__cxx11::basic_string<char>, int>' and 'int')
16 | D[cnt... |
s298979521 | p02264 | C++ | #include<iostream>
#include<string>
using namespace std;
pair<string,int> D[10000000];
int n,q,b[100000];string s[100000];
int main(){
scanf("%d%d",&n,&q);
int cnt=0,t=0;
for(int i=0;i<n;i++){
cin>>s[i]>>b[i];
D[cnt]=make_pair(s[i],b[i]);cnt++;
}
for(int i=0;i<cnt;i++){
if(D[i].second>q){
t+=q;
D[cnt]=... | a.cc: In function 'int main()':
a.cc:16:59: error: no match for 'operator-' (operand types are 'std::pair<std::__cxx11::basic_string<char>, int>' and 'int')
16 | D[cnt]=make_pair(D[i].first,D[cnt]-q);
| ~~~~~~^~
| ... |
s625818427 | p02264 | C++ | #include<iostream>
using namespace std;
#include<string>
#include<stdio.h>
typedef struct box { int val; string name; box *prev, *next; } box_t;
box_t* init()
{
box_t* head = new box_t;
head->val = -1;
head->name = '\0';
head->next = NULL;
head->prev = NULL;
return head;
}
box_t* make_tail(bo... | a.cc: In function 'int main()':
a.cc:100:5: error: 'r' was not declared in this scope
100 | r
| ^
a.cc:100:6: error: expected '}' at end of input
100 | r
| ^
a.cc:89:1: note: to match this '{'
89 | {
| ^
|
s472419275 | p02264 | C++ | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <ctime>
#include <string>
#include <queue>
using namespace std;
int n, q, t;
int main(void){
queue<pair<string, int>> Q;
cin >> n >> q;
for(int i = 0; i< n; i++){
string s;
int T;
cin >>... | a.cc: In function 'int main()':
a.cc:22:23: error: no matching function for call to 'std::queue<std::pair<std::__cxx11::basic_string<char>, int> >::push(int&)'
22 | Q.push((s, T));
| ~~~~~~^~~~~~~~
In file included from /usr/include/c++/14/queue:66,
from a.cc:9:... |
s966148222 | p02264 | C++ | #include<iostream>
#include<string>
using namespace std;
const int MAX = 100001;
int alltime = 0;
class pro
{
public:
string name;
int time;
void input(string, int);
void print();
pro& operator=(const pro);
};
void pro::input(string name, int time)
{
pro::name = name;
pro::time = time;
}
void pro::print()
{... | a.cc: In member function 'pro queue::dequeue()':
a.cc:84:21: error: return-statement with no value, in function returning 'pro' [-fpermissive]
84 | if (empty())return;
| ^~~~~~
a.cc:89: confused by earlier errors, bailing out
|
s578643146 | p02264 | C++ | #include<iostream>
#include<string>
using namespace std;
const int MAX = 100001;
int alltime = 0;
class pro
{
public:
string name;
int time;
void input(string, int);
void print();
pro& operator=(const pro);
};
void pro::input(string name, int time)
{
pro::name = name;
pro::time = time;
}
void pro::print()
{... | a.cc: In member function 'pro queue::dequeue()':
a.cc:84:27: error: 'a' was not declared in this scope
84 | if (empty())pro a;a.input("a",0);return a;
| ^
|
s739225636 | p02264 | C++ | #include<iostream>
#include<string>
using namespace std;
const int MAX = 100001;
int alltime = 0;
class pro
{
public:
string name;
int time;
void input(string, int);
void print();
pro& operator=(const pro);
};
void pro::input(string name, int time)
{
pro::name = name;
pro::time = time;
}
void pro::print()
{... | a.cc: In member function 'pro queue::dequeue()':
a.cc:84:27: error: 'a' was not declared in this scope
84 | if (empty())pro a;a.input("a",0);return a;
| ^
|
s359090491 | p02264 | C++ | include<stdio.h>
#include<stdlib.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) {
if (a >... | a.cc:1:1: error: 'include' does not name a type
1 | include<stdio.h>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:40:9: error: 'scanf' was not declared in this scope
40 | scanf("%d %d", &n, &q);
| ^~~~~
a.cc:59:25: error: 'printf' was not declared in this scope
59 | ... |
s982241742 | p02264 | C++ | #include<stdio.h>
struct {
char name[12];
int time;
} p[100000];
main(){
int n,q,total=0,done=0;
int i;
scanf("%d %d",&n,&q);
for(i=0;i<n;i++){
scanf("%s %d",p[i].name,&p[i].time);
}
while(done<n){
for(i=0;i<n;i++){
if(0<p[i].time && p[i].time<=q){
total += p[i].time;
p[i]... | 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:18:16: error: no match for 'operator=' (operand types are '<unnamed struct>' and 'int')
18 | p[i] = 0;
| ^
a.cc:2:8: note: candidate: 'c... |
s344268647 | p02264 | C++ | #include<stdio.h>
struct process{
char name[11];
int time;
};
main(){
int n,q,total=0,done=0;
int i;
int *pa;
scanf("%d %d",&n,&q);
p = (int *)calloc(n,sizeof(struct process));
for(i=0;i<n;i++){
scanf("%s %d",p[i].name,&p[i].time);
}
while(done<n){
for(i=0;i<n;i++){
if(0<p[i].time && ... | 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:12:3: error: 'p' was not declared in this scope; did you mean 'pa'?
12 | p = (int *)calloc(n,sizeof(struct process));
| ^
| pa
a.cc:12:14: error: '... |
s743726532 | p02264 | C++ | #include<stdio.h>
struct process{
char name[11];
int time;
};
main(){
int n,q,total=0,done=0;
int i;
int *p;
scanf("%d %d",&n,&q);
p = (int *)calloc(n,sizeof(struct process));
for(i=0;i<n;i++){
scanf("%s %d",p[i].name,&p[i].time);
}
while(done<n){
for(i=0;i<n;i++){
if(0<p[i].time && p... | 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:12:14: error: 'calloc' was not declared in this scope
12 | p = (int *)calloc(n,sizeof(struct process));
| ^~~~~~
a.cc:2:1: note: 'calloc' is def... |
s457268314 | p02264 | C++ | #include<stdio.h>
#include<stdlib.h>
struct process{
char name[11];
int time;
};
main(){
int n,q,total=0,done=0;
int i;
int *p;
scanf("%d %d",&n,&q);
p = (int *)calloc(n,sizeof(struct process));
for(i=0;i<n;i++){
scanf("%s %d",p[i].name,&p[i].time);
}
while(done<n){
for(i=0;i<n;i++){
... | a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
8 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:15:24: error: request for member 'name' in '*(p + ((sizetype)(((long unsigned int)i) * 4)))', which is of non-class type 'int'
15 | scanf("%s %d",p[i].name,&p[i]... |
s376966530 | p02264 | C++ | #include<stdio.h>
#include<stdlib.h>
struct process{
char name[11];
int time;
struct process *nx;
};
main(){
int n,q,total=0,done=0;
int i;
struct process *p,*p1;
scanf("%d %d",&n,&q);
p=(struct process *)malloc(sizeof(struct process));
p1 = p;
while(p != NULL){
scanf("%s %d",p->name,&p->time);... | a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:18:12: error: 'struct process' has no member named 'next'; did you mean 'nx'?
18 | p = p->next
| ^~~~
| nx
a.cc:22:15: error: r... |
s035986244 | p02264 | C++ | #include<stdio.h>
#include<stdlib.h>
struct process{
char name[11];
int time;
struct process *nx;
};
main(){
int n,q,total=0,done=0;
int i;
struct process *p,*p1;
scanf("%d %d",&n,&q);
p=(struct process *)malloc(sizeof(struct process));
p1 = p;
while(p != NULL){
scanf("%s %d",p->name,&p->time);... | a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:18:14: error: expected ';' before '}' token
18 | p = p->nx
| ^
| ;
19 | }
| ~
a.cc:22:15: error: re... |
s786159968 | p02264 | C++ | #include<stdio.h>
#include<stdlib.h>
struct process{
char name[11];
int time;
struct process *nx;
};
main(){
int n,q,total=0,done=0;
int i;
struct process *p,*p1;
scanf("%d %d",&n,&q);
p=(struct process *)malloc(sizeof(struct process));
p1 = *p;
while(p != NULL){
scanf("%s %d",p->name,&p->time)... | a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:15:8: error: cannot convert 'process' to 'process*' in assignment
15 | p1 = *p;
| ^~
| |
| process
a.cc:22:15: error: reques... |
s479428703 | p02264 | C++ | #include<stdio.h>
#include<stdlib.h>
struct process{
char name[11];
int time;
struct process *nx;
};
main(){
int n,q,total=0,done=0;
int i;
struct process *p,*p1;
scanf("%d %d",&n,&q);
p=(struct process *)malloc(sizeof(struct process));
*p1 = *p;
while(p != NULL){
scanf("%s %d",p->name,&p->time... | a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:22:15: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
22 | if(0<p1.time && p1.time<=q){
| ... |
s088864295 | p02264 | C++ | #include<stdio.h>
#include<stdlib.h>
struct process{
char name[11];
int time;
struct process *nx;
};
main(){
int n,q,total=0,done=0;
int i;
struct process *p,*p1;
scanf("%d %d",&n,&q);
p=(struct process *)malloc(sizeof(struct process));
p1 = &p;
while(p != NULL){
scanf("%s %d",p->name,&p->time)... | a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:15:8: error: cannot convert 'process**' to 'process*' in assignment
15 | p1 = &p;
| ^~
| |
| process**
a.cc:22:15: error: re... |
s288567190 | p02264 | C++ | #include<stdio.h>
#include<stdlib.h>
struct process{
char name[11];
int time;
struct process *nx;
};
main(){
int n,q,total=0,done=0;
int i;
struct process *p,*p1;
scanf("%d %d",&n,&q);
p=(struct process *)malloc(sizeof(struct process));
p1 = p;
while(p != NULL){
scanf("%s %d",p->name,&p->time);... | a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:22:15: error: request for member 'time' in 'p1', which is of pointer type 'process*' (maybe you meant to use '->' ?)
22 | if(0<p1.time && p1.time<=q){
| ... |
s696587346 | p02264 | C++ | #include<stdio.h>
#include<stdlib.h>
struct process{
char name[11];
int time;
struct process *nx;
};
main(){
int n,q,total=0,done=0;
int i;
struct process *p,*p1;
scanf("%d %d",&n,&q);
p=(struct process *)malloc(sizeof(struct process));
while(p != NULL){
scanf("%s %d",p->name,&p->time);
p = p... | a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:21:14: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
21 | if(0<p.time && p.time<=q){
| ... |
s635273372 | p02264 | C++ | #include<stdio.h>
#include<stdlib.h>
struct process{
char name[11];
int time;
struct process *nx;
};
main(){
int n,q,total=0,done=0;
int i;
struct process *p;
scanf("%d %d",&n,&q);
p = (struct process *)malloc(sizeof(struct process));
p1 = p
while(p1 != NULL){
scanf("%s %d",p1->name,&p1->time);... | a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:15:3: error: 'p1' was not declared in this scope; did you mean 'p'?
15 | p1 = p
| ^~
| p
a.cc:22:14: error: request for member 'time' in 'p', which... |
s642828284 | p02264 | C++ | #include<stdio.h>
#include<stdlib.h>
struct process{
char name[11];
int time;
struct process *nx;
};
main(){
int n,q,total=0,done=0;
int i;
struct process *p,*p1;
scanf("%d %d",&n,&q);
p = (struct process *)malloc(sizeof(struct process));
p1 = p;
while(p1 != NULL){
scanf("%s %d",p1->name,&p1->t... | a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:22:14: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
22 | if(0<p.time && p.time<=q){
| ... |
s840561782 | p02264 | C++ | #include<stdio.h>
#include<stdlib.h>
struct process{
char name[11];
int time;
struct process *nx;
};
main(){
int n,q,total=0,done=0;
int i;
struct process *p,*p1;
scanf("%d %d",&n,&q);
p = (struct process *)malloc(sizeof(struct process));
p1 = (struct process *)malloc(sizeof(struct process));
while... | a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:22:14: error: request for member 'time' in 'p', which is of pointer type 'process*' (maybe you meant to use '->' ?)
22 | if(0<p.time && p.time<=q){
| ... |
s864103409 | p02264 | C++ | #include<stdio.h>
#include<stdlib.h>
struct process{
char name[11];
int time;
struct process *nx;
};
main(){
int n,q,total=0,done=0;
int i;
struct process *p,*p1;
scanf("%d %d",&n,&q);
p = (struct process *)malloc(sizeof(struct process));
p1 = p
while(p1 != NULL){
scanf("%s %d",p1->name,&p1->ti... | a.cc:9:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
9 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:15:9: error: expected ';' before 'while'
15 | p1 = p
| ^
| ;
16 | while(p1 != NULL){
| ~~~~~
|
s746127511 | p02264 | C++ | #include <stdio.h>
struct proc{
char name[11];
int time;
struct proc *nx;
};
main(){
struct proc p[100000];
struct proc *pa,*prepa;
int i;
int n,q,done=0,total=0;
pa = p;
scanf("%d %d",&n,&q);
for(i=0;i<n;i++){
scanf("%s %d",p[i].name,&p[i].time);
}
while(n>0){
for(i=0;i<n;i++){
i... | a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
8 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:24:16: error: 'struct proc' has no member named 'next'; did you mean 'nx'?
24 | prepa->next = pa->next;
| ^~~~
| nx... |
s290654660 | p02264 | C++ | #include <stdio.h>
struct proc{
char name[11];
int time;
struct proc *next;
};
main(){
struct proc p[100000];
struct proc *pa,*prepa;
int i;
int go;
int n,q,done=0,total=0;
scanf("%d %d",&n,&q);
for(i=0;i<n;i++){
scanf("%s %d",p[i].name,&p[i].time);
}
while(n>0){
pa = p;
go = 0
... | a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
8 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:20:11: error: expected ';' before 'while'
20 | go = 0
| ^
| ;
21 | while(pa->next!=NULL){
| ~~~~~
|
s325222176 | p02264 | C++ | #include <stdio.h>
struct proc{
char name[11];
int time;
struct proc *next;
};
main(){
struct proc *Q[100000];
int soq=eoq=0;
} | a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
8 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc:10:11: error: 'eoq' was not declared in this scope; did you mean 'soq'?
10 | int soq=eoq=0;
| ^~~
| soq
|
s450442977 | p02264 | C++ | #include <stdio.h>
#define QSIZE(100000)
void *Q[QSIZE];
int soq=0,eoq=0;
struct proc{
char name[11];
int time;
};
void *enQ(void *data){
int newEnd;
newEnd = (eoq+1)%QSIZE;
Q[eoq] = data;
eoq = newEnd;
}
void *deQ(){
int oldSt;
if(soq==eoq){
return NULL;
}
oldSt = soq;
soq = (soq+1)/QSIZ... | a.cc:2:15: error: expected parameter name, found "100000"
2 | #define QSIZE(100000)
| ^~~~~~
a.cc:3:9: error: 'QSIZE' was not declared in this scope
3 | void *Q[QSIZE];
| ^~~~~
a.cc: In function 'void* enQ(void*)':
a.cc:13:20: error: 'QSIZE' was not declared in this scope
13... |
s832895017 | p02264 | C++ | #include <stdio.h>
#define QSIZE (100000)
void *Q[QSIZE];
int soq=0,eoq=0;
struct proc{
char name[11];
int time;
};
void *enQ(void *data){
int newEnd;
newEnd = (eoq+1)%QSIZE;
Q[eoq] = data;
eoq = newEnd;
}
void *deQ(){
int oldSt;
if(soq==eoq){
return NULL;
}
oldSt = soq;
soq = (soq+1)/QS... | a.cc: In function 'void* enQ(void*)':
a.cc:17:1: warning: no return statement in function returning non-void [-Wreturn-type]
17 | }
| ^
a.cc: At global scope:
a.cc:29:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
29 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc... |
s136923004 | p02264 | C++ | #include <stdio.h>
#include <stdlib.h>
#define QSIZE (100000)
void *Q[QSIZE];
int soq=0,eoq=0;
struct proc{
char name[11];
int time;
};
void *enQ(void *data){
int newEnd;
newEnd = (eoq+1)%QSIZE;
Q[eoq] = data;
eoq = newEnd;
}
void *deQ(){
int oldSt;
if(soq==eoq){
return NULL;
}
oldSt = soq... | a.cc: In function 'void* enQ(void*)':
a.cc:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
18 | }
| ^
a.cc: At global scope:
a.cc:30:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
30 | main(){
| ^~~~
a.cc: In function 'int main()':
a.cc... |
s428249006 | p02264 | C++ | #include <stdio.h>
#include <stdlib.h>
#define QSIZE (100000)
struct proc *Q[QSIZE];
int soq=0,eoq=0;
struct proc{
char name[11];
int time;
};
void *enQ(void *data){
int newEnd;
newEnd = (eoq+1)%QSIZE;
Q[eoq] = data;
eoq = newEnd;
}
void *deQ(){
int oldSt;
if(soq==eoq){
return NULL;
}
oldS... | a.cc: In function 'void* enQ(void*)':
a.cc:16:12: error: invalid conversion from 'void*' to 'proc*' [-fpermissive]
16 | Q[eoq] = data;
| ^~~~
| |
| void*
a.cc:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
18 | }
| ^
a.c... |
s111743705 | p02264 | C++ | #include <stdio.h>
#include <stdlib.h>
#define QSIZE (100000)
struct proc *Q[QSIZE];
int soq=0,eoq=0;
struct proc{
char name[11];
int time;
};
struct proc *enQ(void *data){
int newEnd;
newEnd = (eoq+1)%QSIZE;
Q[eoq] = data;
eoq = newEnd;
}
struct proc *deQ(){
int oldSt;
if(soq==eoq){
return NU... | a.cc: In function 'proc* enQ(void*)':
a.cc:16:12: error: invalid conversion from 'void*' to 'proc*' [-fpermissive]
16 | Q[eoq] = data;
| ^~~~
| |
| void*
a.cc:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
18 | }
| ^
a.c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.