submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s295023666 | p02240 | C++ | #include <iostream>
using namespace std;
int main() {
int d[100100];
int m,n,q;
cin>>n>>m;
for(int i=0;i<n;i++){
d[i]=i;
}
for(int l=0;l<m;l++){
int a,b;
cin>>a>>b;
int j ,h;
j=a,h=b;
while(d[j]!=j )
j=d[j];
}
while(d[h]!=h )
h=d[h];
}
if(j!=h){
d[j]=h;
d[a]=h;
d[b]=h;
}
}
cin>... | a.cc: In function 'int main()':
a.cc:19:9: error: 'h' was not declared in this scope
19 | while(d[h]!=h )
| ^
a.cc: At global scope:
a.cc:22:1: error: expected unqualified-id before 'if'
22 | if(j!=h){
| ^~
a.cc:27:1: error: expected declaration before '}' token
27 | }
| ^
a.cc:28:1: ... |
s235616813 | p02240 | C++ | #include <iostream>
using namespace std;
int main() {
int d[100100];
int m,n,q;
cin>>n>>m;
for(int i=0;i<n;i++){
d[i]=i;
}
for(int l=0;l<m;l++){
int a,b;
cin>>a>>b;
int j ,h;
j=a,h=b;
while(d[j]!=j )
j=d[j];
}
while(d[h]!=h )
h=d[h];
}
if(j!=h){
d[j]=h;
d[a]=h;
d[b]=h;
}
}
cin>... | a.cc: In function 'int main()':
a.cc:19:9: error: 'h' was not declared in this scope
19 | while(d[h]!=h )
| ^
a.cc: At global scope:
a.cc:22:1: error: expected unqualified-id before 'if'
22 | if(j!=h){
| ^~
a.cc:27:1: error: expected declaration before '}' token
27 | }
| ^
a.cc:28:1: ... |
s331469831 | p02240 | C++ | #include <iostream>
using namespace std;
int main() {
int d[100100];
int m,n,q;
cin>>n>>m;
for(int i=0;i<n;i++){
d[i]=i;
}
for(int l=0;l<m;l++){
int a,b;
cin>>a>>b;
int j ,h;
j=a,h=b;
while(d[j]!=j ||d[h]!=h){
j=d[j];
h=d[h];
}
d[j]=h;
while(a!=h){
d[a]=h;
d[b]=h;
a=d[a];
b=d[b]:... | a.cc: In function 'int main()':
a.cc:26:7: error: expected ';' before ':' token
26 | b=d[b]:
| ^
| ;
|
s784505287 | p02240 | C++ |
import java.util.*;
public class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
Graph graph = new Graph(scan.nextInt());
int relationNum = scan.nextInt();
for(int i=0; i<relationNum; i++)
graph.setRelation(scan.nextInt(), scan.nextInt());
int queryNum = scan.next... | a.cc:2:1: error: 'import' does not name a type
2 | import java.util.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: expected unqualified-id before 'public'
5 | public class Main{
| ^~~~~~
a.cc:26:9: error: 'ArrayList' does not name a type
26 | ... |
s087265138 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<ctime>
void dfs(std::vector<std::vector<int>> &n) {
/*
std::stack<int> s;
std::vector<std::vector<int> > nn(n.size());
std::vector<int> dd(n.size());
int count = 0;
for (size_t i = 0; i < n.size(); i++) {
if (dd[i... | a.cc: In function 'void dfs(std::vector<std::vector<int> >&)':
a.cc:41:22: error: 'stac' is not a member of 'std'; did you mean 'stack'?
41 | std::stac std::vectork<int> s;
| ^~~~
| stack
a.cc:42:9: error: expected primary-expression before ... |
s294070601 | p02240 | C++ | #include <iostream>
#include <vector>
#define eol '\n'
using namespace std;
vector<int> visit;
bool bfs(int s, int t, vector< vector<int> > list) {
if (s == t) {
return true;
}
// visit flag
visit[s] = 1;
for (int i = 0; i < list[s].size(); i++) {
int next = list[s][i];
if (visit[next] == ... | a.cc: In function 'int main()':
a.cc:35:35: error: call of overloaded 'vector(int&, <brace-enclosed initializer list>)' is ambiguous
35 | vector< vector<int> > list(n, {});
| ^
In file included from /usr/include/c++/14/vector:66,
from a.cc:2:
/usr/include/c+... |
s135666812 | p02240 | C++ | #include <iostream>
#include <vector>
#define eol '\n'
using namespace std;
vector<int> visit;
bool bfs(int s, int t, vector<vector<int>> list) {
if (s == t) {
return true;
}
// visit flag
visit[s] = 1;
for (int i = 0; i < list[s].size(); i++) {
int next = list[s][i];
if (visit[next] == 0)... | a.cc: In function 'int main()':
a.cc:35:33: error: call of overloaded 'vector(int&, <brace-enclosed initializer list>)' is ambiguous
35 | vector<vector<int>> list(n, {});
| ^
In file included from /usr/include/c++/14/vector:66,
from a.cc:2:
/usr/include/c++/14... |
s642673976 | p02240 | C++ | #include <iostream>
#include <queue>
#include <cstdio>
using namespace std;
#define MAX_N 100000
int g[MAX_N][MAX_N];
int n;
bool can_connect(int s,int t) {
bool visited[n];
queue<int> que;
visited[s] = true;
que.push(s);
while(!que.empty()) {
int v = que.front(); que.pop();
for(int i=0;i<n;i++) {
... | /tmp/ccvdt1WN.o: in function `can_connect(int, int)':
a.cc:(.text+0x22): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccvdt1WN.o
a.cc:(.text+0x155): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccvdt1WN.o
/tmp/ccvdt1WN.o: ... |
s983556964 | p02240 | C++ | /**
* @brief 強連結(分解)アルゴリズムのテスト
* @date 2016/03/12
*/
//****************************************
// 必要なヘッダファイルのインクルード
//****************************************
#include <iterator>
#include <functional>
#include <utility>
#include <algorithm>
#include <vector>
#include <iostream>
//****************************... | a.cc:41:25: error: 'int32_t' in namespace 'std' does not name a type
41 | using weight_t = std::int32_t; /**< 辺(u, v)への重みwを表す型 */
| ^~~~~~~
a.cc:42:25: error: 'int32_t' in namespace 'std' does not name a type
42 | using index_t = std::int32_t; /**< 頂点vの添字を表す型 */
| ... |
s154273998 | p02240 | C++ | #include <vector>
#include <iostream>
using namespace std;
int n, q, x, y; int group[100000]; vector<int> f[100000];
int main() {
scanf("%d%d", &n, &m);
for(int i = 0; i < n; i++) group[i] = i, f[i].push_back(i);
for(int i = 0; i < m; i++) {
scanf("%d%d", &x, &y);
if(group[x] == group[y]) continue;
x = group[x... | a.cc: In function 'int main()':
a.cc:6:28: error: 'm' was not declared in this scope
6 | scanf("%d%d", &n, &m);
| ^
|
s276927683 | p02240 | C++ | #include <iostream>
#include <stack>
using namespace std;
const int N = 100000;
const int WHITE = 0;
const int GRAY = 1;
const int BLACK = 2;
const int NIL = -1;
int n, M[N][N];
int color[N], cc[N], cp = 0;
int nt[N];
int next(int u){
for (int v = nt[u]; v <= n; v++){
nt[u] = v + 1;
if (M[u][v]) return v;
}
r... | /tmp/ccD07Ny6.o: in function `next(int)':
a.cc:(.text+0x17): relocation truncated to fit: R_X86_64_PC32 against symbol `nt' defined in .bss section in /tmp/ccD07Ny6.o
a.cc:(.text+0x39): relocation truncated to fit: R_X86_64_PC32 against symbol `nt' defined in .bss section in /tmp/ccD07Ny6.o
/tmp/ccD07Ny6.o: in function... |
s900008109 | p02240 | C++ | #include<iostream>
#include<vector>
#include<limits.h>
#include<stack>
#include<string>
using namespace std;
vector< vector<int> > L(100005);
int c[100005]={};
void dfs (int v, int marker){
if(c[v]!=0){
return;
}
c[v]=marker;
for (int i=0;i<L[v].size();i++){
dfs(L[v][i],marker);
}
}
int main(){
ios::sync_w... | a.cc: In function 'int main()':
a.cc:56:9: error: 'out' was not declared in this scope
56 | out(c)
| ^~~
|
s050329330 | p02240 | C++ | #include<iostream>
#include<vector>
#include<limits.h>
#include<stack>
#include<string>
using namespace std;
vector< vector<int> > L(100005);
int c[100005]={};
void dfs (int v, int marker){
if(c[v]!=0){
return;
}
c[v]=marker;
for (int i=0;i<L[v].size();i++){
dfs(L[v][i],marker);
}
}
int main(){
ios::sync_w... | a.cc: In function 'int main()':
a.cc:56:9: error: 'out' was not declared in this scope
56 | out(c)
| ^~~
|
s143646264 | p02240 | C++ | #include<iostream>
#include<vector>
#include<limits.h>
#include<stack>
#include<string>
using namespace std;
vector< vector<int> > L(100005);
int c[100005]={};
void dfs (int v, int marker){
if(c[v]!=0){
return;
}
c[v]=marker;
for (int i=0;i<L[v].size();i++){
dfs(L[v][i],marker);
}
}
int main(){
ios::sync_w... | a.cc: In function 'int main()':
a.cc:56:9: error: 'out' was not declared in this scope
56 | out(c);
| ^~~
|
s535563490 | p02240 | C++ | #include <iostream>
#include <vector>
#include <stack>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c){
static<int> S;
S.push(r);
color[r] = c;
while (!S.empty()){
int u = S.top(); S.pop();
... | a.cc: In function 'void dfs(int, int)':
a.cc:15:11: error: expected unqualified-id before '<' token
15 | static<int> S;
| ^
a.cc:16:5: error: 'S' was not declared in this scope
16 | S.push(r);
| ^
|
s367837610 | p02240 | C++ | //#define scanf_s scanf
#include <string>
#include <stdio.h>
#include <math.h>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
#define MAX 100
#define _MAX 1000
struct Graph
{
int id, k = 0;
list<int> node;
int d = -1;
};
Graph G[MAX]... | a.cc: In function 'int main()':
a.cc:47:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
47 | scanf_s("%d %d", &n, &m);
| ^~~~~~~
| scanf
|
s385981833 | p02240 | C++ | //#define scanf_s scanf
#include <string>
#include <stdio.h>
#include <math.h>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
#define MAX 100
#define _MAX 1000
struct Graph
{
int id, k = 0;
list<int> node;
int d = -1;
};
Graph G[MAX]... | a.cc: In function 'int main()':
a.cc:47:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
47 | scanf_s("%d %d", &n, &m);
| ^~~~~~~
| scanf
|
s730326266 | p02240 | C++ | //#define scanf_s scanf
#include <string>
#include <stdio.h>
#include <math.h>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
#define MAX 100000
#define _MAX 10000
struct Graph
{
int id, k = 0;
list<int> node;
int d = -1;
};
Graph G[... | a.cc: In function 'int main()':
a.cc:47:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
47 | scanf_s("%d %d", &n, &m);
| ^~~~~~~
| scanf
|
s910509982 | p02240 | C++ | #include<stack>
#include<queue>
#include<conio.h>
#include<string>
#include<vector>
#include<iostream>
#include<algorithm>
using namespace std;
queue<int> Q;
vector<int> G[100000];
bool flag = false;
int s, t;
int color[100000];
void a(){
while (!Q.empty()){
Q.pop();
for (int i = 0; i < G[s].size(); i++){
//_g... | a.cc:3:9: fatal error: conio.h: No such file or directory
3 | #include<conio.h>
| ^~~~~~~~~
compilation terminated.
|
s657851861 | p02240 | C++ | #include<stack>
#include<queue>
#include<conio.h>
#include<string>
#include<vector>
#include<iostream>
#include<algorithm>
using namespace std;
queue<int> Q;
vector<int> G[100000];
bool flag = false;
int s, t;
int color[100000];
void a(){
while (!Q.empty()){
Q.pop();
for (int i = 0; i < G[s].size(); i++){
//_g... | a.cc:3:9: fatal error: conio.h: No such file or directory
3 | #include<conio.h>
| ^~~~~~~~~
compilation terminated.
|
s406533196 | p02240 | C++ | #include<stdio.h>
#include<vector>
#include<string>
using namespace std;
vector<vector<int> >g;
int n,m,q,s,t;
vector<bool>visited;
vector<int>color;
void dfs(int s){
for(int i=0;i<g[s].size();i++){
if(color[g[s][i]]==-1){
color[g[s][i]]=color[s];
dfs(g[s][i]);
}
}
}
bo... | a.cc: In function 'int main()':
a.cc:53:9: error: 'cout' was not declared in this scope
53 | cout<<s1<<endl;
| ^~~~
a.cc:4:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
3 | #include<string>
+++ |+#include <iostream>
4 ... |
s506798764 | p02240 | C++ | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <stack>
#define rep(i, n) for(int i=0;i<n;i++)
#define NOT_FOUND 0
#define ENQUEUED 1
using namespace std;
vector<int> graph[100001];
int memo[100001];
int dfs(int start, int end) {
if (start == end) {
return 1;
}
... | a.cc: In function 'int dfs(int, int)':
a.cc:18:5: error: 'memset' was not declared in this scope
18 | memset(memo, NOT_FOUND, sizeof(memo));
| ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
5 | #include <stack>
+++ |+#incl... |
s420848488 | p02240 | C++ | #include <stdio.h>
#include <stack>
#include <iostream>
using namespace std;
int G[100000][100000];
int vis[100000];
int n;
bool dfs(int s, int t)
{
if (G[s][t] == 1 || G[t][s] == 1) return true;
vis[s] = 1;
for (int i = 0; i < n; i++)
{
if (G[s][i] == 1 && vis[i] == 0)
{
... | /tmp/ccCk437T.o: in function `dfs(int, int)':
a.cc:(.text+0x80): relocation truncated to fit: R_X86_64_PC32 against symbol `vis' defined in .bss section in /tmp/ccCk437T.o
a.cc:(.text+0xd3): relocation truncated to fit: R_X86_64_PC32 against symbol `vis' defined in .bss section in /tmp/ccCk437T.o
a.cc:(.text+0x123): re... |
s688423274 | p02240 | C++ | #include <stdio.h>
#include <stack>
#include <iostream>
using namespace std;
int G[100000][100000];
int vis[100000];
int n;
bool dfs(int s, int t)
{
if (G[s][t] == 1 || G[t][s] == 1) return true;
vis[s] = 1;
for (int i = 0; i < n; i++)
{
if (G[s][i] == 1 && vis[i] == 0)
{
... | /tmp/ccfkXa1a.o: in function `dfs(int, int)':
a.cc:(.text+0x80): relocation truncated to fit: R_X86_64_PC32 against symbol `vis' defined in .bss section in /tmp/ccfkXa1a.o
a.cc:(.text+0xd3): relocation truncated to fit: R_X86_64_PC32 against symbol `vis' defined in .bss section in /tmp/ccfkXa1a.o
a.cc:(.text+0x106): re... |
s621060627 | p02240 | C++ | #include <stdio.h>
#include <stack>
#include <iostream>
using namespace std;
int G[100000][100000];
int vis[100000];
int n;
bool dfs(int s, int t)
{
if (G[s][t] == 1 || G[t][s] == 1) return true;
vis[s] = 1;
for (int i = 0; i < n; i++)
{
if (G[s][i] == 1 && vis[i] == 0)
{
... | /tmp/ccbjTLyc.o: in function `dfs(int, int)':
a.cc:(.text+0x80): relocation truncated to fit: R_X86_64_PC32 against symbol `vis' defined in .bss section in /tmp/ccbjTLyc.o
a.cc:(.text+0xd3): relocation truncated to fit: R_X86_64_PC32 against symbol `vis' defined in .bss section in /tmp/ccbjTLyc.o
a.cc:(.text+0x106): re... |
s887905173 | p02240 | C++ | #include<iostream>
#include<unordered_map> | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s926338171 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
int i, u, v;
stack<int> S;
S.push(r);
color[r] = c;
while ( !S.empty() ) {
u = S.top();
S.pop();
for ( i = 0... | a.cc: In function 'void dfs(int, int)':
a.cc:22:42: error: 'FIL' was not declared in this scope; did you mean 'NIL'?
22 | if ( color[v] == FIL ) {
| ^~~
| NIL
a.cc: In function 'int main()':
a.cc:41:... |
s096257737 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
int i, u, v;
while ( !S.empty() ) {
u = S.top();
S.pop();
for ( i = 0... | a.cc: In function 'int main()':
a.cc:41:9: error: 'assignColor' was not declared in this scope
41 | assignColor();
| ^~~~~~~~~~~
|
s694319947 | p02240 | C++ | #include<iostream>
#include<vector>
#inlcude<stack>
using namespace std;
#define MAX 100000
#define NIL -1
int G[MAX][MAX];
int n, color[MAX], top=0;
vector<int> G[MAX];
void dfs(int r, int c) {
stack<int> S;
int i, v, u;
S.push(r);
color[r]=c;
while (! S.empty()) {
u=S.top();
S.pop();
for (i=0... | a.cc:3:2: error: invalid preprocessing directive #inlcude; did you mean #include?
3 | #inlcude<stack>
| ^~~~~~~
| include
a.cc:10:13: error: conflicting declaration 'std::vector<int> G [100000]'
10 | vector<int> G[MAX];
| ^
a.cc:8:5: note: previous declaration as 'int G [100000][1... |
s466970714 | p02240 | C++ | #include<iostream>
#include<vector>
#inlcude<stack>
using namespace std;
#define MAX 100000
#define NIL -1
int n, color[MAX];
vector<int> G[MAX];
void dfs(int r, int c) {
stack<int> S;
int i, v, u;
S.push(r);
color[r]=c;
while (! S.empty()) {
u=S.top();
S.pop();
for (i=0; i<G[u].size(); i++) {
... | a.cc:3:2: error: invalid preprocessing directive #inlcude; did you mean #include?
3 | #inlcude<stack>
| ^~~~~~~
| include
a.cc: In function 'void dfs(int, int)':
a.cc:13:3: error: 'stack' was not declared in this scope
13 | stack<int> S;
| ^~~~~
a.cc:3:1: note: 'std::stack' is defined in ... |
s193261618 | p02240 | C++ | #include<iostream>
#include<vector>
#inlcude<stack>
using namespace std;
#define MAX 100000
#define NIL -1
int n, color[MAX];
vector<int> G[MAX];
void dfs(int r, int c) {
stack<int> S;
int i, v, u;
S.push(r);
color[r]=c;
while (! S.empty()) {
u=S.top();
S.pop();
for (i=0; i<G[u].size(); i++) {
... | a.cc:3:2: error: invalid preprocessing directive #inlcude; did you mean #include?
3 | #inlcude<stack>
| ^~~~~~~
| include
a.cc: In function 'void dfs(int, int)':
a.cc:13:3: error: 'stack' was not declared in this scope
13 | stack<int> S;
| ^~~~~
a.cc:3:1: note: 'std::stack' is defined in ... |
s081463891 | p02240 | C++ | #include<iostream>
#include<vector>
#inlcude<stack>
using namespace std;
#define MAX 100000
#define NIL -1
int n, color[MAX];
vector<int> G[MAX];
void dfs(int r, int c) {
stack<int> S;
int i, v, u;
S.push(r);
color[r]=c;
while (! S.empty()) {
u=S.top();
S.pop();
for (i=0; i<G[u].size(); i++) {
... | a.cc:3:2: error: invalid preprocessing directive #inlcude; did you mean #include?
3 | #inlcude<stack>
| ^~~~~~~
| include
a.cc: In function 'void dfs(int, int)':
a.cc:13:3: error: 'stack' was not declared in this scope
13 | stack<int> S;
| ^~~~~
a.cc:3:1: note: 'std::stack' is defined in ... |
s047348703 | p02240 | C++ | #include<iostream>
#include<vector>
#inlcude<stack>
using namespace std;
#define MAX 100000
#define NIL -1
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
int i, v, u;
S.push(r);
color[r]=c;
while (! S.empty()) {
u=S.top();
S.pop();
for (i=0; i<G[u].size(); i++... | a.cc:3:2: error: invalid preprocessing directive #inlcude; did you mean #include?
3 | #inlcude<stack>
| ^~~~~~~
| include
a.cc: In function 'void dfs(int, int)':
a.cc:14:3: error: 'stack' was not declared in this scope
14 | stack<int> S;
| ^~~~~
a.cc:3:1: note: 'std::stack' is defined in ... |
s074889374 | p02240 | C++ | #include <bits/stdc++.h>
#define ll long long
#define INF 999999999
#define MOD 1000000007
using namespace std;
typedef pair<int,int>P;
const int MAX_N = 100000;
int par[MAX_N];
int rank[MAX_N];
void initial(int n){ //?????????
for(int i=0;i<n;i++){
par[i] = i;
rank[i] = 0;
}
}
int find(int x){ //??¨?????... | a.cc: In function 'void initial(int)':
a.cc:18:17: error: reference to 'rank' is ambiguous
18 | rank[i] = 0;
| ^~~~
In file included from /usr/include/c++/14/bits/stl_pair.h:60,
from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/... |
s203002807 | p02240 | C++ | #include <vector>
#include <cstdio>
class union_find{
????????std::vector<int> parent;
public:
????????int root(int a){return parent[a]==a?a:(parent[a]=root(parent[a]));}
????????union_find(int n):parent(n+1){for(int i=1;i<=n;i++)parent[i]=i;}
????????int same(int a,int b){return root(a)==root(b);}
????????int unite(in... | a.cc:4:1: error: expected unqualified-id before '?' token
4 | ????????std::vector<int> parent;
| ^
a.cc:6:1: error: expected unqualified-id before '?' token
6 | ????????int root(int a){return parent[a]==a?a:(parent[a]=root(parent[a]));}
| ^
a.cc:7:1: error: expected unqualified-id before '?' token
... |
s557904550 | p02240 | C++ | #include<stack>
#include<queue>
#include<vector>
#include<iostream>
#include<algorithm>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
??
void dfs(int r,int c){
????????stack<int> S;
????????S.push(r);
????????color[r] = c;
????????while (!S.emp... | a.cc:12:1: error: expected unqualified-id before '?' token
12 | ??
| ^
a.cc: In function 'void assignColor()':
a.cc:29:1: error: expected primary-expression before '?' token
29 | ????????int id = 1;
| ^
a.cc:29:2: error: expected primary-expression before '?' token
29 | ????????int id = 1;
| ... |
s970421917 | p02240 | C++ | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
//============================================================================
#define pred(x) ((x)-1)
#define succ(x) ((x)+1)
#define True 1
#define False 0
//#define max(x,y) (((x)<(y))?y:x)
//=======================... | a.cc: In function 'void input(FILE*)':
a.cc:99:20: error: invalid conversion from 'void*' to 'TGraph*' {aka 'graph*'} [-fpermissive]
99 | graphary=malloc(n*sizeof(TGraph));
| ~~~~~~^~~~~~~~~~~~~~~~~~
| |
| void*
|
s034917522 | p02240 | C++ | #include <cassert>
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <list>
class TVertex
{
int FIndex;
int FCommuniyId;
std::list<TVertex*> FList;
public:
TVertex(int Index)
: FIndex(Index), FCommuniyId(0)
{}
void AddPath(TVertex* Vertex)
{
... | a.cc: In function 'int main()':
a.cc:84:25: error: expected ';' before 'Graph'
84 | std::scanf("%d", &q)
| ^
| ;
85 | Graph.SetCommunity();
| ~~~~~
|
s981073101 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while (!S.empty()) {
int u = S.top(); S.pop();
for (int i = 0; i < G[u].... | a.cc: In function 'int main()':
a.cc:44:19: error: request for member 'push_back' in 'G', which is of non-class type 'std::vector<int> [100000]'
44 | G.push_back(t);
| ^~~~~~~~~
a.cc:45:19: error: request for member 'push_back' in 'G', which is of non-class type 'std::vector<i... |
s950901340 | p02240 | C++ | #include<cstdio>
#include<stack>
#include<vector>
using namespace std;
const int big=100000;
const int nil=-1;
int n;
vector<int> tu[big];
int color[big];
void dfs(int r,int c)
{
stack<int>a;
a.push(r);
color[r]=c;
while(!a.empty())
{
int u=a.top();
a.pop();
for (int i=0;i<tu... | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
|
s571337788 | p02240 | C++ | #include <iostream>
#include <vector>
using namespace std;
#define N_MAX 100000
int search_connection(int s, int t);
vector<int> G[N_MAX], check_v;
int main()
{
int n, m, i, s, t, q;
cin >> n >> m;
//??£??\??????????????????
for (i = 0; i < m; i++) {
cin >> s >> t;
G[s].push_back(t... | a.cc: In function 'int search_connection(int, int)':
a.cc:51:23: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
51 | else if ( find(check_v.begin(), check_v.end(), *itr) != check_v.end() ) {
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~... |
s435444281 | p02240 | C++ | #include <iostream>
#include <vector>
using namespace std;
#define N_MAX 100000
int search_connection(int s, int t);
vector<int> G[N_MAX], check_v;
int main()
{
int n, m, i, s, t, q;
cin >> n >> m;
//??£??\??????????????????
for (i = 0; i < m; i++) {
cin >> s >> t;
G[s].push_back(t... | a.cc: In function 'int search_connection(int, int)':
a.cc:51:28: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
51 | else if ( std::find(check_v.begin(), check_v.end(), *itr) != check_v.end() ) {
| ~~~~~~~~~^~~~~~~~~~~~~~~~... |
s037926091 | p02240 | C++ | #include<iostream>
#include<list>
#include<iterator>
using namespace std;
class person
{
public:
int id;
bool Isdone = false;
list <person*> lis;
bool serch(person* Per)
{
Isdone = true;
for(list<person*>::iterator temp=lis.begin();temp!=lis.end();++temp)
{
if ((*temp) == Per)return true;
else if ((*t... | a.cc: In function 'int main()':
a.cc:38:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
38 | scanf_s("%d%d",&p1, &p2);
| ^~~~~~~
| scanf
a.cc:47:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
47 | ... |
s427145730 | p02240 | C++ | #include<iostream>
#include<iomanip>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cassert>
#include<ctime>
#include<algorithm>
#include<utility>
#include<map>
#include<set>
#include<vector>
#include<functional>
using namespace std;
#ifd... | /tmp/ccUKiIOE.o: in function `dfs(int, int)':
a.cc:(.text+0x73): relocation truncated to fit: R_X86_64_PC32 against symbol `sumi' defined in .bss section in /tmp/ccUKiIOE.o
a.cc:(.text+0x8e): relocation truncated to fit: R_X86_64_PC32 against symbol `sumi' defined in .bss section in /tmp/ccUKiIOE.o
a.cc:(.text+0xb7): r... |
s987497717 | p02240 | C++ | #include<iostream>
#include<iomanip>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cassert>
#include<ctime>
#include<algorithm>
#include<utility>
#include<map>
#include<set>
#include<vector>
#include<functional>
using namespace std;
#ifd... | /tmp/cc3QZAq5.o: in function `dfs(int, int)':
a.cc:(.text+0x73): relocation truncated to fit: R_X86_64_PC32 against symbol `sumi' defined in .bss section in /tmp/cc3QZAq5.o
a.cc:(.text+0x8e): relocation truncated to fit: R_X86_64_PC32 against symbol `sumi' defined in .bss section in /tmp/cc3QZAq5.o
a.cc:(.text+0xb7): r... |
s557852171 | p02240 | C++ | #include<iostream>
#include<iomanip>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cassert>
#include<ctime>
#include<algorithm>
#include<utility>
#include<map>
#include<set>
#include<vector>
#include<functional>
using namespace std;
#ifd... | /tmp/cctnb7gj.o: in function `dfs(int, int)':
a.cc:(.text+0x6c): relocation truncated to fit: R_X86_64_PC32 against symbol `sumi' defined in .bss section in /tmp/cctnb7gj.o
a.cc:(.text+0x87): relocation truncated to fit: R_X86_64_PC32 against symbol `sumi' defined in .bss section in /tmp/cctnb7gj.o
a.cc:(.text+0xb0): r... |
s969368508 | p02240 | C++ | #include<iostream>
#include<iomanip>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cassert>
#include<ctime>
#include<algorithm>
#include<utility>
#include<map>
#include<set>
#include<vector>
#include<functional>
using namespace std;
#ifd... | /tmp/cc487yNC.o: in function `dfs(int, int)':
a.cc:(.text+0x6c): relocation truncated to fit: R_X86_64_PC32 against symbol `sumi' defined in .bss section in /tmp/cc487yNC.o
a.cc:(.text+0x87): relocation truncated to fit: R_X86_64_PC32 against symbol `sumi' defined in .bss section in /tmp/cc487yNC.o
a.cc:(.text+0xb0): r... |
s236683702 | p02240 | C++ | #include<iostream>
#include<iomanip>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cassert>
#include<ctime>
#include<algorithm>
#include<utility>
#include<map>
#include<set>
#include<vector>
#include<functional>
using namespace std;
#ifd... | /tmp/ccXQR3Qd.o: in function `dfs(int, int)':
a.cc:(.text+0x6c): relocation truncated to fit: R_X86_64_PC32 against symbol `sumi' defined in .bss section in /tmp/ccXQR3Qd.o
a.cc:(.text+0x87): relocation truncated to fit: R_X86_64_PC32 against symbol `sumi' defined in .bss section in /tmp/ccXQR3Qd.o
a.cc:(.text+0xb0): r... |
s849764976 | p02240 | C++ | #include<iostream>
#include<iomanip>
#include<queue>
#include<string>
#include<stack>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<cassert>
#include<ctime>
#include<algorithm>
#include<utility>
#include<map>
#include<set>
#include<vector>
#include<functional>
using namespace std;
#ifd... | /tmp/cc5Rt28H.o: in function `dfs(int, int)':
a.cc:(.text+0x6c): relocation truncated to fit: R_X86_64_PC32 against symbol `sumi' defined in .bss section in /tmp/cc5Rt28H.o
a.cc:(.text+0x87): relocation truncated to fit: R_X86_64_PC32 against symbol `sumi' defined in .bss section in /tmp/cc5Rt28H.o
a.cc:(.text+0xb0): r... |
s575172993 | p02240 | C++ | #include<stdio.h>
#include<queue>
using namespace std;
const int MAX = 100000;
int parent(int table[], int child) {
while (table[child] != -1) {
q.push(child);
child = table[child];
}
return child;
}
int main() {
int n, m, q;
int table[MAX];
scanf("%d %d", &n, &m);
for (int i = 0; i < n; i++)table[i] ... | a.cc: In function 'int parent(int*, int)':
a.cc:11:17: error: 'q' was not declared in this scope
11 | q.push(child);
| ^
|
s246729138 | p02240 | C++ | #include<stdio.h>
using namespace std;
const int MAX = 100000;
int parent(int table[], int child) {
while (table[child] != -1) {
q.push(child);
child = table[child];
}
return child;
}
int main() {
int n, m, q;
int table[MAX];
scanf("%d %d", &n, &m);
for (int i = 0; i < n; i++)table[i] = -1;
for (int i ... | a.cc: In function 'int parent(int*, int)':
a.cc:8:17: error: 'q' was not declared in this scope
8 | q.push(child);
| ^
|
s254571193 | p02240 | C++ | #include <cstdint>
#include <vector>
using namespace std;
#define GRAPH_SIZE 100000
enum state_t {
WHITE,
GRAY,
BLACK,
};
struct vertex_t {
uint32_t color;
vector<uint32_t> connections;
};
static vertex_t graph[GRAPH_SIZE];
static state_t state[GRAPH_SIZE];
static void colorize(uint32_t index, uint32_t ... | a.cc: In function 'void check_connection(size_t)':
a.cc:41:28: error: 'knum' was not declared in this scope; did you mean 'num'?
41 | for (uint32_t i = 0; i < knum; i++) {
| ^~~~
| num
|
s073147894 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r,int c){
stack<int>.S;
S.push(r);
color[r]=c;
while(!S.empty()){
int u = S.pop();
for(int i=0;i<G[u].size();i+... | a.cc: In function 'void dfs(int, int)':
a.cc:17:11: error: expected unqualified-id before '.' token
17 | stack<int>.S;
| ^
a.cc:18:3: error: 'S' was not declared in this scope
18 | S.push(r);
| ^
a.cc: In function 'void assignColor()':
a.cc:37:23: error: 'bfs' was not declared in this sc... |
s355649541 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r,int c){
stack<int>.S;
S.push(r);
color[r]=c;
while(!S.empty()){
int u = S.pop();
for(int i=0;i<G[u].size();i+... | a.cc: In function 'void dfs(int, int)':
a.cc:17:11: error: expected unqualified-id before '.' token
17 | stack<int>.S;
| ^
a.cc:18:3: error: 'S' was not declared in this scope
18 | S.push(r);
| ^
a.cc: In function 'void assignColor()':
a.cc:37:23: error: 'bfs' was not declared in this sc... |
s006059198 | p02240 | C++ | #include<iostream>
#include<cstdio>
#include<stack>
#include<cstring>
#include<vector>
#include<queue>
#include<stack>
#define white 0
#define grey 1
#define nil -1
#define maxn 100000
using namespace std;
vector<int> g[maxn+5];
int color[maxn+5];
int n,m;
void dfs(int s,int t)
{
stack<int>q;
q.push(s);
c... | a.cc: In function 'void dfs(int, int)':
a.cc:22:11: error: 'r' was not declared in this scope
22 | color[r]=t;
| ^
|
s372313770 | p02240 | C++ | #include <iostream>#include <vector>#include <queue>static const int MAX=100000;using namespace std;vector<int> follow[MAX];int color[MAX]; //-1 represent No Visitedvoid bfs(int i,int c){ queue<int> Q; Q.push(i);color[i]=c; while(!Q.empty()) { int p=Q.front();Q.pop(); for(int j=0;j<follow[p].... | a.cc:1:20: warning: extra tokens at end of #include directive
1 | #include <iostream>#include <vector>#include <queue>static const int MAX=100000;using namespace std;vector<int> follow[MAX];int color[MAX]; //-1 represent No Visitedvoid bfs(int i,int c){ queue<int> Q; Q.push(i);color[i]=c; while(!Q.empty()... |
s068086455 | p02240 | C++ | #include <iostream>
#include <vector>
#include <queue>
static const int MAX=100000;
using namespace std;
vector<int> follow[MAX];
int color[MAX]; //-1 represent No Visitedvoid
bfs(int i,int c){ queue<int> Q; Q.push(i);color[i]=c;
while(!Q.empty())
{ int p=Q.front();Q.pop(); for(int j=0;j<f... | a.cc:8:1: error: ISO C++ forbids declaration of 'bfs' with no type [-fpermissive]
8 | bfs(int i,int c){ queue<int> Q; Q.push(i);color[i]=c;
| ^~~
a.cc: In function 'int bfs(int, int)':
a.cc:11:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
11 | int main(){... |
s322376017 | p02240 | C++ | #include <iostream>
#include <algorithm> // next_permutation
#include <iomanip>
#include <cmath>
#include <vector>
#include <sstream>
#include <string>
#include <cstdio>
#include <stack>
#include <queue>
#include <list>
#include <numeric> //accumulate
//#include <unordered_map> //???????????\??¢??°
#include <fstream> /... | /tmp/ccZIVBRo.o: in function `dfs(int)':
a.cc:(.text+0x1b): relocation truncated to fit: R_X86_64_PC32 against symbol `color' defined in .bss section in /tmp/ccZIVBRo.o
a.cc:(.text+0x28): relocation truncated to fit: R_X86_64_PC32 against symbol `currentColor' defined in .bss section in /tmp/ccZIVBRo.o
a.cc:(.text+0x3d... |
s122385987 | p02240 | C++ | ////////////////////////////////////////
//??°??????????????????
//ALDS1_11_A: Graph
//ALDS1_11_B: Depth First Search
//ALDS1_11_C: Breadth First Search
//????????§????????\?????????????£?
//
//ALDS1_11_D: Connected Components
//
////////////////////////////////////////
#include <iostream>
#include <algorithm>... | /tmp/ccZalcl4.o: in function `dfs(int)':
a.cc:(.text+0x1b): relocation truncated to fit: R_X86_64_PC32 against symbol `color' defined in .bss section in /tmp/ccZalcl4.o
a.cc:(.text+0x28): relocation truncated to fit: R_X86_64_PC32 against symbol `currentColor' defined in .bss section in /tmp/ccZalcl4.o
a.cc:(.text+0x3d... |
s235417562 | p02240 | C++ | ////////////////////////////////////////
//??°??????????????????
//ALDS1_11_A: Graph
//ALDS1_11_B: Depth First Search
//ALDS1_11_C: Breadth First Search
//????????§????????\?????????????£?
//
//ALDS1_11_D: Connected Components
//
////////////////////////////////////////
#include <iostream>
#include <algorithm>... | /tmp/ccox0kR1.o: in function `dfs(int)':
a.cc:(.text+0x1b): relocation truncated to fit: R_X86_64_PC32 against symbol `color' defined in .bss section in /tmp/ccox0kR1.o
a.cc:(.text+0x28): relocation truncated to fit: R_X86_64_PC32 against symbol `currentColor' defined in .bss section in /tmp/ccox0kR1.o
a.cc:(.text+0x3d... |
s930913617 | p02240 | C++ | ////////////////////////////////////////
//??°??????????????????
//ALDS1_11_A: Graph
//ALDS1_11_B: Depth First Search
//ALDS1_11_C: Breadth First Search
//????????§????????\?????????????£?
//
//ALDS1_11_D: Connected Components
//
////////////////////////////////////////
#include <iostream>
#include <algorithm>... | /tmp/ccOJOY0D.o: in function `dfs(int)':
a.cc:(.text+0x1b): relocation truncated to fit: R_X86_64_PC32 against symbol `color' defined in .bss section in /tmp/ccOJOY0D.o
a.cc:(.text+0x28): relocation truncated to fit: R_X86_64_PC32 against symbol `currentColor' defined in .bss section in /tmp/ccOJOY0D.o
a.cc:(.text+0x3d... |
s673090382 | p02240 | C++ | //
//
// ad-algoD.cpp - created by us162022
//
#include <iostream>
using namespace std;
int find(int join[],int x){
if(x==join[x])
return x;
return find(join[x]);
}
int main(int argc, char *argv[])
{
int n,m,join[100000],num[100000],s,t;
cin >> n >> m;
for(int i=0; i<n; i++){
join[i] = i;
num[i... | a.cc: In function 'int find(int*, int)':
a.cc:11:14: error: no matching function for call to 'find(int&)'
11 | return find(join[x]);
| ~~~~^~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
from /usr/include/c++/14/bits/basic_ios.h:37,
from... |
s066939641 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while ( !S.empty() ) {
int u = S.top(); S.pop();
for... | a.cc: In function 'void dfs(int, int)':
a.cc:21:10: error: expected ',' or ';' before 'if'
21 | if ( color[v] == NIL ) {
| ^~
|
s018433968 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c) {
stack<int> S;
S.push(r);
color[r] = c;
while ( !S.empty() ) {
int u = S.top(); S.pop();
for... | a.cc: In function 'void dfs(int, int)':
a.cc:21:10: error: expected ',' or ';' before 'if'
21 | if ( color[v] == NIL ) {
| ^~
|
s222240138 | p02240 | C++ | #include <stdio.h>
int m[100000] = {0};
void init() {
int i;
for ( i = 0; i < 100000; ++i) {
m[i] = i;
}
}
int find(int n) {
if ( n == m[n]) {
return n;
}
return m[n] = find(m[n]);
}
int friend (int x, int y) {
if ( find(x) == find(y)) {
return 1;
} else {
return 0;
}
}
void unit (int x, int y) {
... | a.cc:19:5: error: 'friend' used outside of class
19 | int friend (int x, int y) {
| ^~~~~~
| ------
a.cc:19:13: error: expected unqualified-id before 'int'
19 | int friend (int x, int y) {
| ^~~
a.cc:19:13: error: expected ')' before 'int'
19 | int friend (int x, int y) {
... |
s642575495 | p02240 | C++ | #include <stdio.h>
int m[100000] = {0};
void init() {
int i;
for ( i = 0; i < 100000; ++i) {
m[i] = i;
}
}
int find(int n) {
if ( n == m[n]) {
return n;
}
return m[n] = find(m[n]);
}
void friend (int x, int y) {
if ( find(x) == find(y)) {
return 1;
} else {
return 0;
}
}
void unit (int x, int y) {... | a.cc:19:6: error: 'friend' used outside of class
19 | void friend (int x, int y) {
| ^~~~~~
| ------
a.cc:19:14: error: expected unqualified-id before 'int'
19 | void friend (int x, int y) {
| ^~~
a.cc:19:14: error: expected ')' before 'int'
19 | void friend (int x, int... |
s619459219 | p02240 | C++ | #include <stdio.h>
int m[100000] = {0};
void init() {
int i;
for ( i = 0; i < 100000; ++i) {
m[i] = i;
}
}
int find(int a) {
if ( a == m[a]) {
return a;
}
return m[a] = find(m[a]);
}
int friend(int x, int y) {
if ( find(x) == find(y)) {
return 1;
} else {
return 0;
}
}
void unit (int x, int y) {
... | a.cc:19:5: error: 'friend' used outside of class
19 | int friend(int x, int y) {
| ^~~~~~
| ------
a.cc:19:12: error: expected unqualified-id before 'int'
19 | int friend(int x, int y) {
| ^~~
a.cc:19:12: error: expected ')' before 'int'
19 | int friend(int x, int y) {
... |
s335579902 | p02240 | C++ | #include <stdio.h>
int m[100000] = {0};
void init() {
int i;
for ( i = 0; i < 100000; ++i) {
m[i] = i;
}
}
int find(int a) {
if ( a == m[a]) {
return a;
}
return m[a] = find(m[a]);
}
int friend(int x, int y) {
if ( find(x) == find(y)) {
return 1;
} else {
return 0;
}
}
void unit (int x, int y) {
... | a.cc:19:5: error: 'friend' used outside of class
19 | int friend(int x, int y) {
| ^~~~~~
| ------
a.cc:19:12: error: expected unqualified-id before 'int'
19 | int friend(int x, int y) {
| ^~~
a.cc:19:12: error: expected ')' before 'int'
19 | int friend(int x, int y) {
... |
s029867513 | p02240 | C++ | #include <iostream>
using namespace std;
const int N = 100000;
int A[N][N] = {{0}};
int n;
bool dfs(int s, int t) {
if (A[s][t] == 1) {
return true;
}
for (int i = 0; i < n; ++i) {
if (i != t && A[s][i] != 0) {
if (dfs(i, t)) {
return true;
}
... | /tmp/ccDqFYw9.o: in function `dfs(int, int)':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccDqFYw9.o
/tmp/ccDqFYw9.o: in function `main':
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/... |
s492291896 | p02240 | C++ | #include <iostream>
using namespace std;
const int N = 100000;
int A[N][N] = {{0}};
int n;
bool dfs(int s, int t) {
if (A[s][t] == 1) {
return true;
}
for (int i = 0; i < n; ++i) {
if (i != t && A[s][i] != 0) {
if (dfs(i, t)) {
return true;
}
... | /tmp/ccrOIJyh.o: in function `dfs(int, int)':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccrOIJyh.o
/tmp/ccrOIJyh.o: in function `main':
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/... |
s049199954 | p02240 | C++ | #include <iostream>
using namespace std;
const int N = 100000;
int A[N][N] = {{0}};
int n;
bool dfs(int s, int t) {
if (A[s][t] == 1) {
return true;
}
for (int i = 0; i < n; ++i) {
if (i != t && A[s][i] != 0) {
if (dfs(i, t)) {
return true;
}
... | /tmp/ccvXMh1W.o: in function `dfs(int, int)':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccvXMh1W.o
/tmp/ccvXMh1W.o: in function `main':
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/... |
s150887555 | p02240 | C++ | #include <iostream>
using namespace std;
const int N = 100000;
int A[N][N] = {{0}};
int n;
bool dfs(int s, int t) {
if (A[s][t] == 1) {
return true;
}
for (int i = 0; i < n; ++i) {
if (i != t && A[s][i] != 0) {
if (dfs(i, t)) {
return true;
}
... | /tmp/ccxQNDNs.o: in function `dfs(int, int)':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccxQNDNs.o
/tmp/ccxQNDNs.o: in function `main':
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/... |
s118364669 | p02240 | C++ | #include <iostream>
using namespace std;
const int N = 100000;
int A[N][N] = {{0}};
int n;
bool dfs(int s, int t) {
if (A[s][t] == 1) {
return true;
}
for (int i = 0; i < n; ++i) {
if (i != t && A[s][i] != 0) {
if (dfs(i, t)) {
return true;
}
... | /tmp/ccngm3Xt.o: in function `dfs(int, int)':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccngm3Xt.o
/tmp/ccngm3Xt.o: in function `main':
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/... |
s360738067 | p02240 | C++ | #include <iostream>
using namespace std;
const int N = 100000;
int A[N][N] = {{0}};
int n;
bool dfs(int s, int t) {
if (A[s][t] == 1) {
return true;
}
for (int i = 0; i < n; ++i) {
if (i != t && A[s][i] != 0) {
if (dfs(i, t)) {
return true;
}
... | /tmp/cc2SisMj.o: in function `dfs(int, int)':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc2SisMj.o
/tmp/cc2SisMj.o: in function `main':
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/... |
s976607793 | p02240 | C++ | #include <iostream>
using namespace std;
const int N = 100000;
int A[N][N] = {{0}};
int n;
bool dfs(int s, int t) {
if (A[s][t] == 1) {
return true;
}
for (int i = 0; i < n; ++i) {
if (i != t && A[s][i] != 0) {
if (dfs(i, t)) {
return true;
}
... | /tmp/ccDu98AG.o: in function `dfs(int, int)':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccDu98AG.o
/tmp/ccDu98AG.o: in function `main':
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/... |
s670383995 | p02240 | C++ | #include <iostream>
using namespace std;
const int N = 100000;
int A[N][N] = {{0}};
int n;
bool dfs(int s, int t) {
if (A[s][t] == 1) {
return true;
}
for (int i = 0; i < n; ++i) {
if (i != t && A[s][i] != 0) {
if (dfs(i, t)) {
return true;
}
... | /tmp/cc2Auw0r.o: in function `dfs(int, int)':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc2Auw0r.o
/tmp/cc2Auw0r.o: in function `main':
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/... |
s135063718 | p02240 | C++ | #include <iostream> using namespace std; const int N = 100000; int A[N][N] = {{0}}; int n; bool dfs(int s, int t) { if (A[s][t] == 1) { return true; } for (int i = 0; i < n; ++i) { if (i != t && A[s][i] != 0) { if (dfs(i, t)) { return true; } }... | a.cc:1:21: warning: extra tokens at end of #include directive
1 | #include <iostream> using namespace std; const int N = 100000; int A[N][N] = {{0}}; int n; bool dfs(int s, int t) { if (A[s][t] == 1) { return true; } for (int i = 0; i < n; ++i) { if (i != t && A[s][i] != 0) { ... |
s071196935 | p02240 | C++ | #include <iostream>
using namespace std;
const int N = 100000;
int A[N][N] = {{0}};
int n;
bool dfs(int s, int t) {
if (A[s][t] == 1) {
return true;
}
for (int i = 0; i < n; ++i) {
if (i != t && A[s][i] != 0) {
if (dfs(i, t)) {
return true;
}
... | /tmp/ccPjlajO.o: in function `dfs(int, int)':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccPjlajO.o
/tmp/ccPjlajO.o: in function `main':
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/... |
s444017937 | p02240 | C++ | #include <iostream>
using namespace std;
const int N = 100000;
int A[N][N] = {{0}};
int n;
bool dfs(int s, int t) {
if (A[s][t] == 1) {
return true;
}
for (int i = 0; i < n; ++i) {
if (i != t && A[s][i] != 0) {
if (dfs(i, t)) {
return true;
}
... | /tmp/cc3qKsxI.o: in function `dfs(int, int)':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc3qKsxI.o
/tmp/cc3qKsxI.o: in function `main':
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/... |
s838056133 | p02240 | C++ | #include <iostream>
using namespace std;
const int N = 100000;
int A[N][N] = {{0}};
int n;
bool dfs(int s, int t) {
if (A[s][t] == 1) {
return true;
}
for (int i = 0; i < n; ++i) {
if (i != t && A[s][i] != 0) {
if (dfs(i, t)) {
return true;
}
... | /tmp/ccOpIaUF.o: in function `dfs(int, int)':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccOpIaUF.o
/tmp/ccOpIaUF.o: in function `main':
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/... |
s334352084 | p02240 | C++ | #include <iostream>
using namespace std;
const int N = 100000;
int A[N][N] = {{0}};
int n;
bool dfs(int s, int t) {
if (A[s][t] == 1) {
return true;
}
for (int i = 0; i < n; ++i) {
if (i != t && A[s][i] != 0) {
if (dfs(i, t)) {
return true;
}
... | /tmp/cc0lwjot.o: in function `dfs(int, int)':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc0lwjot.o
/tmp/cc0lwjot.o: in function `main':
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/... |
s371996442 | p02240 | C++ | #include <iostream>
using namespace std;
const int N = 100000;
int A[N][N] = {{0}};
int n;
bool dfs(int s, int t) {
if (A[s][t] == 1) {
return true;
}
for (int i = 0; i < n; ++i) {
if (i != t && A[s][i] != 0) {
if (dfs(i, t)) {
return true;
}
... | /tmp/ccDqbwks.o: in function `dfs(int, int)':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccDqbwks.o
/tmp/ccDqbwks.o: in function `main':
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/... |
s921153488 | p02240 | C++ | #include <iostream>
using namespace std;
const int N = 100000;
int A[N][N];
int n;
bool dfs(int s, int t) {
if (A[s][t] == 1) {
return true;
}
for (int i = 0; i < n; ++i) {
if (i != t && A[s][i] != 0) {
if (dfs(i, t)) {
return true;
}
}
... | /tmp/cc35K6Pk.o: in function `dfs(int, int)':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc35K6Pk.o
/tmp/cc35K6Pk.o: in function `main':
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/... |
s549794899 | p02240 | C++ | #include <iostream>
using namespace std;
// int A[N][N];
vector<vector<int>> A;
int n;
bool dfs(int s, int t) {
if (A[s][t] == 1) {
return true;
}
for (int i = 0; i < n; ++i) {
if (i != t && A[s][i] != 0) {
if (dfs(i, t)) {
return true;
}
}
... | a.cc:6:1: error: 'vector' does not name a type
6 | vector<vector<int>> A;
| ^~~~~~
a.cc: In function 'bool dfs(int, int)':
a.cc:10:9: error: 'A' was not declared in this scope
10 | if (A[s][t] == 1) {
| ^
a.cc:14:23: error: 'A' was not declared in this scope
14 | if (i != t && ... |
s225812790 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
int i, j, v, num, color[100000];
vector<int> list[100000];
void dfs(int r, int c){
stack<int> S;
S.push(r);
color[r] = c;
while( !S.empty() ){
int u = S.top(); S.pop();
for(i=0; i<list[u].size(); i++){
v = list[u][i];
if(color... | a.cc: In function 'int main()':
a.cc:37:2: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
37 | scanf_s("%d %d", &num, &kaisuu);
| ^~~~~~~
| scanf
|
s140215059 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
int i, j, v, num, color[100000];
vector<int> list[100000];
void dfs(int r, int c){
stack<int> S;
S.push(r);
color[r] = c;
while( !S.empty() ){
int u = S.top(); S.pop();
for(i=0; i<list[u].size(); i++){
v = list[u][i];
if(color... | a.cc: In function 'int main()':
a.cc:40:4: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
40 | scanf_s("%d %d", &a, &b);
| ^~~~~~~
| scanf
a.cc:50:4: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
50 | scanf_s("%d %d", &start, &goal);
|... |
s703593370 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
static const int Max = 100000
static const int NIL = 100000
int i, j, v, num, color[Max];
vector<int> list[Max];
void dfs(int r, int c){
stack<int> S;
S.push(r);
color[r] = c;
while( !S.empty() ){
int u = S.top(); S.pop();
for(i=0; i<l... | a.cc:6:1: error: expected ',' or ';' before 'static'
6 | static const int NIL = 100000
| ^~~~~~
a.cc: In function 'void dfs(int, int)':
a.cc:13:2: error: 'color' was not declared in this scope; did you mean 'tolower'?
13 | color[r] = c;
| ^~~~~
| tolower
a.cc:16:8: error: 'i' was not declare... |
s997638367 | p02240 | C++ | #include<iostream>
#include<iostream>
#include<vector>
#include<stack>
using namespace std;
static const int MAX = 100000;
int i, j, v, num, color[MAX];
vector<int> list[MAX];
void dfs(int r, int c){
stack<int> S;
S.push(r);
color[r] = c;
while( !S.empty() ){
int u = S.top(); S.pop();
for(i=0; i<list[u].si... | a.cc: In function 'void assigncolor()':
a.cc:31:11: error: 'ij' was not declared in this scope; did you mean 'id'?
31 | for(j=0; ij<num; j++){
| ^~
| id
|
s832057945 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs( int r, int c ){
stack<int> S;
S.push(r);
color[r] = c;
while ( !S.empty() ){
int u = S.top(); S.pop();
... | a.cc: In function 'void assignColor()':
a.cc:30:11: error: 'i' was not declared in this scope; did you mean 'id'?
30 | for ( i = 0; i < n; i++ ) color[i] = NIL;
| ^
| id
a.cc:31:11: error: 'u' was not declared in this scope
31 | for ( u = 0; u < n; u++ ){
| ... |
s419184169 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n, i, u;
vector<int> G[MAX];
int color[MAX];
void dfs( int r, int c ){
stack<int> S;
S.push(r);
color[r] = c;
while ( !S.empty() ){
int u = S.top(); S.pop();
... | a.cc: In function 'int main()':
a.cc:44:11: error: request for member 'push_back' in 'G', which is of non-class type 'std::vector<int> [100000]'
44 | G.push_back(t);
| ^~~~~~~~~
a.cc:45:11: error: request for member 'push_back' in 'G', which is of non-class type 'std::vector<int> [100000]'
... |
s360768464 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
static const int MAX = 100000;
static const int NTL = -1;
int n;
vector<int>G[max];
int color[MAX];
void dfs(int r,int c){
stack<int> S;
S.push(r);
color[r]=c;
while (!S.empty()) {
int u = S.top(); S.pop();
for (int i =0;i < G[u]... | a.cc:9:17: error: cannot resolve overloaded function 'max' based on conversion to type 'long unsigned int'
9 | vector<int>G[max];
| ^
a.cc:9:12: error: size of array 'G' has non-integral type '<unresolved overloaded function type>'
9 | vector<int>G[max];
| ^
a.cc: In funct... |
s118362221 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c){
stack<<int> S;
S.push(r);
color[r] = c;
while( !S.empty()) {
int u = S.top(); S.pop();
for(int i = 0;i < G... | a.cc: In function 'void dfs(int, int)':
a.cc:13:8: error: expected unqualified-id before '<<' token
13 | stack<<int> S;
| ^~
a.cc:14:3: error: 'S' was not declared in this scope
14 | S.push(r);
| ^
a.cc: In function 'void assignColor()':
a.cc:32:27: error: 'des' was not declared in this s... |
s281441285 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c){
stack<int> S;
S.push(r);
color[r] = c;
while( !S.empty()) {
int u = S.top(); S.pop();
for(int i = 0; i < G... | a.cc: In function 'void assignColor()':
a.cc:32:27: error: 'des' was not declared in this scope; did you mean 'dfs'?
32 | if ( color[u] == NIL) des(u,id++);
| ^~~
| dfs
|
s416292957 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int> G[MAX];
int color[MAX];
void dfs(int r, int c){
stack<int> S;
S.push(r);
color[r] = c;
while( !S.empty()) {
int u = S.top(); S.pop();
for(int i = 0; i < G... | a.cc: In function 'void assignColor()':
a.cc:32:27: error: 'des' was not declared in this scope; did you mean 'dfs'?
32 | if ( color[u] == NIL) des(u,id++);
| ^~~
| dfs
|
s038377885 | p02240 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <queue>
#include <stack>
#include <map>
#define FOR(i,b,e) for(int i=b;i<e;i++)
#define REP(i,n) FOR(i,0,n)
using namespace std;
const int N = 100000;
int n, m, q;
int M[N][N];
bool V[N];
int bfs(int u, int v) {
int s;
queue<in... | /tmp/ccW6XEHn.o: in function `bfs(int, int)':
a.cc:(.text+0x35): relocation truncated to fit: R_X86_64_PC32 against symbol `V' defined in .bss section in /tmp/ccW6XEHn.o
a.cc:(.text+0x70): relocation truncated to fit: R_X86_64_PC32 against symbol `V' defined in .bss section in /tmp/ccW6XEHn.o
a.cc:(.text+0xd7): relocat... |
s108678922 | p02240 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <queue>
#include <stack>
#include <map>
#define FOR(i,b,e) for(int i=b;i<e;i++)
#define REP(i,n) FOR(i,0,n)
using namespace std;
const int N = 100000;
int n, m, q;
int M[N][N];
bool V[N];
int bfs(int u, int v) {
int s;
queue<in... | /tmp/cclWiENj.o: in function `bfs(int, int)':
a.cc:(.text+0x35): relocation truncated to fit: R_X86_64_PC32 against symbol `V' defined in .bss section in /tmp/cclWiENj.o
a.cc:(.text+0x70): relocation truncated to fit: R_X86_64_PC32 against symbol `V' defined in .bss section in /tmp/cclWiENj.o
a.cc:(.text+0xd7): relocat... |
s267116831 | p02240 | C++ | #include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <queue>
#include <stack>
#include <map>
#define FOR(i,b,e) for(int i=b;i<e;i++)
#define REP(i,n) FOR(i,0,n)
using namespace std;
const int N = 100000;
int n, m, q;
int M[N][N];
bool V[N];
int bfs(int u, int v) {
int s;
queue<in... | /tmp/ccfR1VJm.o: in function `bfs(int, int)':
a.cc:(.text+0x35): relocation truncated to fit: R_X86_64_PC32 against symbol `V' defined in .bss section in /tmp/ccfR1VJm.o
a.cc:(.text+0x70): relocation truncated to fit: R_X86_64_PC32 against symbol `V' defined in .bss section in /tmp/ccfR1VJm.o
a.cc:(.text+0xd7): relocat... |
s451127117 | p02240 | C++ | #include <cstdio>
#include <algorithm>
#define rep(i, n) for(int i=0; i<(n); ++i)
int parent[100005];
int find(int x){
if( parent[x] == x )return x;
return parent[x] = find( parent[x] );
}
void unite(int x, int y)
{
x = find(x);
y = find(y);
if(x == y)return;
parent[x] = y;
}
int main()
{
int ... | a.cc: In function 'int main()':
a.cc:26:9: error: 'iota' is not a member of 'std'
26 | std::iota(parent, parent + N, 0);
| ^~~~
|
s093078785 | p02240 | C++ | #include<iostream>
#include<vector>
#include<stack>
#define pop onany
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int n;
vector<int>G[max];
int color[MAX];
void dfs(int r, int c){
stack<int>S;
S.push(r);
color[r] = c;
while ( !S.empty() ) {
int u = S.top();
S.onany(... | a.cc:11:17: error: cannot resolve overloaded function 'max' based on conversion to type 'long unsigned int'
11 | vector<int>G[max];
| ^
a.cc:11:12: error: size of array 'G' has non-integral type '<unresolved overloaded function type>'
11 | vector<int>G[max];
| ^
a.cc: In fun... |
s022012319 | p02240 | C++ | #include <iostream>
#include <stack>
#define N 100005
using namespace std;
int M[N][N];
int color[N];
int m, n;
int s, t, q;
int i, j;
int nt[N];
int next(int u){
for(int v = nt[n]; v < n; v++){
nt[u] = v + 1;
if(M[u][v] && color[v] == 0) return v;
}
return -1;
}
int dfs(int s, int t){
stack <int> S;
S.push(... | /tmp/cc9MwXdS.o: in function `next(int)':
a.cc:(.text+0x9): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/cc9MwXdS.o
a.cc:(.text+0x1a): relocation truncated to fit: R_X86_64_PC32 against symbol `nt' defined in .bss section in /tmp/cc9MwXdS.o
a.cc:(.text+0x3c): relocation ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.