submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s165147534 | p00453 | C++ | #include<cstdio>
#include<algorithm>
#include<queue>
#include<cmath>
#define REP(i,a,n) for(int i = a;i < n;i++)
#define rep(i,n) REP(i,0,n)
#define f first
#define s second
#define mpi(l,m,n,o) make_pair(make_pair(l,m),make_pair(n,o))
#define pi pair<pair<int,int>,pair<int,int> >
using namespace std;
int in(){int x; s... | a.cc: In function 'int main()':
a.cc:29:10: error: 'Q' was not declared in this scope
29 | Q.push(mpi(0,0,i,0));
| ^
a.cc:33:13: error: 'Q' was not declared in this scope
33 | Q.push(mpi(0,1,i,1));
| ^
|
s042651099 | p00453 | C++ | #include<iostream>
#include<algorithm>
#include<cstdlib>
using namespace std;
int main(){
for(int n,m;cin>>n>>m,n|m;){
int k[150],xp[150][10],d[150][10];
for(int i=0;i<n;i++){
cin>>k[i];
for(int j=0;j<k[i];j++){
cin>>xp[i][j]>>d[i][j];
}
}
int c[150][150][10]={{}};
fill(c[0... | a.cc:26:27: error: stray '#' in program
26 | for(int dj=0;dj<=!!j#include<cstdio>
| ^
a.cc: In function 'int main()':
a.cc:26:27: error: expected ';' before 'include'
26 | for(int dj=0;dj<=!!j#include<cstdio>
| ^~~~~~~~
| ... |
s105460342 | p00454 | Java | #include <iostream>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <string>
#include <map>
#include <queue>
#include <memory.h>
using namespace std;
int dx[] = {1,0,-1,0};
int dy[] = {0,1,0,-1};
int W, H, N;
int X1[1000], X2[1000], Y1[1000], Y2[1000];
bool fld[1000 * 6][1000 * 6]... | Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include <vector>
^
Main.java:3: error: illegal character: '#'
#include <math.h>
^
Main.java:4: error: illegal character: '#'
#include <stdio.h>
^
Main.java:5: error: illegal character: '#'
#include <algorithm>
^... |
s643412229 | p00454 | C | #include<cstring>
#include<cstdio>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#define maxn 1005
#define INF 0x3f3f3f3f3f
#define eps 1e-6
using namespace std;
typedef long long ll;
int w, h, n, ans, tx, ty;
int lx[maxn], ly[maxn], rx[maxn], r... | main.c:1:9: fatal error: cstring: No such file or directory
1 | #include<cstring>
| ^~~~~~~~~
compilation terminated.
|
s693915793 | p00454 | C++ | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
public class Main {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.BufferedReader;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.io.IOException;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fm... |
s353928935 | p00454 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
typedef pair<int,int> P;
#define MAX_N 1000
int dx[]={0,1,0,-1};
int dy[]={1,0,-1,0};
int W,H,N;
int X1[MAX_N],X2[MAX_N],Y1[MAX_N],Y2[MAX_N];
bool fld[MAX_N*6][MAX_N*6];
int compress(int *x1,int *x2,int w){
vector<int> xs;... | a.cc: In function 'void solve()':
a.cc:44:3: error: 'memset' was not declared in this scope
44 | memset(fld,0,sizeof(fld));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<queue>
+++ |+#include <cstring>
5 | ... |
s339727292 | p00454 | C++ | #include <string>
#include <vector>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <map>
#include <list>
#include <set>
#include <numeric>
#include <queue>
#include <stack>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctYpe>
#include <cstring>
#include <climits>
#include <cfloa... | a.cc:15:10: fatal error: cctYpe: No such file or directory
15 | #include <cctYpe>
| ^~~~~~~~
compilation terminated.
|
s802761722 | p00454 | C++ | #include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}
typedef vector<int> vi;
typedef vector<vi> vvi;
typed... | a.cc:35:12: error: 'int y1 [1010]' redeclared as different kind of entity
35 | int y1[1010],y2[1010];
| ^
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/14/bit... |
s273297078 | p00454 | C++ | #include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}
typedef vector<int> vi;
typedef vector<vi> vvi;
typed... | a.cc:35:12: error: 'int y1 [1010]' redeclared as different kind of entity
35 | int y1[1010],y2[1010];
| ^
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/14/bit... |
s604627713 | p00454 | C++ | #include <iostream>
#include <queue>
#include <algorithm>
#include <cstdlib>
#include <string>
#include <vector>
#include <cstring>
#include <sstream>
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<... | a.cc:35:20: error: 'acos' was not declared in this scope
35 | const double pi = acos(-1.0);
| ^~~~
a.cc:42:5: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch]
42 | int y1[1010],y2[1010];
| ^~
|
s550769860 | p00454 | C++ | #include <iostream>
#include <queue>
#include <algorithm>
#include <cstdlib>
#include <string>
#include <vector>
#include <cstring>
#include <sstream>
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<... | a.cc:35:20: error: 'acos' was not declared in this scope
35 | const double pi = acos(-1.0);
| ^~~~
|
s727910051 | p00454 | C++ | #include<iostream>
#include<cstdio>
#include<queue>
using namespace std;
int W,H,N;
int X1[5000];int X2[5000];
int Y1[5000];int Y2[5000];
int field[5001][5001];
bool Field[5001][5001];
int dx[4]={-1,0,0,1};
int dy[4]={0,-1,1,0};
bool FX[1000005];bool FY[1000005];
int Num_X[5000];int Num_Y[5000];
queue<pair<int,int> >qu... | a.cc: In function 'int main()':
a.cc:18:21: error: 'class std::queue<std::pair<int, int> >' has no member named 'clear'
18 | que.clear();
| ^~~~~
|
s336219396 | p00454 | C++ | #include <bits/stdc++.h>
using namespace std;
#define all(c) ((c).begin()), ((c).end())
#define dump(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define REP(i, a, b) for (int i = a; i < (int)(b); i++)
#define ... | a.cc: In function 'int compress(std::vector<std::pair<int, int> >&, int)':
a.cc:70:21: error: 'tx1' was not declared in this scope
70 | if(0 <= tx1 && tx1 <= w) xs.push_back(tx1);
| ^~~
a.cc:71:21: error: 'tx2' was not declared in this scope
71 | if(0 <= tx2 && tx... |
s707086787 | p00454 | C++ | #include <bits/stdc++.h>
using namespace std;
#define all(c) ((c).begin()), ((c).end())
#define dump(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define REP(i, a, b) for (int i = a; i < (int)(b); i++)
#define ... | a.cc: In function 'int compress(std::vector<std::pair<int, int> >&, int)':
a.cc:70:21: error: 'tx1' was not declared in this scope
70 | if(0 <= tx1 && tx1 <= w) xs.push_back(tx1);
| ^~~
a.cc:71:21: error: 'tx2' was not declared in this scope
71 | if(0 <= tx2 && tx... |
s817083900 | p00454 | C++ | #include <bits/stdc++.h>
using namespace std;
#define all(c) ((c).begin()), ((c).end())
#define dump(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define REP(i, a, b) for (int i = a; i < (int)(b); i++)
#define ... | a.cc: In function 'int compress(std::vector<std::pair<int, int> >&, int)':
a.cc:70:21: error: 'tx1' was not declared in this scope
70 | if(0 <= tx1 && tx1 <= w) xs.push_back(tx1);
| ^~~
a.cc:71:21: error: 'tx2' was not declared in this scope
71 | if(0 <= tx2 && tx... |
s825440261 | p00454 | C++ | #include <bits/stdc++.h>
using namespace std;
#define all(c) ((c).begin()), ((c).end())
#define dump(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define REP(i, a, b) for (int i = a; i < (int)(b); i++)
#define ... | a.cc: In function 'int compress(std::vector<std::pair<int, int> >&, int)':
a.cc:70:21: error: 'tx1' was not declared in this scope
70 | if(0 <= tx1 && tx1 <= w) xs.push_back(tx1);
| ^~~
a.cc:71:21: error: 'tx2' was not declared in this scope
71 | if(0 <= tx2 && tx... |
s281983624 | p00454 | C++ | #include <bits/stdc++.h>
using namespace std;
#define all(c) ((c).begin()), ((c).end())
#define dump(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define REP(i, a, b) for (int i = a; i < (int)(b); i++)
#define ... | a.cc: In function 'int compress(std::vector<std::pair<int, int> >&, int)':
a.cc:81:11: error: 'i' was not declared in this scope
81 | p[i].first = find(xs.begin(), xs.end(), p[i].first) - xs.begin();
| ^
a.cc:83:5: warning: no return statement in function returning non-void [-Wreturn-type]
... |
s165963162 | p00454 | C++ | #include <iostream>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <string>
#include <map>
#include <queue>
using namespace std;
int dx[] = {1,0,-1,0};
int dy[] = {0,1,0,-1};
int W, H, N;
int X1[1000], X2[1000], Y1[1000], Y2[1000];
bool fld[1000 * 6][1000 * 6];
int compress(int ... | a.cc: In function 'void solve()':
a.cc:42:3: error: 'memset' was not declared in this scope
42 | memset(fld,0,sizeof(fld));
| ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
8 | #include <queue>
+++ |+#include <cstring>
9 |... |
s351284128 | p00454 | C++ | #include<iostream>
#include<algorithm>
#include<cstring>
#include<queue>
using namespace std;
#define MAX_N 2400
pair<int, int>X[MAX_N];
pair<int, int>Y[MAX_N];
int x[MAX_N][2], y[MAX_N][2], h, w, n, a, b, c, d, A, B, cnt;
int col[MAX_N][MAX_N];
int z[MAX_N][MAX_N];
queue<int>Q;
int main() {
while (true) {
memset... | a.cc: In function 'int main()':
a.cc:54:73: error: expected ')' before ';' token
54 | for (int k = 0; k < y[i][0]; k < y[i][1]; k++) {
| ~ ^
| ... |
s071806610 | p00454 | C++ | #include <iostream>
#include <queue>
using namespace std;
typedef pair<int, int> P;
void seach(int x,int y,int X,int Y);
int speace[1000000][1000000],n;
int main(){
int X,Y,N,x1,y1,x2,y2;
while(1){
cin >> X >> Y;
if(X==0&&Y==0){
break;
}
cin >> N;
n=0;
for(int i=0;i<X;i++){
for(int j=0;j<Y;j++){
s... | /tmp/ccBBCILT.o: in function `main':
a.cc:(.text+0x5a): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccBBCILT.o
a.cc:(.text+0x121): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccBBCILT.o
a.cc:(.text+0x177): relocation tru... |
s078815338 | p00454 | C++ | #include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <queue>
#define MAX_N 1010
using namespace std;
static int X1[1010], Y1[1010], X2[1010], Y2[1010], fld[MAX_N * 2][MAX_N * 2],
dx[4] = { -1, 0, 0, 1 }, dy[4] = { 0, -1, 1, 0 };
static int compress(int *const, int *const, const i... | a.cc: In function 'void imos(int, int, int)':
a.cc:97:9: error: 'memset' was not declared in this scope
97 | memset(fld, 0, sizeof(fld));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <queue>
+++ |+... |
s583527045 | p00454 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<algorithm>
#include<cstring>
using namespace std;
typedef pair<int, int> P;
int compress(int *, int *, int);
void bfs(int, int);
int n, W, H;
int xa[1000], xb[1000], ya[1000], yb[1000]
bool pt[5000][5000] = {};
int main() {
int w, h, ans = 0... | a.cc:13:1: error: expected initializer before 'bool'
13 | bool pt[5000][5000] = {};
| ^~~~
a.cc: In function 'int main()':
a.cc:18:24: error: 'pt' was not declared in this scope
18 | memset(pt, 0, sizeof(pt));
| ^~
a.cc:21:68: error: 'yb' was not declared in this... |
s392657051 | p00454 | C++ | #include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<algorithm>
using namespace std;
typedef pair<int, int> P;
int compress(int *, int *, int);
void bfs(int, int);
int n, W, H;
int xa[1000], xb[1000], ya[1000], yb[1000];
bool pt[5000][5000] = {};
int main() {
int w, h, ans = 0;
while (cin >> ... | a.cc: In function 'int main()':
a.cc:17:17: error: 'memset' was not declared in this scope
17 | memset(pt, 0, sizeof(pt));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include<algorithm>
++... |
s131169567 | p00454 | C++ |
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
int compress(vector<int>&a_, vector<int>&b_,int c_)
{
vector<int> ret;
for (int ap : a_)
{
if(ap != 0)ret.push_back(ap - 1);
ret.push_back(ap);
if (ap != c_)ret.push_back(ap + 1);
}
for (int bp : b_)
{
if (b... | a.cc: In function 'int main()':
a.cc:64:17: error: 'memset' was not declared in this scope
64 | memset(fld, false, sizeof(fld));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <queue>
... |
s844979486 | p00454 | C++ |
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
int compress(vector<int>&a_, vector<int>&b_,int c_)
{
vector<int> ret;
for (int ap : a_)
{
if(ap != 0)ret.push_back(ap - 1);
ret.push_back(ap);
if (ap != c_)ret.push_back(ap + 1);
}
for (int bp : b_)
{
if (b... | a.cc: In function 'int main()':
a.cc:64:17: error: 'memset' was not declared in this scope
64 | memset(fld, false, sizeof(fld));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <queue>
... |
s946783184 | p00454 | C++ | #include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
#include <list>
#include <algorithm>
#include <sstream>
#include <set>
#include <cmath>
#include <map>
#include <stack>
#include <queue>
#include <stdio.h>
#include <string.h>
#include <numeric>
using namespace std;
int comp... | a.cc: In function 'int compress(int*, int*, int)':
a.cc:23:17: error: 'N' was not declared in this scope
23 | for(int i=0;i<N;i++){
| ^
a.cc:26:23: error: 'W' was not declared in this scope
26 | if(1<=tx1&&tx1<=W) xs.push_back(tx1);
| ^
a.cc:27:23: error: ... |
s145160283 | p00454 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <utility>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
??
using n... | a.cc:75:1: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
75 | ??//??????xs.erase(unique(all(xs)), end(xs));
a.cc:18:1: error: expected unqualified-id before '?' token
18 | ??
| ^
a.cc:20:1: error: expected unqualified-id before '?' token
20 | ??
| ^
a.cc:35:10: error: 'vecto... |
s500376561 | p00454 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <utility>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
??
using n... | a.cc:18:1: error: expected unqualified-id before '?' token
18 | ??
| ^
a.cc:20:1: error: expected unqualified-id before '?' token
20 | ??
| ^
a.cc:35:10: error: 'vector' does not name a type
35 | using vi=vector<int>;
| ^~~~~~
a.cc:36:11: error: 'vector' does not name a type
36 | ... |
s955838212 | p00454 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <utility>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
??
using n... | a.cc:18:1: error: expected unqualified-id before '?' token
18 | ??
| ^
a.cc:20:1: error: expected unqualified-id before '?' token
20 | ??
| ^
a.cc:35:10: error: 'vector' does not name a type
35 | using vi=vector<int>;
| ^~~~~~
a.cc:36:11: error: 'vector' does not name a type
36 | ... |
s467818036 | p00454 | C++ | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <utility>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
??
using n... | a.cc:18:1: error: expected unqualified-id before '?' token
18 | ??
| ^
a.cc:20:1: error: expected unqualified-id before '?' token
20 | ??
| ^
a.cc:35:10: error: 'vector' does not name a type
35 | using vi=vector<int>;
| ^~~~~~
a.cc:36:11: error: 'vector' does not name a type
36 | ... |
s737096918 | p00454 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <utility>
#include <cmath>
#define INF 10000000
#define REP(i, n) for(int i = 0;i < (n);i++)
#define all(n) n.begin(),n.end()
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
const int MAX_N... | a.cc: In function 'int main()':
a.cc:91:39: error: 'PII' was not declared in this scope
91 | queue<PII> que;
| ^~~
a.cc:91:42: error: template argument 1 is invalid
91 | queue<PII> que;
| ... |
s926100232 | p00454 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <utility>
#include <cmath>
#define INF 10000000
#define REP(i, n) for(int i = 0;i < (n);i++)
#define all(n) n.begin(),n.end()
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
const int MAX_N... | a.cc: In function 'int main()':
a.cc:91:39: error: 'PII' was not declared in this scope
91 | queue<PII> que;
| ^~~
a.cc:91:42: error: template argument 1 is invalid
91 | queue<PII> que;
| ... |
s425404175 | p00454 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <utility>
#include <cmath>
#define INF 10000000
#define REP(i, n) for(int i = 0;i < (n);i++)
#define all(n) n.begin(),n.end()
using namespace std;
typedef long long int ll;
typedef pair<int, int> PII;
const int MAX... | a.cc: In function 'int main()':
a.cc:57:17: error: 'memset' was not declared in this scope
57 | memset(fld, 0, sizeof(fld));
| ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
7 | #include <cmath>
+++... |
s696330805 | p00454 | C++ | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <utility>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#define INF 10000000
#define REP(i, n) for(int i = 0;i < (n);i++)
#define all(n) n.begin(),n.end()
using namespace std;
typedef long long int ll;
typed... | a.cc: In function 'int main()':
a.cc:59:17: error: 'memset' was not declared in this scope
59 | memset(fld, 0, sizeof(fld));
| ^~~~~~
a.cc:10:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
9 | #include <cstdlib>
... |
s236010882 | p00454 | C++ | #include<iostream>
#include<cstdio>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<stack>
#include<functional>
#include<list>
#include<unordered_map>
#define P pair<int,int>
using namespace std;
P x[1000], y[1000];
bool S[2005][2005];
int dx[4] = { -1,0,0,1 }, dy[4] = { 0,... | a.cc: In function 'int main()':
a.cc:32:17: error: 'memset' was not declared in this scope
32 | memset(S, 0, sizeof(S));
| ^~~~~~
a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
10 | #include<list>
+++ |+#i... |
s612340850 | p00454 | C++ | #include <cstdio>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
int h, w, n;
int x[1000][2], y[1000][2];
vector<int> xs, ys, z;
bool a[2500][2500];
bool f[2500][2500];
long long int ans;
typedef pair<int, int> P;
int dx[4] = {0, 0, -1, 1};
int dy[4] = {-1, 1, 0, 0};
void dfs(int s, int ... | a.cc: In function 'int main()':
a.cc:71:17: error: 'memset' was not declared in this scope
71 | memset(a, 0, sizeof(a));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <queue>
+++ |+#... |
s279058094 | p00454 | C++ |
#include<cstdio>
#include <iostream>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define MAX_N 1010
int n;
bool f[2 * MAX_N... | a.cc: In function 'int main()':
a.cc:58:17: error: 'memset' was not declared in this scope
58 | memset(f, 0, sizeof(f));
| ^~~~~~
a.cc:14:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
13 | #include<numeric>
+++ |... |
s266685780 | p00454 | C++ | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <fstream>
using namespace std;
const int MAX_N = 1000;
int X1[MAX_N], X2[MAX_N], Y1[MAX_N], Y2[MAX_N];
bool fld[MAX_N * 3][MAX_N * 3];
int W, H, N;
struct RECT
{
int r, l, u, b;
};
int compress(int *x1, int *x2, int w);
int main(... | a.cc: In function 'int main()':
a.cc:34:17: error: 'memset' was not declared in this scope
34 | memset(fld, 0, sizeof(fld));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <fstream>
+... |
s101677299 | p00454 | C++ | #include <iostream>
#include <queue>
#include <map>
#include <vector>
using namespace std;
int W,H,N;
bool fld[6000][6000];
int X1[1000],X2[1000],Y1[1000],Y2[1000];
const int dx[4]={0,0,1,-1},dy[4]={1,-1,0,0};
int compress(int *x1,int *x2,int w){
vector<int> xs;
for(int i=0;i<N;i++){
for(int j=-1;j<=1;j++){
in... | a.cc: In function 'int compress(int*, int*, int)':
a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'short'?
21 | sort(xs.begin(),xs.end());
| ^~~~
| short
a.cc:22:18: error: 'unique' was not declared in this scope
22 | xs.erase(unique(xs.begin(),xs... |
s620289420 | p00454 | C++ | #include <iostream>
#include <queue>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
int W,H,N;
bool fld[6000][6000];
int X1[1000],X2[1000],Y1[1000],Y2[1000];
const int dx[4]={0,0,1,-1},dy[4]={1,-1,0,0};
int compress(int *x1,int *x2,int w){
vector<int> xs;
for(int i=0;i<N;i++){
for(int ... | a.cc: In function 'void solve()':
a.cc:34:9: error: 'memset' was not declared in this scope
34 | memset(fld,0,sizeof(fld));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <algorithm>
+++ |+#include <... |
s310180920 | p00454 | C++ | #include<algorithm>
#include<iostream>
#include<cstdio>
using namespace std;
struct P{
int v,w,x,y;
};
bool pr(int* p,int* q){
return *p<*q;
}
P a[1000];
int* x[2002],* y[2002];
char b[2003][2003];
void fi(int x,int y){
static int dx[]={1,0,-1,0},dy[]={0,1,0,-1};
int i;
b[x][y]=-1;
for(i=0;i<4;++i){
if(!b[x+dx[... | a.cc: In function 'int main()':
a.cc:55:17: error: 'memset' was not declared in this scope
55 | memset(b,-1,sizeof(b));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include<cstdio>
+++ |+#i... |
s652598940 | p00454 | C++ | #include <cstdio>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
int w,h,n;
int x1[1005],x2[1005],y1[1005],y2[1005];
bool field[4005][4005]={};
int compress(int *x1,int *x2,int W){
vector<int>xs;
for(int i=0;i<n;i++){
for(int d=-1;d<=1;d++){
int ax=x1[i]+d;
int bx=x2[i]+d;
if(... | a.cc:7:23: warning: built-in function 'y1' declared as non-function [-Wbuiltin-declaration-mismatch]
7 | int x1[1005],x2[1005],y1[1005],y2[1005];
| ^~
a.cc: In function 'int main()':
a.cc:37:9: error: 'memset' was not declared in this scope
37 | memset(field,0,sizeof(field));
... |
s432914344 | p00454 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<stack>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define all(n) n.begin(),n.end()
#define SIZE 2048
struct P{
int x,y;
P(int x1, int y1){
x=x1,y=y1;
}
};
int compress(vector<int> &x1, vector<int> &x2, int W){
vector<int> xs... | a.cc: In function 'int main()':
a.cc:79:5: error: 'memset' was not declared in this scope
79 | memset(board, 0, sizeof(board));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include<stack>
+++ |+#include <cstring>
... |
s716177290 | p00454 | C++ | //Bokan ga bokka--nn!!
//Daily Lunch Special Tanoshii !!
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cassert>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#inclu... | a.cc:32:21: error: 'int y1 [1005]' redeclared as different kind of entity
32 | int x1[1005],y1[1005],x2[1005],y2[1005],w,h,n;
| ^
In file included from /usr/include/features.h:523,
from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
from /usr/in... |
s740854752 | p00454 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <numeric>
#include <cctype>
#include <tuple>
#include <iterator>
#include <bit... | a.cc: In function 'int main()':
a.cc:94:73: error: no match for 'operator=' (operand types are 'std::vector<std::vector<short int> >' and 'std::vector<std::vector<int> >')
94 | field = vector<vector<int>>(h + 1, vector<int>(w + 1, 0));
| ... |
s047654300 | p00455 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.util.StringTokenizer;
class Main{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
while(!sc.hasNext()) {
int sh=s... | Main.java:10: error: cannot find symbol
Scanner sc=new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:10: error: cannot find symbol
Scanner sc=new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s483888209 | p00455 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.util.StringTokenizer;
class Main{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
while(sc.hasNext()) {
int sh=sc... | Main.java:10: error: cannot find symbol
Scanner sc=new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:10: error: cannot find symbol
Scanner sc=new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s967768484 | p00455 | Java | import java.util.*;
class Main{
public static void main(String[] args){
Solve s = new Solve();
s.solve();
}
}
class Solve{
Solve(){}
Scanner in = new Scanner(System.in);
void solve(){
int h1,m1,s1,h2,m2,s2;
for(int i = 0; i < 3; i++){
h1 = in.nextInt();
m1 = in.nextInt();
s1 = in.nextInt();
... | Main.java:42: error: missing return statement
}
^
1 error
|
s445828131 | p00455 | Java | Scanner scan = new Scanner(System.in);
int[6] h,m,s;
for(int i=0;i<6;i++){
h[i] = scan.next();
m[i] = scan.next();
s[i] = scan.next();
}
for(int i=1;i<6;i+=2){
if((s[i]-=s[i-1])<0){s[i]=60-s[i];m[i]-=1;}
if((m[i]-=m[i-1])<0){m[i]=60-b[i];h[i]-=1;}
h[i]-=h[i-1];
}
for(int i=1;i<6;i+=2){
System.out.println(h[i]+" "+m[i]+... | Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
Scanner scan = new Scanner(System.in);
^
(use --enable-preview to enable unnamed classes)
Main.java:2: error: class, interface, enum, or record expected
int[6] h,m,s;
^
Main.java:3: error: class, interface, enum, or record expected... |
s966834096 | p00455 | Java | import java.util.Scanner;
class AOJ0532{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int[6] h,m,s;
for(int i=0;i<6;i++){
h[i] = scan.next();
m[i] = scan.next();
s[i] = scan.next();
}
for(int i=1;i<6;i+=2){
if((s[i]-=s[i-1])<0){s[i]=60-s[i];m[i]-=1;}
if((m[i]-=m[i-1])<0){m[i]=60-b[i];h... | Main.java:5: error: ']' expected
int[6] h,m,s;
^
Main.java:5: error: not a statement
int[6] h,m,s;
^
Main.java:5: error: not a statement
int[6] h,m,s;
^
Main.java:5: error: ';' expected
int[6] h,m,s;
^
Main.java:5: error: not a statement
int[6] h,m,s;
^
Main.java:5: error: ';' expected
in... |
s501698890 | p00455 | Java | import java.util.Scanner;
class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int[6] h,m,s;
for(int i=0;i<6;i++){
h[i] = scan.next();
m[i] = scan.next();
s[i] = scan.next();
}
for(int i=1;i<6;i+=2){
if((s[i]-=s[... | Main.java:6: error: ']' expected
int[6] h,m,s;
^
Main.java:6: error: not a statement
int[6] h,m,s;
^
Main.java:6: error: not a statement
int[6] h,m,s;
^
Main.java:6: error: ';' expected
int[6] h,m,s;
^
Main.java:6: error: not a statement
int[6]... |
s074728037 | p00455 | Java | import java.util.Scanner;
class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int[6] h;int[6] m;int[6] s;
for(int i=0;i<6;i++){
h[i] = scan.next();
m[i] = scan.next();
s[i] = scan.next();
}
for(int i=1;i<6;i+=2){
... | Main.java:6: error: ']' expected
int[6] h;int[6] m;int[6] s;
^
Main.java:6: error: not a statement
int[6] h;int[6] m;int[6] s;
^
Main.java:6: error: not a statement
int[6] h;int[6] m;int[6] s;
^
Main.java:6: error: ']' expected
int[6] h;int[6] m;int[6] s;
... |
s344718604 | p00455 | Java | import java.util.Scanner;
class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int[] h = new int[6];
int[] m = new int[6];
int[] s = new int[6];
for(int i=0;i<6;i++){
h[i] = scan.next();
m[i] = scan.next();
s[i] = scan.ne... | Main.java:6: error: illegal character: '\u3000'
int[] h?= new int[6];
^
Main.java:6: error: not a statement
int[] h?= new int[6];
^
Main.java:7: error: illegal character: '\u3000'
int[] m?= new int[6];
^
Main.java:7: error: not a statement
int[] m?= new ... |
s600933668 | p00455 | Java | import java.util.Scanner;
class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
h = new int[6];
m = new int[6];
s = new int[6];
for(int i=0;i<6;i++){
h[i] = scan.next();
m[i] = scan.next();
s[i] = scan.next();
}
... | Main.java:6: error: illegal character: '\u3000'
h?= new int[6];
^
Main.java:6: error: not a statement
h?= new int[6];
^
Main.java:6: error: not a statement
h?= new int[6];
^
Main.java:7: error: illegal character: '\u3000'
m?= new int[6];
^
Main.java:7: error: not a ... |
s715443273 | p00455 | Java | import java.util.Scanner;
class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int[] h = new int[6];
int[] m = new int[6];
int[] s = new int[6];
for(int i=0;i<6;i++){
h[i] = scan.next();
m[i] = scan.next();
s[i] = scan.ne... | Main.java:6: error: illegal character: '\u3000'
int[] h?= new int[6];
^
Main.java:6: error: not a statement
int[] h?= new int[6];
^
Main.java:7: error: illegal character: '\u3000'
int[] m?= new int[6];
^
Main.java:7: error: not a statement
int[] m?= new ... |
s568660517 | p00455 | Java | import java.util.Scanner;
class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int h[] = new int[6];
int m[] = new int[6];
int s[] = new int[6];
for(int i=0;i<6;i++){
h[i] = scan.next();
m[i] = scan.next();
s[i] = scan.ne... | Main.java:6: error: illegal character: '\u3000'
int h[]?= new int[6];
^
Main.java:6: error: not a statement
int h[]?= new int[6];
^
Main.java:7: error: illegal character: '\u3000'
int m[]?= new int[6];
^
Main.java:7: error: not a statement
int m[]?= new ... |
s041001093 | p00455 | Java | import java.util.Scanner;
class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int[] h,m,s;
h = new int[6];
m = new int[6];
s = new int[6];
for(int i=0;i<6;i++){
h[i] = scan.next();
m[i] = scan.next();
s[i] = scan.n... | Main.java:7: error: illegal character: '\u3000'
h?= new int[6];
^
Main.java:7: error: not a statement
h?= new int[6];
^
Main.java:7: error: not a statement
h?= new int[6];
^
Main.java:8: error: illegal character: '\u3000'
m?= new int[6];
^
Main.java:8: error: not a ... |
s013536651 | p00455 | Java | import java.util.Scanner;
class public Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int[] h,m,s;
h = new int[6];
m = new int[6];
s = new int[6];
for(int i=0;i<6;i++){
h[i] = scan.next();
m[i] = scan.next();
s[i] =... | Main.java:3: error: <identifier> expected
class public Main{
^
Main.java:3: error: class, interface, enum, or record expected
class public Main{
^
Main.java:7: error: illegal character: '\u3000'
h?= new int[6];
^
Main.java:7: error: not a statement
h?= new int[6];
^
Main.java:... |
s713408884 | p00455 | C | #include <stdio.h>
int main(){
int sh,sm,ss,th,tm,ts,h,m,s,ks,ps,x;
for (i = 1;i <= 3;i++){
scanf("%d %d %d %d %d %d",&sh,&sm,&ss,&th,&tm,&ts);
ks = sh*60*60+sm*60+ss;
ps = th*60*60+tm*60+ts;
x=ps-ks;
h=x/3600;
m=(x-h*3600)/60;
s=x-h*3600-m*60;
}
return0;
} | main.c: In function 'main':
main.c:6:6: error: 'i' undeclared (first use in this function)
6 | for (i = 1;i <= 3;i++){
| ^
main.c:6:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:1: error: 'return0' undeclared (first use in this function)
19 | retur... |
s769101579 | p00455 | C | #include <stdio.h>
int main(){
int sh,sm,ss,th,tm,ts,h,m,s,ks,ps,x,i;
for (i = 1;i <= 3;i++){
scanf("%d %d %d %d %d %d",&sh,&sm,&ss,&th,&tm,&ts);
ks = sh*60*60+sm*60+ss;
ps = th*60*60+tm*60+ts;
x=ps-ks;
h=x/3600;
m=(x-h*3600)/60;
s=x-h*3600-m*60;
}
return0;
} | main.c: In function 'main':
main.c:19:1: error: 'return0' undeclared (first use in this function)
19 | return0;
| ^~~~~~~
main.c:19:1: note: each undeclared identifier is reported only once for each function it appears in
|
s912774130 | p00455 | C | #include <stdio.h>
int main()
{
int ah, am, as, bh, bm, bs, h, m, s;
scanf_s("%d%d%d", &ah, &am, &as);
as = 3600 * ah + 60 * am + as;
scanf_s("%d%d%d", &bh, &bm, &bs);
bs = bh * 3600 + bm * 60 + bs;
h = (bs - as) / 3600;
m = ((bs - as) % 3600) / 60;
s = ((bs - as) % 3600) % 60;
printf("%d %d %d", h, m, s);
... | main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | scanf_s("%d%d%d", &ah, &am, &as);
| ^~~~~~~
| scanf
|
s618479390 | p00455 | C | #include <stdio.h>
int main(){
int h[3][2],m[3][2],s[3][2],i,k,koh[3],kom[3],kos[3];
for(k=0;k<3;k++){
scanf("%d %d %d %d %d %d",&h[k][0],&m[k][0],&s[k][0],&h[k][1],&m[k][1],&s[k][1]);
if(k<=2){printf("\n");}}
for(i=0;i<3;i++){
if(s[i][0]<=s[i][1]){
kos[i]=s[i][1]-s[i][0];
}
else{kos[i]=s[i][1]+... | main.c: In function 'main':
main.c:25:1: error: implicit declaration of function 'prinf'; did you mean 'printf'? [-Wimplicit-function-declaration]
25 | prinf("%d %d %d\n",koh[i],kom[i],kos[i]);
| ^~~~~
| printf
|
s141299346 | p00455 | C | #include "stdafx.h"
#include "stdio.h"
typedef struct {
int Arrive[3];
int Leave[3];
}Time;
void timecal(int arrive[3], int leave[3], int result[3])
{
int temp;
for (temp = 2; temp > 0; temp--) {
result[temp] = (leave[temp] - arrive[temp]);
if (result[temp] < 0) {
result[temp] = 60 + result[temp];
leave... | main.c:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s905896892 | p00455 | C | #include <stdio.h>
int main(){
int h1[3],m1[3],s1[3];
int h2[3],m2[3],s2[3];
int h[3],m[3],s[3];
int i;
for(i=0;i<3;i++){
scanf("%d%d%d%d%d%d",&h1[i],&m1[i],&s1[i]",&h2[i],&m2[i],&s2[i]);
}
for(i=0;i<3;i++){
int x[3];
int ... | main.c: In function 'main':
main.c:8:54: warning: missing terminating " character
8 | scanf("%d%d%d%d%d%d",&h1[i],&m1[i],&s1[i]",&h2[i],&m2[i],&s2[i]);
| ^
main.c:8:54: error: missing terminating " character
8 | scanf("%d%d%d%d%d... |
s524203788 | p00455 | C | #include<stdio.h>
int main(){
int a;
int b;
int c;
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &c);
if(b1 == 1){
if(b2 == 1){
printf("Open\n");
}else{
printf("Close\n");
}
}else{
if(b3 == 1){
printf("Open\n");
}else{
printf("Close\n");
}
}
return 0;
} | main.c: In function 'main':
main.c:10:12: error: 'b1' undeclared (first use in this function); did you mean 'b'?
10 | if(b1 == 1){
| ^~
| b
main.c:10:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:20: error: 'b2' undeclar... |
s415330249 | p00455 | C | #include <stdio.h>
int main(){
int toki[3],tokide[3],fun[3],funde[3],byou[3],byoude[3];
int i,f,t;
int kekkat[3],kekkaf[3],kekkab[3];
for(i=0;i<3;i++){
scanf("%d %d %d %d %d %d",&toki[i],&fun[i],&byou[i],&tokide[i],&funde[i],&byoude[i]);
}
for(i=0;i<3;i++){
f=0;
t=0;
kekkab[i]=byoude[i]-byou[i];
if(kekkab[i]<0){
kekk... | main.c: In function 'main':
main.c:20:4: error: 'kakkaf' undeclared (first use in this function); did you mean 'kekkaf'?
20 | if(kakkaf[i]<0){
| ^~~~~~
| kekkaf
main.c:20:4: note: each undeclared identifier is reported only once for each function it appears in
|
s397044610 | p00455 | C | #include <stdio.h>
int main(){
int toki[3],tokide[3],fun[3],funde[3],byou[3],byoude[3];
int i,f,t;
int kekkat[3],kekkaf[3],kekkab[3];
for(i=0;i<3;i++){
scanf("%d %d %d %d %d %d",&toki[i],&fun[i],&byou[i],&tokide[i],&funde[i],&byoude[i]);
}
for(i=0;i<3;i++){
f=0;
t=0;
kekkab[i]=byoude[i]-byou[i];
if(kekkab[i]<0){
kekk... | main.c: In function 'main':
main.c:21:14: error: 'kakkaf' undeclared (first use in this function); did you mean 'kekkaf'?
21 | kekkaf[i]=60+kakkaf[i];
| ^~~~~~
| kekkaf
main.c:21:14: note: each undeclared identifier is reported only once for each function it appears in
|
s700097334 | p00455 | C | #include<stdio.h>
int main(void)
{
int h1,h2,h3,m1,m2,m3,s1,s2,s3;
for(i=1;i<=3;i++) {
scanf("%d %d %d %d %d %d",&h1,&m1,&s1,&h2,&m2,&s2);
s3=s2-s1;
m3=m2-m1;
h3=h2-h1;
if(s3<0) {
m3--;
s3+=60;
}
if(m3<0) {
h3--;
m3+=60;
}
printf("%d %d %d\n",h3,m3,s3);
}
return 0;
} | main.c: In function 'main':
main.c:5:13: error: 'i' undeclared (first use in this function)
5 | for(i=1;i<=3;i++) {
| ^
main.c:5:13: note: each undeclared identifier is reported only once for each function it appears in
|
s241394929 | p00455 | C | #include <stdio.h>
int main(){
int time[3][9]= {{0},{0}}, i, j;
for (i = 0; i < 3; i++) {
for (j = 0; j < 6; j++) {
scanf("%d", &time[i][j]);
}
}
for (i = 0; i < 3; i++) {
if ((time[i][8] += time[i][5] - time[i][2]) < 0){
time[i][8] += 60;
... | main.c: In function 'main':
main.c:25:65: error: expected ';' before 'return'
25 | printf("%d %d %d\n", time[i][6], time[i][7], time[i][8])
| ^
| ;
26 |
27 | ... |
s815017749 | p00455 | C | #include<stdio.h>
int main(void)
{
int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J;
scanf("%d %d %d %d %d %d\n%d %d %d %d %d %d\n%d %d %d %d %d %d %d",&a,&b,&c,&d,&e,&f,&G,&H,&i,&j,&k,&l,&m,&n,&o,&p,&q,&r);
s=3600*a+60*b+c;t=3600*d+60*e+f;u=3600*g+60*h+i;v=3600*j+60*k+l;W=3600*m+... | main.c: In function 'main':
main.c:6:69: error: 'W' undeclared (first use in this function)
6 | s=3600*a+60*b+c;t=3600*d+60*e+f;u=3600*g+60*h+i;v=3600*j+60*k+l;W=3600*m+60*n+o;x=3600*p+60*q+r;
| ^
main.c:6:69: note: each undeclared identi... |
s669084328 | p00455 | C++ | #include<iostream>
int main() {
cout<<"hello"<<endl;
} | a.cc: In function 'int main()':
a.cc:4:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
4 | cout<<"hello"<<endl;
| ^~~~
| std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; //... |
s005977930 | p00455 | C++ | #include<iostream>
int main() {
std::cout<<"hello"<<endl;
} | a.cc: In function 'int main()':
a.cc:4:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
4 | std::cout<<"hello"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41,
from a.cc:1:
/usr/incl... |
s000609962 | p00455 | C++ | #include "stdafx.h"
#include <iostream>
using namespace std;
long getLongTime(int* t) {
long longt = 0;
longt += 60 * 60 * t[0];
longt += 60 * t[1];
longt += t[2];
return longt;
}
void getFormattedTime(long longt, int* t) {
t[0] = longt / (60 * 60);
longt -= t[0] * (60 * 60);
t[1] = longt / 60;
longt -= t... | a.cc:1:10: fatal error: stdafx.h: No such file or directory
1 | #include "stdafx.h"
| ^~~~~~~~~~
compilation terminated.
|
s816307216 | p00455 | C++ | #incude<iostream>
using namespace std;
int main(){
int h1,h2,m1,m2,s1,s2,sum1=0,sum2=0;
cin>>h1>>m1>>s1>>h2>>m2>>s2;
sum1=3600*h1+60*m1+s1;
sum2=3600*h2+60*m2+s2;
sum2-=sum1;
h2=sum2/3600;m2=(sum2%3600)/60;s2=(sum2%3600)%60;
cout<<h2<<" "<<m2<<" "<<s2<<endl;
sum1=0,sum2=0;
cin>>h1>>m1>>s1>>h2>>m2>>s2;
sum1=3600*h1+60... | a.cc:1:2: error: invalid preprocessing directive #incude; did you mean #include?
1 | #incude<iostream>
| ^~~~~~
| include
a.cc: In function 'int main()':
a.cc:6:1: error: 'cin' was not declared in this scope
6 | cin>>h1>>m1>>s1>>h2>>m2>>s2;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in head... |
s344725836 | p00455 | C++ | int main()
{
for (int i = 0; i < 3; i++){
int hin, min, sin, hout, mout, sout, total;
cin >> hin >> min >> sin >> hout >> mout >> sout;
total = hout * 3600 + mout * 60 + sout - hin * 3600 - min * 60 - sin;
cout << hin / 3600 << " " << (total % 3600) / 60 << " " << st << total%60;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:17: error: 'cin' was not declared in this scope; did you mean 'sin'?
5 | cin >> hin >> min >> sin >> hout >> mout >> sout;
| ^~~
| sin
a.cc:9:17: error: 'cout' was not declared in this scope; did you mean 'sout'?
... |
s405279615 | p00455 | C++ | int main()
{
for (int i = 0; i < 3; i++){
int hin, min, sin, hout, mout, sout, total;
cin >> hin >> min >> sin >> hout >> mout >> sout;
total = hout * 3600 + mout * 60 + sout - hin * 3600 - min * 60 - sin;
cout << hin / 3600 << " " << (total % 3600) / 60 << " " << total%60;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:17: error: 'cin' was not declared in this scope; did you mean 'sin'?
5 | cin >> hin >> min >> sin >> hout >> mout >> sout;
| ^~~
| sin
a.cc:9:17: error: 'cout' was not declared in this scope; did you mean 'sout'?
... |
s843313785 | p00455 | C++ | #include<iostream>
using namespace std;
int main()
{
int i,a,b,c,A,B,C,x,y,z,i;
for(i=0;i<3;i++){
cout>>a>>b>>c>>A>>B>>C;
i=(3600*A+60*B+C)-(3600*a+60*b+c);
x=i/3600;
y=(i-3600*x)/60;
z=i-(3600*x+60*y)
cout<<x<<' '<<y<<' '<<z<<'\n';
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:25: error: redeclaration of 'int i'
6 | int i,a,b,c,A,B,C,x,y,z,i;
| ^
a.cc:6:5: note: 'int i' previously declared here
6 | int i,a,b,c,A,B,C,x,y,z,i;
| ^
a.cc:8:5: error: no match for 'operator>>' (operand types are 'std::ostream' {... |
s946700230 | p00455 | C++ | #include<iostream>
using namespace std;
int main()
{
int i,a,b,c,A,B,C,x,y,z,i;
for(i=0;i<3;i++){
cout>>a>>b>>c>>A>>B>>C;
i=(3600*A+60*B+C)-(3600*a+60*b+c);
x=i/3600;
y=(i-3600*x)/60;
z=i-(3600*x+60*y);
cout<<x<<' '<<y<<' '<<z<<'\n';
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:25: error: redeclaration of 'int i'
6 | int i,a,b,c,A,B,C,x,y,z,i;
| ^
a.cc:6:5: note: 'int i' previously declared here
6 | int i,a,b,c,A,B,C,x,y,z,i;
| ^
a.cc:8:5: error: no match for 'operator>>' (operand types are 'std::ostream' {... |
s546277926 | p00455 | C++ | #include<iostream>
using namespace std;
int main()
{
int i,a,b,c,A,B,C,x,y,z,i;
for(i=0;i<3;i++){
cout>>a>>b>>c>>A>>B>>C;
i=(3600*A+60*B+C)-(3600*a+60*b+c);
x=i/3600;
y=(i-3600*x)/60;
z=i-(3600*x+60*y);
cout<<x<<' '<<y<<' '<<z<<'\n';
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:25: error: redeclaration of 'int i'
6 | int i,a,b,c,A,B,C,x,y,z,i;
| ^
a.cc:6:5: note: 'int i' previously declared here
6 | int i,a,b,c,A,B,C,x,y,z,i;
| ^
a.cc:8:5: error: no match for 'operator>>' (operand types are 'std::ostream' {... |
s508084951 | p00455 | C++ | #include<iostream>
using namespace std;
int main(){
for(int i=0;i++i<3){
int h1,m1,s1,h2,m2,s2,ans;
cin>>h1>>m1>>s1>>h2>>m2>>s2;
ans = ((h2*3600)+(m2*60)+s2)-((h1*3600)+(m1*60)+s1);
cout<<ans/3600<<" " <<(ans%3600)/60<<" "<<(ans%3600)%60;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:4:16: error: expected ';' before 'i'
4 | for(int i=0;i++i<3){
| ^
| ;
|
s647974058 | p00455 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a[6];
for(int b=0;b<3;b++){
for(int c=0;c<6;c++)scanf("%d",&a[c]);
int d=(a[3]-a[0])*3600+(a[4]-a[1])*60+(a[5]-a[2]);
printf("%d %d %d\n",d/3600,d%3600/60,d%3600%60)
}
} | a.cc: In function 'int main()':
a.cc:9:64: error: expected ';' before '}' token
9 | printf("%d %d %d\n",d/3600,d%3600/60,d%3600%60)
| ^
| ;
10 | }
... |
s881985710 | p00455 | C++ | #include <array>
#include <utility>
#include <iostream>
#include <algorithm>
using std::cin;
using std::cout;
using std::endl;
using std::pair;
using std::array;
using std::for_each;
using time = struct _time {int h,m,s;}; // type of time
using emp = pair<time,time>; // type of employee
time operator-(time t1,time t... | a.cc:13:39: error: 'using time = struct _time' redeclared as different kind of entity
13 | using time = struct _time {int h,m,s;}; // type of time
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-defa... |
s679717636 | p00455 | C++ | #include <array>
#include <utility>
#include <iostream>
#include <algorithm>
using std::cin;
using std::cout;
using std::endl;
using std::pair;
using std::array;
using std::for_each;
using time = struct _time {int h,m,s;}; // type of time
using emp = pair<time,time>; // type of employee
time operator-(time t1,time t... | a.cc:13:39: error: 'using time = struct _time' redeclared as different kind of entity
13 | using time = struct _time {int h,m,s;}; // type of time
| ^
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-defa... |
s797199396 | p00455 | C++ | 7 0 0 7 0 1
7 0 1 7 1 0
7 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 7 0 0 7 0 1
| ^
|
s046815859 | p00455 | C++ | #include <iostream>
using namespace std;
int main(void)
{
int a,b,c,d,e,f,g,h,i,j,k;
for (a=0;a<3;a++)
{
cin>>b>>c>>d>>e>>f>>g;
h=e-b;
j=g-d;
if (j<0)
{
j=60+j;
i=i-1;
}
i=f-c;
}
if (i<0)
{
i=60+i;
h=h-1;
}
cout<<h<<" "<<i<<" "<<j<<endl;
}
return 0;
} | a.cc:25:9: error: expected unqualified-id before 'return'
25 | return 0;
| ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
26 | }
| ^
|
s990954347 | p00455 | C++ | #include <iostream>
#include <stdio.h>
#include <string.h>
#include <functional>
#include <algorithm>
#include <string>
#include <vector>
#include <algorithm>
#include <time.h>
#include <stdlib.h>
using namespace std;
int main (void)
{
int a,aa,aaa,b,bb,bbb,T,TT,TTT;
for (int i = 0; i < 3; i++)
{
cin >> a... | a.cc: In function 'int main()':
a.cc:53:3: error: expected '}' at end of input
53 | }
| ^
a.cc:15:1: note: to match this '{'
15 | {
| ^
|
s484338121 | p00455 | C++ | import java.util.*;
import static java.lang.System.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
while (sc.hasNext()) {
int arrive = 0;
for (int i=0; i<3; i++) {
if (i==0) arrive += sc.nextInt()*3600;
else if (i==1) arrive += sc.nextInt()*... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import static java.lang.System.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodule... |
s021587072 | p00455 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int a[3][2][3]={};
for(int i=0;i<3;i++){
cin>>a[i][0][0]>>a[i][0][1]>>a[i][0][2]>>a[i][1][0]>>a[i][1][1]>>a[i][1][2];
a[i][0][2]=a[i][1][2]-a[i][0][2];
if(a[i][0][2]<0){a[i][0][2]+=60; a[i][1][1]-=1;}
a[i][0][1]=a[i][1][1]-a[i][0][1... | a.cc: In function 'int main()':
a.cc:27:3: error: 'retu' was not declared in this scope
27 | retu
| ^~~~
a.cc:27:7: error: expected '}' at end of input
27 | retu
| ^
a.cc:8:11: note: to match this '{'
8 | int main(){
| ^
|
s365067859 | p00455 | C++ | #include<bits.stdc++.h>
using namespace std;
int main(){
for(int i = 0; i < 3; i ++){
int h, m, s, ah, am, as;
cin>>h>>m>>s>>ah>>am>>as;
int a, b, c, b;
a = {(3600 * ah + 60 * am + as) - (3600 * h + 60 * m + s)};
b = a / 3600;
c = (a - 3600 * b) / 60;
d = a - 3600 * b - 60 * c;
cout<... | a.cc:1:9: fatal error: bits.stdc++.h: No such file or directory
1 | #include<bits.stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s604706243 | p00455 | C++ | #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main()
{
//2.すごろく
/*
int n;
cin >> n;
int A, _A = 1;
int k = 0;
int A_count[100];
A_count[0] = 1;
for (int i = 0; i < n; i++)
{
cin >> A;
if (A == 1)
{
if (A == _A)
{
A_count[k]++;
}
else
{
k++;
... | a.cc: In function 'int main()':
a.cc:58:61: error: expected ';' before ':' token
58 | cout << x[n][0] << x[n][1] << x[n][2] <<endl:
| ^
| ;
|
s829460380 | p00455 | C++ | #include<iostream>
using namespace std;
int main() {
for (int i = 0; i < 3; i++) {
int h, m, s, H, M, S,x,y.z;
cin >> h >> m >> s >> H >> M >> S;
if (S - s < 0) {
z = S + 60 - s;
if (M - m = 0) {
H--;
M = M + 60;
}
M--;
}
else {
z = S - s;
}
if (M - m < 0) {
H--;
y = M + 6... | a.cc: In function 'int main()':
a.cc:7:41: error: expected initializer before '.' token
7 | int h, m, s, H, M, S,x,y.z;
| ^
a.cc:11:25: error: 'z' was not declared in this scope
11 | z = S + 60 - s;
| ... |
s861215996 | p00455 | C++ | #include<iostream>
using namespace std;
int main() {
for (int i = 0; i < 3; i++) {
int h, m, s, H, M, S,x,y,z;
cin >> h >> m >> s >> H >> M >> S;
if (S - s < 0) {
z = S + 60 - s;
if (M - m = 0) {
H--;
M = M + 60;
}
M--;
}
else {
z = S - s;
}
if (M - m < 0) {
H--;
y = M + 6... | a.cc: In function 'int main()':
a.cc:12:31: error: lvalue required as left operand of assignment
12 | if (M - m = 0) {
| ~~^~~
|
s088382665 | p00455 | C++ | #include <iostream>
#include <vector>
using namespace std;
struct time{
int h,m,s;
};
int main(){
time as,af,bs,bf,cs,cf;
cin >> as.h >> as.m >> as.s >> af.h >> af.m >> af.s;
cin >> bs.h >> bs.m >> bs.s >> bf.h >> bf.m >> bf.s;
cin >> cs.h >> cs.m >> cs.s >> cf.h >> cf.m >> cf.s;
int amin = (af.h)*60*60 + (... | a.cc: In function 'int main()':
a.cc:12:13: error: expected ';' before 'as'
12 | time as,af,bs,bf,cs,cf;
| ^~~
| ;
a.cc:13:16: error: 'as' was not declared in this scope; did you mean 'abs'?
13 | cin >> as.h >> as.m >> as.s >> af.h >> af.m >> af.s;
| ... |
s006849553 | p00455 | C++ | #include <iostream>
#include <vector>
using namespace std;
class time{
public:
int h,m,s;
};
int main(){
time as,af,bs,bf,cs,cf;
cin >> as.h >> as.m >> as.s >> af.h >> af.m >> af.s;
cin >> bs.h >> bs.m >> bs.s >> bf.h >> bf.m >> bf.s;
cin >> cs.h >> cs.m >> cs.s >> cf.h >> cf.m >> cf.s;
int amin = (af.h)*60... | a.cc: In function 'int main()':
a.cc:13:13: error: expected ';' before 'as'
13 | time as,af,bs,bf,cs,cf;
| ^~~
| ;
a.cc:14:16: error: 'as' was not declared in this scope; did you mean 'abs'?
14 | cin >> as.h >> as.m >> as.s >> af.h >> af.m >> af.s;
| ... |
s282185182 | p00455 | C++ | #include <iostream>
#include <vector>
using namespace std;
class time{
public:
int h,m,s;
};
int main(){
time as,af,bs,bf,cs,cf;
cin >> as.h >> as.m >> as.s >> af.h >> af.m >> af.s;
cin >> bs.h >> bs.m >> bs.s >> bf.h >> bf.m >> bf.s;
cin >> cs.h >> cs.m >> cs.s >> cf.h >> cf.m >> cf.s;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:13: error: expected ';' before 'as'
13 | time as,af,bs,bf,cs,cf;
| ^~~
| ;
a.cc:14:16: error: 'as' was not declared in this scope; did you mean 'abs'?
14 | cin >> as.h >> as.m >> as.s >> af.h >> af.m >> af.s;
| ... |
s430701957 | p00455 | C++ | #include <iostream>
#include <vector>
using namespace std;
class time{
public:
int h,m,s;
};
int main(){
time as,af,bs,bf,cs,cf;
return 0;
} | a.cc: In function 'int main()':
a.cc:13:13: error: expected ';' before 'as'
13 | time as,af,bs,bf,cs,cf;
| ^~~
| ;
|
s201149716 | p00455 | C++ | #include <iostream>
#include <string>
using namespace std;
int main(){
int a;
int b;
int c;
int d;
int e;
int f;
int g;
int h;
int i;
int j;
g=0;
while(g<3){
cin >>a;
cin >>b;
cin >>c;
cin >>d;
cin >>e;
cin >>f;
if(c>f){f=f+60; e=e-1;}
if(b>e){e=e+60; d=d-1;}
h=d-a;
i=e-b;
j=f-c;
cout <<h<<" "<<i<<" "<<j<<endl;
g=g+1;} | a.cc: In function 'int main()':
a.cc:29:8: error: expected '}' at end of input
29 | g=g+1;}
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s506751021 | p00455 | C++ | #include <cstdio>
int main()
{
for(int i = 0; i < 3; ++i) {
int l[3], r[3];
for(int j = 0; j < 3; ++j)
scanf("%d", l + j);
for(int j = 0; j < 3; ++j)
scanf("%d", r + j);
}
int h, m, s;
s = r[0] - l[0];
if(s < 0) {s += 60; r[1] -= 1; }
m = r[1] - l[1];
if(m < 0) {m += 60; r[2] -= 1; }
h = r[2] - l[2];
printf("%d %d %d\... | a.cc: In function 'int main()':
a.cc:13:5: error: 'r' was not declared in this scope
13 | s = r[0] - l[0];
| ^
a.cc:13:12: error: 'l' was not declared in this scope
13 | s = r[0] - l[0];
| ^
a.cc: At global scope:
a.cc:20:1: error: expected unqualified-id before 'return'
20 | return ... |
s246082076 | p00455 | C++ | #include<iostream>
using namespace std;
struct time{
int h, m, s;
};
int main(void){
time s[3],t[3];
int st,tt,zt;
for(int i = 0; i < 3; i++){
cin >> s[i].h >> s[i].m >> s[i].s >> t[i].h >> t[i].m >> t[i].s;
}
for (int i = 0; i < 3; i++){
st = s[i].s + s[i].m * 60 + s[i].h * 60 * 60;
tt = t[i].s + t[i... | a.cc: In function 'int main()':
a.cc:11:13: error: expected ';' before 's'
11 | time s[3],t[3];
| ^~
| ;
a.cc:15:24: error: 's' was not declared in this scope
15 | cin >> s[i].h >> s[i].m >> s[i].s >> t[i].h >> t[i].m >> t[i].s;
| ... |
s207628601 | p00455 | C++ | #include<iostream>
using namespace std;
typedef struct time{
int h, m, s;
};
int main(void){
time s[3],t[3];
int st,tt,zt;
for(int i = 0; i < 3; i++){
cin >> s[i].h >> s[i].m >> s[i].s >> t[i].h >> t[i].m >> t[i].s;
}
for (int i = 0; i < 3; i++){
st = s[i].s + s[i].m * 60 + s[i].h * 60 * 60;
tt = t[i]... | a.cc:5:1: warning: 'typedef' was ignored in this declaration
5 | typedef struct time{
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:11:13: error: expected ';' before 's'
11 | time s[3],t[3];
| ^~
| ;
a.cc:15:24: error: 's' was not declared in this scope
15 | ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.