submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s716789180 | p03725 | C++ | #include <bits/stdc++.h>
using namespace std;
int n, m, k, step=0; pair<int, int> s, bas;
vector< vector<char> > vec; vector< vector<int> > ans;
queue< pair<int, int> > q; vector< vector<int> > visit;
void dene();
void kir();
void kir(){
while(!q.empty()){
auto p=q.front(); q.pop();
int x=p... | a.cc: In function 'void dene()':
a.cc:50:37: error: reference to 'visit' is ambiguous
50 | int x=s.first; int y=s.second; visit[x][y]=1;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
from a.cc:1:
/usr/include/c++/1... |
s980458609 | p03725 | C++ | #include<iomanip>
#include<limits>
#include<thread>
#include<utility>
#include<iostream>
#include<string>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#include<stack>
#include<queue>
#include<cmath>
#include<numeric>
#include<cassert>
#include<random>
#include<chrono>
#include<unordered_map>
#includ... | In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.h:41,
from /usr/include/c++/14/iomanip:42,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantia... |
s756464505 | p03725 | Java | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Input... | Main.java:157: error: reached end of file while parsing
}
^
1 error
|
s177014469 | p03725 | C++ |
1
2
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107... | a.cc:2:1: error: expected unqualified-id before numeric constant
2 | 1
| ^
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... |
s346540485 | p03725 | C++ | #include<cstdio>
#include<queue>
#include<cstring>
#include<algorithm>
#define pii pair<int,int>
#define mp make_pair
using namespace std;
int n,m,k,cx,cy,ans=1e9;
char s[805][805];
int d[805][805];
const int dx[]={0,1,-1,0},dy[]={1,0,0,-1};
void bfs()
{
queue<pair<pii,int> > q;
q.push(mp(pii(cx,cy),0));
while(!q.em... | a.cc: In function 'int main()':
a.cc:27:34: error: 'gets' was not declared in this scope; did you mean 'getw'?
27 | scanf("%d%d%d",&n,&m,&k);gets(s[0]);
| ^~~~
| getw
|
s904180394 | p03725 | C++ | #include<bits/stdc++.h>
#include<queue>
using namespace std;
const int dx[]={1,0,-1,0};//position prepare
const int dy[]={0,1,0,-1};//position prepare
int n,m,k;
int d[1050][1050];//record distance
int sx,sy,x,y;
int xx,yy;
char c[1050][1050];
queue<pair<int,int> > q;
bool check(int a,int b){//check if the grid is in u... | a.cc: In function 'int main()':
a.cc:70:40: error: no matching function for call to 'min(long long int&, int)'
70 | res=min(res,1+((minidis(i,j)+k-1)/k));
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:... |
s857482463 | p03725 | C++ | #include <bits/stdc++.h>
using std::cout;
using std::endl;
using std::cin;
constexpr int vx[] = {1, 0, -1, 0}, vy[] = {0, 1, 0, -1};
int dp[h][w][801];
bool used[h][w];
int main(){
int h, w, K; cin >> h >> w >> K; std::vector<std::string> s(h);
for(int i = 0; i < h; i++) cin >> s[i];
int sx, sy;
for(int i = 0; ... | a.cc:7:8: error: 'h' was not declared in this scope
7 | int dp[h][w][801];
| ^
a.cc:7:11: error: 'w' was not declared in this scope
7 | int dp[h][w][801];
| ^
a.cc:8:11: error: 'h' was not declared in this scope
8 | bool used[h][w];
| ^
a.cc:8:14: error: 'w' was ... |
s882192813 | p03725 | C++ | #include<iostream>
#include<vector>
#include<string>
#include<set>
#include<map>
#include<algorithm>
#include<queue>
#include<list>
#include<stack>
#include<cstdio>
#include<fstream>
#include<numeric>
#include<functional>
#include<utility>
#include<memory>
#include <cstring>
using namespace std;
const int M = 1e3;
char... | a.cc: In function 'void bfs(TnT)':
a.cc:28:12: error: 'vis' was not declared in this scope
28 | memset(vis , false , sizeof(vis));
| ^~~
a.cc: In function 'int main()':
a.cc:49:16: error: 'K' was not declared in this scope
49 | cin>>h>>w>>K;
| ^
|
s050566337 | p03725 | C++ | #include <iostream>
#include <queue>
#include <tuple>
#include <cstring>
using namespace std;
static int dr[4] = {1, 0, -1, 0},
dc[4] = {0, 1, 0, -1};
static int H, W, K;
bool inside(int r, int c) {
return 0 <= r and r < H and 0 <= c and c < W;
}
int main() {
const int MAXH = 810;
const int M... | a.cc: In function 'int main()':
a.cc:47:20: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
47 | int x = min({r, H - 1 - r, c, W - 1 - c});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /us... |
s032610600 | p03725 | C++ | #include <iostream>
#include <queue>
#include <tuple>
#include <cstring>
using namespace std;
static int dr[4] = {1, 0, -1, 0},
dc[4] = {0, 1, 0, -1};
static int H, W, K;
bool inside(int r, int c) {
return 0 <= r and r < H and 0 <= c and c < W;
}
int main() {
const int MAXH = 810;
const int M... | a.cc: In function 'int main()':
a.cc:47:20: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
47 | int x = min({r, H - 1 - r, c, W - 1 - c});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /us... |
s602290141 | p03725 | C++ | #pragma GCC optimize("O3")
#include<bits/stdc++.h>
#define rc(x) return cout<<x<<endl,0
#define pb push_back
#define in insert
#define er erase
#define fr first
#define sc second
typedef long long ll;
const long long llinf=LLONG_MAX;
const int inf=INT_MAX;
const int nmax=1e5+5;
const int mod=1e9+7;
using namespace std;... | a.cc: In function 'void solve(int, int)':
a.cc:23:16: error: no matching function for call to 'min(ll&, int)'
23 | ans=min(ans,(d+k-1)/k);
| ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51... |
s584372064 | p03725 | C++ | #include<bits/stdc++.h>
using namespace std;
int H, W, K;
int MAP[1000][1000];
int x, y, vis[1000][1000];
int ans = 2147483647;
const int dx[4] = {0, 1, 0, -1};
const int dy[4] = {1, 0, -1, 0};
struct PR {
int x, y, now;
PR() {x = y = now = 0;}
PR(int _x, int _y, int _now) {x = _x, y = _y, now = _now;}
};
b... | a.cc: In function 'int main()':
a.cc:40:28: error: no match for 'operator+' (operand types are 'PR' and 'int')
40 | tmp = (tmp + K - 1) / K;
| ~~~ ^ ~
| | |
| PR int
In file included from /usr/include/c++/14... |
s419866929 | p03725 | C++ | #include <cstdio>
#include <iostream>
#include <cstring>
#include <string>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <utility>
#include <map>
#include <stack>
#include <set>
#include <vector>
#include <queue>
#include <deque>
#include <sstream>
#include <bitset>
#define x first
#define y second... | a.cc: In function 'void dfs(int, int, int)':
a.cc:49:22: error: reference to 'move' is ambiguous
49 | xx=x+move[i][1];yy=y+move[i][2];
| ^~~~
In file included from /usr/include/c++/14/algorithm:86,
from a.cc:6:
/usr/include/c++/14/pstl/glue_algorithm_defs.h... |
s953950416 | p03725 | C++ |
#include<iostream>
#include<fstream>
#include<stdio.h>
#include<string>
#include<vector>
#include<map>
#include<math.h>
#include<algorithm>
#include<iomanip>
#include<set>
using namespace std;
class Node {
public:
int x, y, d;
Node(int a, int b, int c) {
x = a;
y = b;
d = c;
}
}... | a.cc:86:16: error: extended character is not valid in an identifier
86 | if(now.d - 1 == k) {
| ^
a.cc:86:20: error: extended character is not valid in an identifier
86 | if(now.d - 1 == k) {
| ^
a.cc: In function 'int main()':
a.cc:86:16: error: '... |
s327826809 | p03725 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair <int, int> pii;
typedef pair <int, pii> piii;
#define fr first
#define sc second
#define pb push_back
#define mpr make_pair
#define ppb pop_back()
#define ins insert
#define sz(s) int(s.size())
#define all(x) x.begin(), x.end()
#define l... | a.cc: In function 'int main()':
a.cc:65:26: error: expected ';' before 'return'
65 | cout << k
| ^
| ;
66 | return 0;
| ~~~~~~
|
s968185080 | p03725 | C++ | #include<cstdio>
#include<utility>
#include<queue>
#define N 800
using namespace std;
int a[N+2][N+2];
char s[N+1];
queue<pair<int,int> > Q;
int minim(int a,int b){
return (a<b) ? a : b;
}
int main(){
int n,m,k;
int i,j;
scanf ("%d%d%d\n",&n,&m,&k);
pair<int,int> S;
for(i=1;i<=n;i++){
... | a.cc: In function 'int main()':
a.cc:24:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
24 | gets(s);
| ^~~~
| getw
|
s582250066 | p03725 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<set>
#include<ctime>
#include<vector>
#include<cmath>
#include<algorithm>
using namespace std;
inline void write(int a){
if(a>=10)write(a/10);
putchar('0'+a%10);
}
inline void writeln(int a){
write(a); puts("");
}
inline int read()//不管是... | a.cc: Assembler messages:
a.cc:40: Error: operand type mismatch for `mov'
|
s651679842 | p03725 | C++ | import java.io.*;
import java.math.*;
import java.util.*;
public class Main {
private static boolean debug = false;
private static boolean elapsed = false;
private static PrintWriter _out = new PrintWriter(System.out);
private static PrintWriter _err = new PrintWriter(System.err);
private int H;
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
2 | import java.math.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: ... |
s346426509 | p03725 | C++ | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <array>
#include <deque>
#include <algorithm>
#include <utility>
#include <cstdint>
#include <functional>
#include <iomani... | a.cc: In function 'int main()':
a.cc:65:14: error: 'j' was not declared in this scope
65 | d[i][j] = 999999;
| ^
|
s684700004 | p03725 | C++ | #if 1
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <array>
#include <deque>
#include <algorithm>
#include <utility>
#include <cstdint>
#include <functional>
#include <... | a.cc: In function 'int main()':
a.cc:70:69: error: 'ceil' was not declared in this scope
70 | res = std::min(res, (long long)(1 + ceil(1.0 * (std::min({ i,H - i - 1,w,W - w - 1 }) / K)));
| ^~~~
|
s658853924 | p03725 | C++ | #if 1
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <array>
#include <deque>
#include <algorithm>
#include <utility>
#include <cstdint>
#include <functional>
#include <... | a.cc:1: error: unterminated #if
1 | #if 1
|
s817615268 | p03725 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<pair<int, int> > vp;
#define pb push_back
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
#define out(n) cout << (n) << endl;
__a... | a.cc: In function 'int main()':
a.cc:87:24: error: expected primary-expression before ')' token
87 | out((z == 0 ? mini : ) / k + 2)
| ^
a.cc:13:25: note: in definition of macro 'out'
13 | #define out(n) cout << (n) << endl;
| ^
|
s094218096 | p03725 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<pair<int, int> > vp;
#define pb push_back
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
#define out(n) cout << (n) << endl;
__a... | a.cc: In function 'int main()':
a.cc:71:47: error: expected ';' before 'if'
71 | mini = min(min(sh, h - sh), min(sw, w - sw))
| ^
| ;
72 |
73 | if(!tansaku(sh, sw, 0)) {
| ~~ ... |
s429110843 | p03725 | C++ | #include <iostream>
#include <sstream>
#include <vector>
#include <cmath>
#include <ctime>
#include <cassert>
#include <ctype.h>
#include <iomanip>
#include <cstdio>
#include <float.h>
#include <queue>
#include <set>
#include <map>
#include <fstream>
#include <cstdlib>
#include <string>
#include <cstring>
#include <alg... | a.cc: In function 'long long int calc(int, int)':
a.cc:83:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
83 | int main()
| ^~
a.cc:83:9: note: remove parentheses to default-initialize a variable
83 | int main()
| ^~
| --
a.cc:8... |
s854149278 | p03725 | C++ |
#include <iostream>
#include <algorithm>
#include <string.h>
#include <vector>
#include <queue>
using namespace std;
#define pb push_back
#define mp make_pair
#define ll long long
#define ull unsigned ll
#define db double
#define INF 0x3f3f3f3f
#define MOD 1000000007
#define PII pair<int, int>
const int N=805;
int ... | a.cc: In function 'void bfs(int, int, int)':
a.cc:77:21: error: 'struct node' has no member named 'xx'; did you mean 'x'?
77 | if (vis[cur.xx][cur.yy]) continue;
| ^~
| x
a.cc:77:29: error: 'struct node' has no member named 'yy'; did you mean 'y'?
77 | ... |
s485886419 | p03725 | C++ | #include<bits/stdc++.h>
#define up(j,k,i) for(ll i=j;i<k;i++)
#define down(j,k,i) for(ll i=j;i>k;i--)
#define M 1000000007
#define pp(n) printf("%lld\n",ll(n))
#define ps(n) printf("%lld ",ll(n))
#define pd(x,y) printf("%lld %lld\n",ll(x),ll(y))
#define is(n) scanf("%lld",&n)
#define inf 1e15
#define id(n,m) scanf("%ll... | a.cc:81:29: error: empty character constant
81 | if(a[i][j]=='')
| ^~
|
s161619848 | p03725 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <stack>
#include <algorithm>
#include <cmath>
int main()
{
long long h, w, k, sx, sy;
std::cin >> h >> w >> k;
std::vector<std::string> v(h);
for (long long i = 0; i < h; i++) {
std::cin >> v[i];
auto pos = std::find(v[i].begin(), v[i].end(... | a.cc: In function 'int main()':
a.cc:43:62: error: expected ';' before '}' token
43 | v[x + xx[i]][y + yy[i]] = '#' // 一度行った場所に行かないようにする
| ^
| ;
44 ... |
s821718451 | p03725 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <stack>
#include <algorithm>
int main()
{
long long h, w, k, sx, sy;
std::cin >> h >> w >> k;
std::vector<std::string> v(h);
for (long long i = 0; i < h; i++) {
std::cin >> v[i];
auto pos = std::find(v[i].begin(), v[i].end(), 'S');
if (po... | a.cc: In function 'int main()':
a.cc:50:65: error: 'ceil' is not a member of 'std'
50 | ans = std::min(ans, static_cast<long long>(std::ceil(1.0 * x / k)));
| ^~~~
a.cc:51:65: error: 'ceil' is not a member of 'std'
51 | ... |
s590685358 | p03725 | C++ | #include <iostream>
#include <string>
#include <vector>
#include <stack>
int main()
{
long long h, w, k, sx, sy;
std::cin >> h >> w >> k;
std::vector<std::string> v(h);
for (long long i = 0; i < h; i++) {
std::cin >> v[i];
auto pos = std::find(v[i].begin(), v[i].end(), 'S');
if (pos != v[i].end()) {
... | a.cc: In function 'int main()':
a.cc:16:37: error: no matching function for call to 'find(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, char)'
16 | auto pos = std::find(v[i].begin(), v[i].end(), 'S');
| ~~~~~~~~~^~~~~~~~~~~~~~... |
s637859219 | p03725 | C++ | #include <iostream>
#include <cstring>
#include <cstdio>
#include <queue>
using namespace std;
const int M = 1e3;
char mmp[M][M], s[M][M];
int h, w, k, step[M][M], dr[4][2] = {1, 0, -1, 0, 0, 1, 0, -1};
struct TnT
{
int x, y, step, flag;
};
bool vis[M][M];
void bfs(TnT sta)
{
memset(step, 0, sizeof(step));
... | a.cc:81:11: error: expected constructor, destructor, or type conversion before '(' token
81 | printf("%d\n", ans);
| ^
a.cc:82:5: error: expected unqualified-id before 'return'
82 | return 0;
| ^~~~~~
a.cc:83:1: error: expected declaration before '}' token
83 | }
| ^
|
s603929623 | p03725 | C++ | #include <iostream>
#include <cstring>
#include <cstdio>
#include <queue>
using namespace std;
const int M = 1e3;
char mmp[M][M], s[M][M];
int h, w, k, step[M][M], dr[4][2] = {1, 0, -1, 0, 0, 1, 0, -1};
struct TnT
{
int x, y, step, flag;
};
bool vis[M][M];
void bfs(TnT sta)
{
memset(step, 0, sizeof(step));
... | a.cc: In function 'int main()':
a.cc:74:48: error: 'gg' was not declared in this scope; did you mean 'gl'?
74 | int gl = step[i][j] / k + (gg % k != 0);//可以变gl次
| ^~
| gl
|
s117574550 | p03725 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <unordered_set>
#include <map>
#include <algorithm>
using namespace std;
const int dy[4] = {1, 0, -1, 0};
const int dx[4] = {0, 1, 0, -1};
int H, W, K;
class Coord {
public:
int y, x, k;
Coord(int i, int j, int _k) {
y =... | a.cc: In function 'int main()':
a.cc:33:12: error: 'String' was not declared in this scope
33 | vector<String> A(H);
| ^~~~~~
a.cc:33:18: error: template argument 1 is invalid
33 | vector<String> A(H);
| ^
a.cc:33:18: error: template argument 2 is invalid
a.cc:38:17... |
s491804383 | p03725 | C++ | #include <vector>
#include <string.h>
#include<iostream>
#include<set>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<string.h>
#include<algorithm>
#include <stdlib.h>
#include<queue>
using namespace std;
const int mod=1e9+7;
typedef long long ll;
#define out_vector(v) for(auto a:v)cout<<a<<" ... | a.cc: In function 'int main()':
a.cc:47:32: error: 'ceil' was not declared in this scope
47 | else ans=min(ans,1+int(ceil(min(mx,my)/k)));
| ^~~~
|
s111382388 | p03725 | C++ | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
const int N = 1000;
const int INF = 1 << 30;
inline char get(void) {
return getchar();
static char buf[100000], *S = buf, *T = buf;
if (S == T) {
T = (S = buf) + fread(buf, 1, 100000, stdin);
if (S == T) ... | a.cc: In function 'int main()':
a.cc:49:32: error: 'gets' was not declared in this scope; did you mean 'getw'?
49 | for (int i = 1; i <= n; i++) gets(ch[i] + 1);
| ^~~~
| getw
|
s215127042 | p03725 | C++ | #include <iostream>
#include<algorithm>
#include<math.h>
using namespace std;
#define INF 10000000
int x[4]={-1,1,0,0};
int y[4]={0,0,1,-1};
int H,W,K,inf=INF;
int checked[800][800]={0};
int map[800][800];
int start[2];
char s;
vector<int> P;
void dfs(int a,int b,int d){
checked[a][b]a=d;
P.push_back(fmin(inf... | a.cc:13:1: error: 'vector' does not name a type
13 | vector<int> P;
| ^~~~~~
a.cc: In function 'void dfs(int, int, int)':
a.cc:17:18: error: expected ';' before 'a'
17 | checked[a][b]a=d;
| ^
| ;
a.cc:18:5: error: 'P' was not declared in this scope
18 | ... |
s938020118 | p03725 | C++ | #include <iostream>
#include <queue>
using namespace std;
int dx[] = { 1, -1, 0, 0 };
int dy[] = { 0, 0, 1, -1 };
int main() {
int height, width, k;
cin >> height
>> width
>> k;
int startHeight;
int startWidth;
char grid[height][width];
for (int i = 0; i < height; i++) {
for (int j = ... | a.cc: In function 'int main()':
a.cc:37:9: error: 'statHeight' was not declared in this scope; did you mean 'startHeight'?
37 | board[statHeight][startWidth] = 0;
| ^~~~~~~~~~
| startHeight
a.cc:48:28: error: request for member 'size' in 'dx', which is of non-class type 'int [4]'
48 ... |
s077016117 | p03725 | Java | import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int h = in.nextInt(), w = in.nextInt(), k = in.nextInt();
String[] mazes = new String[h];
for (int i = 0; i < mazes.length; i++) ... | Main.java:121: error: reached end of file while parsing
}
^
1 error
|
s835458923 | p03725 | Java | import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
new Main().solve();
}
int H,W,K;
String[]A;
void solve(){
Scanner sc=new Scanner(System.in);
int count=0;
H=sc.nextInt();
W=sc.nextInt();
K=sc.nextInt(); //=魔法の移動... | Main.java:108: error: reached end of file while parsing
}
^
1 error
|
s903009016 | p03725 | C++ | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define poq pop_back
#define tof ios_base :: sync_with_stdio(NULL);cin.tie(0);cout.tie(0)
using namespace std;
char y[809][809];
bool viz[809][809];
bool vizz[809][809];
int main()
{
ll h,... | a.cc:95:17: error: extended character « is not valid in an identifier
95 | cout«1;
| ^
a.cc:105:17: error: extended character « is not valid in an identifier
105 | cout«1;
| ^
a.cc: In function 'int main()':
a.cc:95:17: error: 'cout\U00000... |
s361354333 | p03725 | C++ | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define poq pop_back
#define tof ios_base :: sync_with_stdio(NULL);cin.tie(0);cout.tie(0)
using namespace std;
char y[809][809];
bool viz[809][809];
bool vizz[809][809];
int main()
{
ll h,... | a.cc:22:5: error: extended character » is not valid in an identifier
22 | cin»h»w»k;
| ^
a.cc:22:5: error: extended character » is not valid in an identifier
a.cc:22:5: error: extended character » is not valid in an identifier
a.cc:27:13: error: extended character » is not valid in an identifier
27 ... |
s708093596 | p03725 | C++ | #include<bits/stdc++.h>
using namespace std;
long long H, W, K;
long long A[805][805];
long long WORK[805][805];
#define OPEN INT_MAX
#define CLOSED LONG_MAX/3
bool valid(long long h, long long w){
return (h >= 0) && (h < H) && (w >= 0) && (w < W);
}
void move(long long h, long long w, long long cost){
if(valid... | In file included from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of '_OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = true; _II = long long int; _OI = in... |
s624966357 | p03725 | C++ | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define poq pop_back
#define tof ios_base :: sync_with_stdio(NULL);cin.tie(0);cout.tie(0)
using namespace std;
char y[809][809];
bool viz[809][809];
bool vizz[809][809];
int main()
{
ll h,... | a.cc:22:5: error: extended character » is not valid in an identifier
22 | cin»h»w»k;
| ^
a.cc:22:5: error: extended character » is not valid in an identifier
a.cc:22:5: error: extended character » is not valid in an identifier
a.cc:27:13: error: extended character » is not valid in an identifier
27 ... |
s714896033 | p03725 | C++ | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
using namespace std;
#define PI acos(-1.0)
#define FOR(I,A,B) for(int I = (A)... | a.cc: In function 'int main()':
a.cc:60:28: error: expected primary-expression before '<' token
60 | if(MIN==0) cout << 1 < <endl;
| ^
|
s647316932 | p03725 | C++ | #include <bits/stdc++.h>
#define X first
#define Y second
#define pb push_back
#define mp make_pair
using namespace std;
int w, h, k;
char ch[810][810];
bool vis[810][810];
const int xx[4] = {0, 1, 0, -1};
const int yy[4] = {1, 0, -1, 0};
vector<pair<int, int> > pt;
void dfs(int x, int y, int time)
{
if(time > k) r... | a.cc: In function 'void dfs(int, int, int)':
a.cc:19:31: error: expected ';' before 'for'
19 | pt.push_back(mp(x, y))
| ^
| ;
20 | for(int i = 0; i < 4; i ++)
| ~~~
a.cc:20:24: error: 'i' was ... |
s785827032 | p03725 | C++ | #include <stdio.h>
#include <queue>
using namespace std;
int H,W,K; char map[808][808]; int dist[808][808];
int main()
{
scanf ("%d %d %d",&H,&W,&K);
queue<pair<int, int> > Q;
for (int i=0;i<H;i++){
scanf ("%s",map[i]);
for (int j=0;j<W;j++){
dist[i][j] = -1;
if (map[i][j] == 'S'){
Q.push({i,j}); dis... | a.cc: In function 'int main()':
a.cc:36:29: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
36 | int r = (min({i,H-i-1,j,W-j-1}) + K - 1) / K + 1;
| ~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/deque:62,
... |
s843167691 | p03725 | C++ | #include <iostream>
#include <stdio.h>
#include <queue>
using namespace std;
char str[888][888];
int sx,sy;
int dx[]={-1,1,0,0};
int dy[]={0,0,-1,1};
struct node
{
int x,y;
};
int dp[888][888];
int vis[888][888];
int h,w,k;
void BFS()
{
node a,b,c;
a.x=sx;
a.y=sy;
queue<node> que;
while(!q... | a.cc: In function 'int main()':
a.cc:82:14: error: 'INT_MAX' was not declared in this scope
82 | int mins=INT_MAX;
| ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
3 | #include <queue>
+++ |+#include <climits>
... |
s791224109 | p03725 | C++ | #include <bits/stdc++.h>
#define int long long
#define double long double
using namespace std;
template<class T> string tostr(T x) { stringstream o; o << x; return o.str(); }
template<class T> T sqr(T x) { return x*x; }
template<class T> T mypow(T x, int n) { T r = 1; while (n > 0) { if (n & 1)r = r*x; x = x*x; n >>... | a.cc: In lambda function:
a.cc:64:32: error: expected ';' before 'while'
64 | vis[sy][sx] = 0
| ^
| ;
65 |
66 | while(q.size()){
| ~~~~~
|
s280369647 | p03725 | C++ | #include<bits/stdc++.h>
using namespace std;
const int move[4][2]={{0,1},{0,-1},{1,0},{-1,0}};
#define INF 0x3f3f3f3f
template<typename T>
void read(T &x)
{
char ch=getchar();
int f=1;
for (x=0;ch!='-'&&(ch<'0'||ch>'9');ch=getchar());
if (ch=='-') f=-1,ch=getchar();
for (;ch>='0'&&ch<='9';x=x*10+ch-... | a.cc: In function 'void dfs(int, int, int)':
a.cc:34:28: error: reference to 'move' is ambiguous
34 | int newx=x+move[i][0];
| ^~~~
In file included from /usr/include/c++/14/algorithm:86,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
... |
s698743387 | p03725 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <queue>
#include <functional>
using namespace std;
#define INF (int)1e7
int N, M, K;
vector<vector<int>>Room;
int status[800][800];
int cost[800][800];
int v[] = { -1, 0, 1, 0 };
int h[] = { 0, 1, 0, -1 };
vector<pair... | a.cc: In function 'int main()':
a.cc:79:21: error: 'ceil' was not declared in this scope
79 | cout << int(ceil((double)ans[0] / K)) + 1 << endl;
| ^~~~
|
s808339076 | p03725 | C++ | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <util... | a.cc: In function 'int main()':
a.cc:31:5: error: 'memset' was not declared in this scope
31 | memset(vis, -1, sizeof(vis));
| ^~~~~~
a.cc:19:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
18 | #include <utility>
+++ |+#include <cstring>... |
s330373510 | p03725 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef int ll;
#define int long long
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define sz(x) ((int)x.size())
#define all(x) x.begin(),x.end()
typedef pair<int,int>pii;
typedef pair<int,pair<int,int> > piii;
const int mod=1e9+7;
int P... | a.cc: In function 'll main()':
a.cc:94:26: error: expected ';' before 'cout'
94 | ans=min(ans,ans2)
| ^
| ;
95 | cout<<ans<<endl;
| ~~~~
|
s450459221 | p03725 | C++ | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <vector>
#include <list>
#include <algorithm>
#include <functional>
#include <map>
#include <set>
#include <cstring>
#include <string>
#include <cctype>
#include <cassert>
#include <stack>
using namespace std;
#define pb push_back
#def... | a.cc: In function 'int main()':
a.cc:62:17: error: 'gets' was not declared in this scope; did you mean 'getw'?
62 | gets(temp);
| ^~~~
| getw
|
s420090699 | p03725 | C++ | #include<string>
#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;
typedef long long int llint;
#define pub push_back
#define mp make_pair
#define fir first
#define sec second
#define res resize
#define mt make_tuple
const int big=((int)1<<30);
int main(v... | a.cc: In function 'int main()':
a.cc:18:9: error: 'queue' was not declared in this scope
18 | queue<tuple<int,int,int>> que;//x,y,回数
| ^~~~~
a.cc:7:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
6 | #include<functional>
+++ |+#i... |
s629242392 | p03726 | C++ | #include<bits/stdc++.h>
#define ll long long
#define ljc 998244353
using namespace std;
#define gc getchar
inline ll read(){
register ll x=0,f=1;char ch=gc();
while (!isdigit(ch)){if (ch=='-') f=-1;ch=gc();}
while (isdigit(ch)){x=(x<<3)+(x<<1)+ch-'0';ch=gc();}
return (f==1)?x:-x;
}
int head[1010101],tot... | a.cc: In function 'long long int read()':
a.cc:7:17: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
7 | register ll x=0,f=1;char ch=gc();
| ^
a.cc:7:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
7 | register... |
s187001903 | p03726 | C | #include<bits/stdc++.h>
using namespace std;
const int MAXN=1e5+7;
struct side {
int from,to,nex;
}edge[MAXN<<1];
int head[MAXN],cntm=0;
void link(int from,int to) {
edge[++cntm].from=from;
edge[cntm].to=to;
edge[cntm].nex=head[from];
head[from]=cntm;
}
int n;
int col[MAXN],siz[MAXN];
int ans=0;
void dfs(int ... | main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
1 | #include<bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s024630360 | p03726 | C++ | // --------------------------------------------
// **************** gzhffIThh ***************
// --------------------------------------------
// #pragma GCC optimize(2)
// #pragma GCC optimize(3)
#include <iostream>
#include <cstdio>
#include <queue>
#include <vector>
#include <cstring>
#include <algorithm>
using n... | a.cc: In function 'void dfs(int, int)':
a.cc:28:9: error: reference to 'size' is ambiguous
28 | size[now] = 1;
| ^~~~
In file included from /usr/include/c++/14/string:53,
from /usr/include/c++/14/bits/locale_classes.h:40,
from /usr/include/c++/14/bits/ios_base.... |
s692178471 | p03726 | C | #include <bits/stdc++.h>
using namespace std;
const int maxn = 100 * 1000 + 10;
int n;
vector <int> adj[maxn];
bool ans, leaf[maxn];
void dfs(int v, int papa) {
if (ans)
return;
int o = 0, tmp = 0;
bool f = 1;
for (int u: adj[v])
if (u != papa) {
dfs(u, v);
o +... | main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
1 | #include <bits/stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s267329062 | p03726 | C++ | de<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl "\n"
const int N = 1e5 + 10;
int n;
vector <int> adj[N];
int main() {
cin >> n;
for (int i = 0; i < n - 1; i++) {
int u, v;
cin >> u >> v;
u--, v--;
adj[u].push_ba... | a.cc:1:1: error: 'de' does not name a type
1 | de<bits/stdc++.h>
| ^~
a.cc:9:1: error: 'vector' does not name a type
9 | vector <int> adj[N];
| ^~~~~~
a.cc: In function 'int main()':
a.cc:12:9: error: 'cin' was not declared in this scope
12 | cin >> n;
| ^~~
a.cc:17:17: erro... |
s185294615 | p03726 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl "\n"
const int N = 1e5 + 10;
int n;
vector <int> adj[N];
int main() {
cin >> n;
for (int i = 0; i < n - 1; i++) {
int u, v;
cin >> u >> v;
u--, v--;
adj[u].p... | a.cc:37:1: error: expected class-name before '~' token
37 | ~
| ^
|
s141471336 | p03726 | C++ | #include <bits/stdc++.h>
#define N 100034
#define M 256101
using namespace std;
int n, e;
int u, v, i;
int to[M], first[N], next[M];
inline void addedge(int u, int v){
to[++e] = v; next[e] = first[u]; first[u] = e;
to[++e] = u; next[e] = first[v]; first[v] = e;
}
int dfs(int x, int px){
int i, y, scx = 0... | a.cc: In function 'void addedge(int, int)':
a.cc:11:18: error: reference to 'next' is ambiguous
11 | to[++e] = v; next[e] = first[u]; first[u] = e;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:66,
from /usr/include/c++/14/algorithm:60,
... |
s305282963 | p03726 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
typedef long long ll;
vector<ll> node[100005];
bool matched[100005],used[100005];
void dfs(ll pos){
for(int i=0;i<node[pos].size();i++){
ll son=node[pos][i];
if(!used[to]){
used[to]=true;
dfs(to);
if... | a.cc: In function 'void dfs(ll)':
a.cc:12:14: error: 'to' was not declared in this scope; did you mean 'tm'?
12 | if(!used[to]){
| ^~
| tm
|
s060723184 | p03726 | C++ | //#undef _DEBUG
//#pragma GCC optimize("Ofast")
//不動小数点の計算高速化
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace std::chrono;
#define int long long //t... | a.cc: In member function 'void tree<T>::root_change_mid()':
a.cc:1785:36: error: 'message' was not declared in this scope
1785 | void root_change_mid(){ message+="N>2 (mid)\n"; assert(n>2); rep(i, n){ if(sz(g[i])>1){ root_change(i); return; }... |
s720702064 | p03726 | C++ | #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#define maxn 100010
using namespace std;
int read()
{
int x=0,f=1;
char ch=getchar();
while(ch-'0'<0||ch-'0'>9){if(ch=='-') f=-1;ch=getchar();}
while(ch-'0'>=0&&ch-'0'<=9){x=x*10+ch-'0';ch=getchar();}
return x*... | a.cc:39:10: error: stray '#' in program
39 | }#include<iostream>
| ^
a.cc: In function 'void solve(int, int)':
a.cc:39:11: error: 'include' was not declared in this scope
39 | }#include<iostream>
| ^~~~~~~
a.cc:39:27: error: expected primary-expression before '>' tok... |
s173222318 | p03726 | C++ | nclude<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
int n,now,vi[N],fa[N],vis[N],v[N<<1],deep[N],nex[N<<1],head[N];
void addedges(int x,int y){
nex[++now]=head[x];
head[x]=now,v[now]=y;
}
vector<int>b[N];
void dfs(int x){
deep[x]=deep[fa[x]]+1;
for(int i=head[x];i;i=nex[i])
if(v[i]!=fa[x]) fa[v[i]]=x,df... | a.cc:1:1: error: 'nclude' does not name a type
1 | nclude<bits/stdc++.h>
| ^~~~~~
a.cc:9:1: error: 'vector' does not name a type
9 | vector<int>b[N];
| ^~~~~~
a.cc: In function 'void dfs(int)':
a.cc:14:9: error: 'b' was not declared in this scope
14 | b[deep[x]].push_back(x);
| ... |
s328627414 | p03726 | C++ | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
const int MAXN = 1e5 + 10;
int n;
int u ,v;
int dp[MAXN];
vector <int> adj[MAXN];
vector <int> ver;
void dfs(int root) {
for (auto y: adj[root])
if (dp[y] == 0)
dp[y] = dp[root] + 1;
dfs(y);
}
int main() {
ci... | a.cc: In function 'void dfs(int)':
a.cc:18:17: error: 'y' was not declared in this scope; did you mean 'yn'?
18 | dfs(y);
| ^
| yn
|
s585619137 | p03726 | C++ | #include <iostream>
#include <iomanip>
#include <fstream>
#include <string>
#include <array>
#include <vector>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <queue>
#include <bitset>
#include <tuple>
#include <cmath>
#include <... | a.cc:159:14: error: redefinition of 'constexpr const ll INF'
159 | constexpr ll INF = 1'000'000'000'000'000'000;
| ^~~
a.cc:31:14: note: 'constexpr const ll INF' previously defined here
31 | constexpr ll INF = 1'000'000'000'000'000'000;
| ^~~
a.cc:167:28: error: redefinition o... |
s446252183 | p03726 | C++ | #include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
const int MAXN=100000;
vector<int> d[MAXN+5];
int n;
int dfs(int u,int fa)
{
int res=0,v;
for(int i=0;i<d[u].size();i++)
{
v=d[u][i];
if(v!=fa)
res+=dfs(v,u);
}
if(res>=2)
{
printf("First\n");
... | a.cc:8:1: error: 'vector' does not name a type
8 | vector<int> d[MAXN+5];
| ^~~~~~
a.cc: In function 'int dfs(int, int)':
a.cc:13:23: error: 'd' was not declared in this scope
13 | for(int i=0;i<d[u].size();i++)
| ^
a.cc: In function 'int main()':
a.cc:35:17: error: 'd' ... |
s613114644 | p03726 | C++ | /*Lucky_Glass*/
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int N=1e5;
struct NODE{int pnt,tag;}nod[N+5];
vector<int> lnk[N+5];
int du[N+5],cnt[2];
bool blg[N+5];
int n;
void DFS(int u,int pre){
blg[u]=!blg[pre];
for(auto v : lnk[u]){
if(v==pre) continue;
DFS(v,u);
}
}
... | a.cc:11:1: error: 'vector' does not name a type
11 | vector<int> lnk[N+5];
| ^~~~~~
a.cc: In function 'void DFS(int, int)':
a.cc:18:22: error: 'lnk' was not declared in this scope
18 | for(auto v : lnk[u]){
| ^~~
a.cc: In function 'int main()':
a.cc:28:17: error: 'lnk' was... |
s275921354 | p03726 | C++ | /**
SXR0aXAkI0JwbXptI3FhI3Z3I293bCNqY2IjUG0jMCNicG0jVHFkcXZvLyNCcG0jQW10bjBhY2phcWFicXZvLyNNYm16dml0MSNWdyNhdGN1am16I2tpdiNhbXF9bSNQcXUjVnd6I0F0bW14MSNQcWEjaXptI2l0dCNicHF2b2EjUXYjYnBtI3BtaWRtdmEjaXZsI3d2I21pemJwMSNFcHcjcWEjYnBtem0ja2l2I3F2Ym16a21sbSNRdiNQcWEjeHptYW12a20jbXtrbXhiI0lhI3BtI3htenVxYmJtYnBHI1BtI3N2d2VtYnAj... | a.cc:64:15: error: expected unqualified-id before '-' token
64 | int cnt[MAXN];-
| ^
a.cc:77:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
77 | main() {
| ^~~~
a.cc: In function 'int main()':
a.cc:88:5: error: 'dfs' was not declared in this scope; did you... |
s061595426 | p03726 | C++ | #include<bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n;
vector<int> g[maxn];
vector<int> cnt[maxn];
bool mark[maxn];
int mod = 0;
int change = 0;
bool is = true;
void dfs(int v, int dis) {
mark[v] = true;
if(g[v].size() == 1) {
if(dis % 2 != 0)
is = false;
}
for(int i = 0; i < g[v].si... | a.cc: In function 'int main()':
a.cc:62:33: error: 'return4' was not declared in this scope
62 | return4
| ^~~~~~~
|
s439545712 | p03726 | C++ | #include<bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int n;
vector<int> g[maxn];
vector<int> cnt[maxn];
bool mark[maxn];
int mod = 0;
int change = 0;
void dfs(int v, int dis) {
mark[v] = true;
if((int)g[v].size() == 1) {
if(dis % 2 != mod) {
change++;
mod = dis % 2;
}
}
for(int i = 0;... | a.cc: In function 'int main()':
a.cc:72:12: error: expected primary-expression before ')' token
72 | if()
| ^
|
s939376405 | p03726 | C++ | #include <iostream>
#include <vector>
using namespace std;
const int MAXn = 1e5 + 10;
vector<int> g[MAXn];
int n, odd[MAXn], even[MAXn];
void dfs(int v, int par) {
if (g[v].size() == 1 && par != 0)
even[v] = 1;
for (int i = 0; i < g[v].size(); i++)
if (g[v][i] != par) {
dfs(g[v][i], v);
odd[v] += (even[g[v... | a.cc: In function 'int main()':
a.cc:44:17: error: 'leaf' was not declared in this scope
44 | leaf += g[i].size() == 1;
| ^~~~
|
s940514037 | p03726 | C++ | #include <iostream>
#include <vector>
#include <utility>
#include <string>
#include <map>
#include <algorithm>
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
vector<int>g[100000];
int dp[100000][2];
void dfs(int s, int p){
int ma = -1000000;
for(int x:g[s]){
... | a.cc: In function 'void dfs(int, int)':
a.cc:18:17: error: no matching function for call to 'max(int)'
18 | ma = max(dp[x][0] - dp[x][1]);
| ~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s764104741 | p03726 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
//const ll mod = 1000000007;
vector<int> pathes[100200];
int dist[100200];
bool flag = false;
vector<int> connect;
bool allOdds[100200];
void search(int from, int now, int cost){
if(dist[... | a.cc: In function 'void search(int, int, int)':
a.cc:39:9: error: 'allodds' was not declared in this scope; did you mean 'allOdds'?
39 | allodds[now] = false;
| ^~~~~~~
| allOdds
|
s475513105 | p03726 | C++ | #include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cassert>
#define ll long long
using namespace std;
inline int read(){
int re=0,flag=1;char ch=getchar();
while(ch>'9'||ch<'0'){
if(ch=='-') flag=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9') re=(re<<1)+(re<<3)+ch-'0... | a.cc:26:1: error: 'vector' does not name a type
26 | vector<int>e[100010];
| ^~~~~~
a.cc: In function 'void getd(int, int)':
a.cc:37:19: error: 'e' was not declared in this scope
37 | for(i=0;i<e[u].size();i++) if((v=e[u][i])!=f) getd(v,u);
| ^
a.cc: In function 'int main()':... |
s677364746 | p03726 | C++ | #include "bits/stdc++.h"
#define ll long long
#define rep2(i,a,b) for(int i=a;i<=b;++i)
#define rep(i,n) for(int i=0;i<n;i++)
#define pii pair<int,int>
#define tii tuple<int,int,int>
#define pq priority_queue<int>
#define pqg priority_queue<int,vector<int>,greater<int>>
#define pb push_back
#define edge(v,a,b) v[a].pb(... | a.cc: In function 'int dfs(int)':
a.cc:21:5: error: 'Used' was not declared in this scope; did you mean 'used'?
21 | Used[a]=1;
| ^~~~
| used
a.cc:25:33: error: too few arguments to function 'int dfs(int)'
25 | if(!used[b]) ans=ans&dfs();
| ~~~^~
... |
s503667322 | p03726 | C++ | #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<bitset>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; i++ )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typede... | a.cc: In function 'int main()':
a.cc:44:5: error: 'a' was not declared in this scope
44 | a[0]=1;
| ^
|
s525364493 | p03726 | C++ | #include<bits/stdc++.h>
#define N 200005
using namespace std;
int head[N],ver[N],nxt[N],tot;
void add(int a,int b)
{
tot++;nxt[tot]=head[a];head[a]=tot;ver[tot]=b;return ;
}
int g[N];
bool flag,n;
void dfs(int x,int f)
{
g[x]=0;
for(int i=head[x];i;i=nxt[i])
{
if(ver[i]==f)continue;
dfs(ver[i],x);
if(!g[ver[i... | a.cc: In function 'int main()':
a.cc:27:23: error: expected ';' before 'tot'
27 | scanf("%d",&n)
| ^
| ;
28 |
29 | tot=0;
| ~~~
|
s455476833 | p03726 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<queue>
#include<set>
using namespace std;
typedef long long LL;
const int N=2e5;
int gi() {
int w=0;bool q=1;char c=getchar();
while ((c<'0'||c>'9') && c!='-') c=getcha... | a.cc: In function 'bool dfs(int, int)':
a.cc:24:32: error: reference to 'next' is ambiguous
24 | for (int i=head[k];i;i=next[i])
| ^~~~
In file included from /usr/include/c++/14/string:47,
from /usr/include/c++/14/bits/locale_classes.h:40,
... |
s465916606 | p03726 | C++ | #include<cstdio>
#include<vector>
#include<bitset>
#define N 100000
using namespace std;
vector<int> vecin[N+1];
bitset<N+1> viz;
int dfs(int nod){
viz.set(nod);
bool ans=false;
for(int i=0;i<vecin[nod].size();i++){
int now=vecin[nod][i];
if (viz[now]==false){
int... | a.cc: In function 'int main()':
a.cc:42:16: error: too few arguments to function 'int dfs(int)'
42 | int ans=dfs();
| ~~~^~
a.cc:10:5: note: declared here
10 | int dfs(int nod){
| ^~~
|
s859160226 | p03726 | C++ | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define inf 1000000007LL
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rrep(i, n) for(int i = (n) - 1; i >= 0; i--)
#define trep(i, n) for(int i = 0; i <= (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define mfor(i, s, t) for(i... | a.cc: In function 'std::pair<std::pair<bool, bool>, std::pair<bool, bool> > dfs(long long int, long long int)':
a.cc:165:17: error: 'w' was not declared in this scope
165 | if(k >= 2 || (w.first.first && w.second.first) || (w.first.second && w.second.second)) {
| ^
|
s422951957 | p03726 | C++ | #include <bits/stdc++.h>
using namespace std;
vector<int> e[1000500];
int p[1000500]
int n;
void link(int a,int b)
{
e[a].push_back(b);
e[b].push_back(a);
}
void dfs(int u,int fa)
{
for (int i=0;i<e[u].size();i++)
{
int v=e[u][i];
if (v==fa) continue;
dfs(v,u);
}
if (!p[u] && !p[f]... | a.cc:5:1: error: expected initializer before 'int'
5 | int n;
| ^~~
a.cc: In function 'void dfs(int, int)':
a.cc:20:10: error: 'p' was not declared in this scope
20 | if (!p[u] && !p[f]) p[u] = p[f] = 1;
| ^
a.cc:20:21: error: 'f' was not declared in this scope
20 | if (!p[u] && !... |
s068232765 | p03726 | C++ | // g++ temp.cpp
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published b... | a.cc: In function 'void solve()':
a.cc:176:18: error: expected ',' or ';' before ':' token
176 | P res=dfs(0,-1):
| ^
a.cc:178:3: error: 'else' without a previous 'if'
178 | else cout<<"First"<<endl;
| ^~~~
|
s435613663 | p03726 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
using namespace std;
const int M = 1e5 + 10;
vector<int>vc[M];
int ans , V[M];
void dfs(int pos , int pre , int d) {
int len = vc[pos].size();
if(d >= 4) {
V[pos]++;
}
if(len > 2) {
return ;
}
else {
... | a.cc: In function 'int main()':
a.cc:34:5: error: 'memset' was not declared in this scope
34 | memset(V , 0 , sizeof(V));
| ^~~~~~
a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
4 | #include <cstdio>
+++ |+#include <cstring>
... |
s370450262 | p03726 | C++ | #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<map>
#include<set>
#include<deque>
using namespace std;
#define sz(x) (int)(x.size())
#define rep(i, a, b) for(int i=a;i<b;++i)
#define per(i, a, b) for(int i=b-1;i>=a;--i)
#define pb push_back
#define mp make_pair
typedef long long ll;... | a.cc: In function 'void solve()':
a.cc:86:28: error: 'v' was not declared in this scope
86 | rep(i, 0, n) if(!w[v]) print(F);
| ^
|
s659295543 | p03726 | C++ | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
int n;
vector<int> et[100000];
int dist[100001];
int cnt[200001];
int main() {
cin >> n;
for (int i = 0; i < n - 1; i++) {
int a, b;
cin >> a >> b;
a--; b--;
et[a].push_back(b);
et[b].push_back(a);
}
queue<int> que;
for (in... | a.cc: In function 'int main()':
a.cc:48:25: error: 'assert' was not declared in this scope
48 | assert(0);
| ^~~~~~
a.cc:4:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
3 | #include <queue>
+++ |... |
s169937579 | p03726 | C++ | #include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
int N; cin >> N;
auto adjacency_list = vector<vector<int>>(N);
for (auto i = 0; i < N-1; i++)
{
int a, b; cin >> a >> b;
a--; b--;
adjacency_list[a].push_back(b);
adjacency_list... | a.cc: In function 'int main()':
a.cc:31:20: error: no matching function for call to 'all_of(std::vector<bool>::iterator, std::vector<bool>::iterator)'
31 | cout << (all_of(begin(matched), end(matched)) ? "Second" : "First") << endl;
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ... |
s489283550 | p03726 | C++ | #include <iostream>
#include <vector>
#include <queue>
#include <unordered_map>
#include <map>
#include <string>
#include <iomanip>
#include <cmath>
#include <cstring>
#include <algorithm>
#define MaxN 100005
using namespace std;
int N,X,Y;
bool pos=false;
vector<int>Graph[MaxN];
int DFS(int node,int father)
{
i... | a.cc: In function 'int DFS(int, int)':
a.cc:28:20: error: expected primary-expression before ')' token
28 | if(cnt>=2||)
| ^
|
s042121051 | p03726 | C++ | #include<algorithm>
#include<vector>
#include<list>
#include<iostream>
#include<utility>
#include<string>
#include<set>
#include<queue>
#include<stack>
#include<iterator>
#include<map>
#include<limits>
#include<iomanip>
#include<ctime>
#include<cmath>
const int INF=2147483647;
const long long MOD=1e9+7;
using names... | a.cc: In function 'int main()':
a.cc:64:9: error: 'pathCt' was not declared in this scope
64 | pathCt=2;
| ^~~~~~
a.cc:66:21: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_typ... |
s675020644 | p03726 | C++ | #include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<algorithm>
using namespace std;
vector<int> E[100010];
int d[100010], cnt[100010], ans[100000];
int vis[100010], flag[100010], ok;
int n, u, v, t, cot, tot;
void dfs(int x){
for(int i = 0; i < E[x].size(); i++){
if(!vis[E[... | a.cc: In function 'int main()':
a.cc:36:59: error: lvalue required as increment operand
36 | if(sqrt(d[i] - d[j]) >= 4)flag++;
| ^~~~
a.cc:37:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive... |
s684849600 | p03726 | C++ | #include <bits/stdc++.h>
using namespace std;
#define mps 1000000007
vector <int> vec[100005];
bool ok(int x)
{
for(int i=0;i<vec[x].size();i++)
{
if(vec[vec[x][i]].size()==1)
return 1;
}
return 0;
}
int main()
{
bool flag=0;
int n,u,v;
cin>>n;
for(int i=1;i<n;i++)
... | a.cc: In function 'int main()':
a.cc:35:52: error: cannot convert 'std::vector<int>' to 'int'
35 | if(vec[i].size()==2 && ok(vec[vec[i][0]]) && ok(vec[vec[i][1]]))
| ~~~~~~~~~~~~~^
| |
| ... |
s615472612 | p03726 | C++ | #include <bits/stdc++.h>
#define MAXN (100010)
int n;
int lfson[MAXN], sz[MAXN], deg[MAXN], f[MAXN], dep[MAXN];
int delta[MAXN];
std::vector<int> vec[MAXN];
struct cmp{
bool operator() (int a, int b){
return dep[a] < dep[b];
}
};
std::priority_queue<int, std::vector<int>, cmp> pq;
bool vis[MAXN];
void dfs(int u... | a.cc: In function 'int main()':
a.cc:60:21: error: 'fa' was not declared in this scope; did you mean 'fma'?
60 | v = fa[v];
| ^~
| fma
|
s172826862 | p03726 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <functional>
#include <iostream>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int n... | a.cc: In function 'int dfs(int)':
a.cc:29:14: error: 'i' was not declared in this scope
29 | if(e[i]>=3){
| ^
a.cc: In function 'void dfs2(int, int)':
a.cc:43:14: error: 'i' was not declared in this scope
43 | if(e[i]>=3){
| ^
a.cc: In function 'int dfs(int)':... |
s643817374 | p03726 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Tree {
public:
vector<int> edges;
bool isLeaf() { return edges.size() == 1; }
bool isBrunch() { return edges.size() == 2; }
int brunchNextNode(int exept) {
if (!isBrunch()) { return -1... | a.cc: In function 'int main()':
a.cc:35:15: error: 'else' without a previous 'if'
35 | } else if (nodes[j].isBrunch()) {
| ^~~~
|
s063776167 | p03726 | C++ | #define MYDEBUG
#include <iostream>
#include <vector>
#include <chrono>
#include <random>
#include <algorithm>
#include <map>
#include <unordered_map>
#include <cstdio>
#include <queue>
#include <stack>
#include <cstring>
#ifdef MYDEBUG
#define debug(x) cout<<#x<<": "<<x<<endl
#else
#define debug(x)
#endif
#define ll ... | a.cc: In function 'void solve()':
a.cc:43:10: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::vector<int> >, std::vector<int> >::value_type' {aka 'std::vector<int>'} and 'int')
43 | g[0] = 0;
| ^
In file included from /usr/include/c++/14/vector:72,
... |
s502350547 | p03726 | C++ | #include<iostream>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
#include<numeric>
#include<limits>
#include<bitset>
#include<functional>
#include<type_traits>
namespace lib
{
template<std::uint64_t Mod>struct modnum;
template<class T>constexpr T pow(T base, std::size_t p)
{
if (p == 0)
{
... | a.cc:14:18: error: 'std::uint64_t' has not been declared
14 | template<std::uint64_t Mod>struct modnum;
| ^~~
a.cc:38:18: error: 'std::uint64_t' has not been declared
38 | template<std::uint64_t Mod>constexpr auto inverse(modnum<Mod> const&);
| ^~~
a.c... |
s100610379 | p03726 | C++ | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, cnt;
vector <int> a[N];
bool vis[N] = {0};
int cou(int u) {
int res = 0;
for (int i = 0; i < a[u].size(); i++) {
int v = a[u][i];
if (a[v].size() == 1) res++;
}
return res;
}
int dfs(int u) {
vis[u] = true... | a.cc: In function 'int dfs(int)':
a.cc:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
25 | }
| ^
a.cc: In function 'int main()':
a.cc:53:13: error: 'deg' was not declared in this scope; did you mean 'dem'?
53 | if (deg[i] >= 4) {
| ^~~
| ... |
s403792295 | p03726 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <functional>
#include <iostream>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int n... | a.cc: In function 'bool solve()':
a.cc:86:34: error: 'a' was not declared in this scope
86 | if(!used[i] && e[a]==1){
| ^
a.cc: In function 'int dfs(int)':
a.cc:39:1: warning: control reaches end of non-void function [-Wreturn-type]
39 | }
| ^
|
s841018778 | p03726 | C++ | #include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <map>
#include <set>
#include <functional>
#include <iostream>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int n... | a.cc: In function 'bool solve()':
a.cc:86:34: error: 'a' was not declared in this scope
86 | if(!used[i] && e[a]==1){
| ^
a.cc: In function 'int dfs(int)':
a.cc:39:1: warning: control reaches end of non-void function [-Wreturn-type]
39 | }
| ^
|
s212716559 | p03726 | C++ | //In the Name of God
//Let Our Voices Echo
#pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
#define X real()
#define Y imag()
typedef long long ll;
typedef double ld;
typedef complex<ld> point;
const ld eps=1e-9;
const int MAX=1e5+9,MOD=1e9+7;
int n,d[MAX];
vector<int> g[MAX];
queue<int> q;
int ... | a.cc: In function 'int main()':
a.cc:49:24: error: 'Endl' was not declared in this scope
49 | cout<<"First"<<Endl;
| ^~~~
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.