submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s958402612 | p02237 | C | #include <stdio.h>
??
int main( )
{
int n, i, j, a, b, c;
int M[100][100];
scanf("%d", &n);
??for ( i = 0; i < n; i++ ) {
????for ( j = 0; j < n; j++ ) {
????????M[i][j] = 0;
}
}
??????for ( i = 0; i < n; i++ ) {
????????????scanf("%d%d", &a, &b);
????????????if ( b != 0 ) {
??????????????????for ( j = 0; j < b; j++ ) ... | main.c:2:1: error: expected identifier or '(' before '?' token
2 | ??
| ^
|
s240023862 | p02237 | C | #include <stdio.h>
??
int main( )
{
int n, i, j, a, b, c;
int M[100][100];
scanf("%d", &n);
??for ( i = 0; i < n; i++ ) {
????for ( j = 0; j < n; j++ ) {
????????M[i][j] = 0;
}
}
??????for ( i = 0; i < n; i++ ) {
????????????scanf("%d%d", &a, &b);
????????????if ( b != 0 ) {
??????????????????for ( j = 0; j < b; j++ ) ... | main.c:2:1: error: expected identifier or '(' before '?' token
2 | ??
| ^
|
s234475733 | p02237 | C | #include<stdio.h>
int main(){
int k,u,l,n,m,i,j;
int a[101][101];
int b[101][101];
scanf("%d",&n);
for(i=1; i<=n; i++){
scanf("%d", &u);
a[i][1]=u;
scanf(" %d", &k);
a[i][2]=k;
for(j=3; j<=k+2; j++){
scanf(" %d", &a[i][j]);
b[i][a[i][j... | main.c: In function 'main':
main.c:22:40: error: 'N' undeclared (first use in this function)
22 | printf("%d%c",b[l][m],(j < N-1 ? ' ' : '\n'));
| ^
main.c:22:40: note: each undeclared identifier is reported only once for each function it appears in
|
s693131689 | p02237 | C | #include<stdio.h>
int main(){
int k,u,l,n,m,i,j;
int a[101][101];
int b[101][101];
scanf("%d",&n);
for(i=1; i<=n; i++){
scanf("%d", &u);
a[i][1]=u;
scanf(" %d", &k);
a[i][2]=k;
for(j=3; j<=k+2; j++){
scanf(" %d", &a[i][j]);
b[i][a[i][j... | main.c: In function 'main':
main.c:30:1: error: expected declaration or statement at end of input
30 | }
| ^
|
s897758690 | p02237 | C | #include<iostream>
#define MAX 105
int main(){
int n,u,k;
int adj[MAX][MAX] = {{0}};
int A[MAX][MAX] = {{0}};
std::cin >> n;
for(int i=0;i<n;i++){
std::cin >> u >> k;
for(int j=0;j<k;j++){
std::cin >> adj[u-1][j];
}
adj[u][k] = -1;
}
//std::cout << "入力\n";
for(int i=0;i<n;i++){
... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s100798191 | p02237 | C | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s200847292 | p02237 | C | #include<stdio.h>
int main(void){
int n,i,j,s;
int A[100][105];
int B[100][105];
for(i=1;i<=n;i++){
for(j=1;j<=n+1;j++){
B[i][j]=0;
}
}
scanf("%d",&n);
for(i=1;i<=n;i++){
for(j=1;j<=n+1;j++){
scanf("%d",&A[i][j]);
if(j == 2)s=A[i][j];
if(s+2 == j)break;
}
}
... | main.c: In function 'main':
main.c:37:3: error: expected declaration or statement at end of input
37 | }
| ^
|
s501786507 | p02237 | C | #include<stdio.h>
int main(void){
int n,i,j,s;
int A[110][115];
int B[110][115];
scanf("%d",&n);
for(i=1;i<=n;i++){
for(j=1;j<=n+1;j++){
A[i][j]=0;
B[i][j]=0;
}
}
for(i=1;i<=n;i++){
for(j=1;j<=n+1;j++){
scanf("%d",&A[i][j]);
if(j == 2)s=A[i][j];
if(s+2 =... | main.c: In function 'main':
main.c:37:3: error: expected declaration or statement at end of input
37 | }
| ^
|
s864565213 | p02237 | C | #include <stdio.h>
int main(void){
int mp[105][105]={0};
int n=0;
scanf("%d",&n);
int i=0,j=0;;
for(i=0;<n;i++){
int u=0;
int k=0;
scanf("%d%d",&u,&k);
int p=0;
int m=0;
for(p=0;p<k;p++){
scanf("%d",&m);
mp[u-1][m-1]=1;
}
}
for(i=0;i<n;i++){
printf("%d",mp[0][j]);
for(j=1;j<n;j++){
printf("\x0020%d",mp[i][j]);
}
print... | main.c: In function 'main':
main.c:8:9: error: expected expression before '<' token
8 | for(i=0;<n;i++){
| ^
main.c:25:1: error: expected declaration or statement at end of input
25 | }
| ^
|
s054047192 | p02237 | C | #include <stdio.h>
int main(void){
int mp[105][105]={0};
int n=0;
scanf("%d",&n);
int i=0,j=0;;
for(i=0;<n;i++){
int u=0;
int k=0;
scanf("%d%d",&u,&k);
int p=0;
int m=0;
for(p=0;p<k;p++){
scanf("%d",&m);
mp[u-1][m-1]=1;
}
}
for(i=0;i<n;i++){
printf("%d",mp[0][j]);
for(j=1;j<n;j++){
printf("\x0020%d",mp[i][j]);
}
print... | main.c: In function 'main':
main.c:8:9: error: expected expression before '<' token
8 | for(i=0;<n;i++){
| ^
|
s157844975 | p02237 | C | #include <iostream>
using namespace std;
int main(){
int n,a,b,c;
int G[100][100] = {0};
cin >> n;
for(int i = 0 ; i < n ; i++){
cin >> a >> b;
a--;
for(int i = 0 ; i < b ; i++){
cin >> c;
c--;
G[a][c] = 1;
}
}
for(int i = 0 ; i < n ; i++){
for(int j = 0 ; j < n ; j++... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s988641219 | p02237 | C | #include <iostream>
using namespace std;
int main(){
int n,a,b,c;
int G[100][100];
cin >> n;
for(int i = 0 ; i < n ; i++){
for(int j = 0 ; j < n ; j++){
G[i][j] = 0;
}
}
for(int i = 0 ; i < n ; i++){
cin >> a >> b;
a--;
for(int i = 0 ; i < b ; i++){
cin >> c;
c--;
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s397615427 | p02237 | C | #include <iostream>
using namespace std;
int main(){
int n,a,b,c;
int G[200][200];
cin >> n;
for(int i = 0 ; i < n ; i++){
for(int j = 0 ; j < n ; j++){
G[i][j] = 0;
}
}
for(int i = 0 ; i < n ; i++){
cin >> a >> b;
a--;
for(int i = 0 ; i < b ; i++){
cin >> c;
c--;
... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s487808055 | p02237 | C++ | #include<Miostream>
| a.cc:1:9: fatal error: Miostream: No such file or directory
1 | #include<Miostream>
| ^~~~~~~~~~~
compilation terminated.
|
s399607667 | p02237 | C++ | #include<iostream>
using namespace std;
static const int N=100;
int main()
{
int M[N][N];
int n,u,k,v;
cin>>n;
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
M[i][j]=0;
}
}
for(int i=0;i<n;i++)
{
cin>>u>>k;
u--;
for(int j =0;j<k;j++)
cin>>v;
v--;
M[u][v... | a.cc:31:1: error: expected unqualified-id before 'for'
31 | for(int i=0;i<n;i++)
| ^~~
a.cc:31:13: error: 'i' does not name a type
31 | for(int i=0;i<n;i++)
| ^
a.cc:31:17: error: 'i' does not name a type
31 | for(int i=0;i<n;i++)
| ^
a.cc:41:1: error: 'return0' do... |
s042196019 | p02237 | C++ | #include<iostream>
using namespace std;
static const int N=100;
int main()
{
int M[N][N];
int n,u,k,v;
cin>>n;
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
M[i][j]=0;
}
}
for(int i=0;i<n;i++)
{
cin>>u>>k;
u--;
for(int j =0;j<k;j++)
cin>>v;
v--;
M[u][v... | a.cc:31:1: error: expected unqualified-id before 'for'
31 | for(int i=0;i<n;i++)
| ^~~
a.cc:31:13: error: 'i' does not name a type
31 | for(int i=0;i<n;i++)
| ^
a.cc:31:17: error: 'i' does not name a type
31 | for(int i=0;i<n;i++)
| ^
a.cc:41:1: error: 'return0' do... |
s806182981 | p02237 | C++ | #include<iostream>
#include<windows.h>
using namespace std;
int graph[105][105];
int main()
{
int n;
cin>>n;
memset(graph,0,sizeof(graph));
for(int i=1;i<=n;i++)
{
int v;
cin>>v;
int num;
cin>>num;
while(num--)
{
int aa;
cin>>aa;
graph[v-1][aa-1]=1;
//cout<<v-1<<" "<<aa<<endl;
}
}
for(i... | a.cc:2:9: fatal error: windows.h: No such file or directory
2 | #include<windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s662855400 | p02237 | C++ | #include<iostream>
#include<windows.h>
using namespace std;
int graph[105][105];
int main()
{
int n;
cin>>n;
memset(graph,0,sizeof(graph));
for(int i=1;i<=n;i++)
{
int v;
cin>>v;
int num;
cin>>num;
while(num--)
{
int aa;
cin>>aa;
graph[v-1][aa-1]=1;
//cout<<v-1<<" "<<aa<<endl;
}
}
for(i... | a.cc:2:9: fatal error: windows.h: No such file or directory
2 | #include<windows.h>
| ^~~~~~~~~~~
compilation terminated.
|
s116593688 | p02237 | C++ | #include <iostream>
using namespace std;
static const int N=100;
int main()
{
int M[N][N] //0 origin Adjacency matrix
int n,u,k,v;
cin >> n;
for(int i = 0; i < n; i++)
{
for(int j = 0; j < n; j++) M[i][j]=0;
}
for(int i = 0; i < n; i++)
{
cin >> u >> k;
u--;... | a.cc:12:5: error: extended character is not valid in an identifier
12 | cin >> n;
| ^
a.cc: In function 'int main()':
a.cc:10:5: error: expected initializer before 'int'
10 | int n,u,k,v;
| ^~~
a.cc:12:5: error: 'cin\U00003000' was not declared in this scope
12 | cin >> n;
... |
s278935943 | p02237 | C++ | You are not allowed to see this code.
| a.cc:1:1: error: 'You' does not name a type
1 | You are not allowed to see this code.
| ^~~
|
s341100521 | p02237 | C++ | You are not allowed to see this code
| a.cc:1:1: error: 'You' does not name a type
1 | You are not allowed to see this code
| ^~~
|
s462199462 | p02237 | C++ | You are not allowed to see this code.
| a.cc:1:1: error: 'You' does not name a type
1 | You are not allowed to see this code.
| ^~~
|
s778252118 | p02237 | C++ | #include<iostream>
using namespace std;
int n;
int ad_list[101][101];
void print(){
for(int i=1;i<n+1;i++){
for(int j=1;j<n+1;j++){
cout << ad_list[i][j];
if(j==n)cout << "\n";
else cout << " ";
}
}
}
int main(){
cin >> n;
for(int i=1;i<n+1; i++){
... | a.cc: In function 'int main()':
a.cc:21:28: error: expected ';' before '}' token
21 | ad_list[i][j]=0
| ^
| ;
22 | }
| ~
|
s790516243 | p02237 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,k,u,d;
cin>>n;
vector<vector<int>> Adj(n,vector<int>(n));
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
Adj[i][j]=0;
}
}
for(int i=0;i<n;i++){
cin>>k>>u;
for(int j=0;j<u,j++){
cin... | a.cc: In function 'int main()':
a.cc:14:28: error: expected ';' before ')' token
14 | for(int j=0;j<u,j++){
| ^
| ;
|
s675817039 | p02237 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,k,u,d;
cin>>n;
vector<vector<int>> Adj(n,n);
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
Adj[i][j]=0;
}
}
for(int i=0;i<n;i++){
cin>>k>>u;
for(int j=0;j<u,j++){
cin>>d;
... | a.cc: In function 'int main()':
a.cc:6:32: error: no matching function for call to 'std::vector<std::vector<int> >::vector(int&, int&)'
6 | vector<vector<int>> Adj(n,n);
| ^
In file included from /usr/include/c++/14/vector:66,
from /usr/include/c++/14/functi... |
s724326430 | p02237 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,k,u,d;
cin>>n;
vector<vector<int>> Adj(n,vector<int>(n,0));
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
Adj[i][j]=0;
}
}
for(int i=0;i<n;i++){
cin>>k>>u;
for(int j=0;j<u,j++){
c... | a.cc: In function 'int main()':
a.cc:14:28: error: expected ';' before ')' token
14 | for(int j=0;j<u,j++){
| ^
| ;
|
s444834388 | p02237 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n,k,u,d;
cin>>n;
vector<vector<int> > Adj(n,vector<int>(n,0));
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
Adj[i][j]=0;
}
}
for(int i=0;i<n;i++){
cin>>k>>u;
for(int j=0;j<u,j++){
... | a.cc: In function 'int main()':
a.cc:14:28: error: expected ';' before ')' token
14 | for(int j=0;j<u,j++){
| ^
| ;
|
s769031146 | p02237 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s292409679 | p02237 | C++ | /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
| |
s115222349 | p02237 | C++ | #include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>
using namespace std;
#include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>
#include <cmath>
#include <iomanip>
#include <limits>
#include <bits/stdc++.h>
using namespac... | a.cc:45:2: error: 'cout' does not name a type
45 | }cout << endl;
| ^~~~
|
s494288102 | p02237 | C++ | #include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>
using namespace std;
#include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>
#include <cmath>
#include <iomanip>
#include <limits>
#include <bits/stdc++.h>
using namespac... | a.cc:45:2: error: 'cout' does not name a type
45 | }cout << endl;
| ^~~~
|
s214493742 | p02237 | C++ | #include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>
using namespace std;
#include <iostream>
#include <vector>
#include <cassert>
#include <algorithm>
#include <functional>
#include <cmath>
#include <iomanip>
#include <limits>
#include <bits/stdc++.h>
using namespac... | a.cc:45:2: error: 'cout' does not name a type
45 | }cout << endl;
| ^~~~
|
s099967138 | p02237 | C++ | #include <iostream>
using namespace std;
int a[100][100];
int n;
int main() {
cin >> n;
int p,q,r;
for (int i=0; i<n; ++i) {
int >> p >> q;
for (int i=0; i<q; ++i) {
cin >> r;
a[p][r] = 1;
}
}
for (int i=0; i<n; ++i) {
for (int j=0; j<n-1; ++j) {
cout << a[i+1][j+1] << " ";
}
cout << a[i+1][n... | a.cc: In function 'int main()':
a.cc:10:21: error: expected unqualified-id before '>>' token
10 | int >> p >> q;
| ^~
|
s688921493 | p02237 | C++ | #include <iostream>
#include <stdio>
using namespace std;
int main(){
int g[10010][10010]={};//要素を0で初期化
int n,a,b,c;
cin >> n;
for (int i = 0; i < n; ++i)
{
cin >> a >> b ;
for (int i = 0; i < b; ++i)
{
cin >> c
g[a-1][c-1]=1;/* code */
}
}
for (int i = 0; i < n; ++i... | a.cc:2:10: fatal error: stdio: No such file or directory
2 | #include <stdio>
| ^~~~~~~
compilation terminated.
|
s478730982 | p02237 | C++ | #include <iostream>
#include <stdio>
using namespace std;
int main(){
int g[10010][10010]={};//要素を0で初期化
int n,a,b,c;
cin >> n;
for (int i = 0; i < n; ++i)
{
cin >> a >> b ;
for (int i = 0; i < b; ++i)
{
cin >> c;
g[a-1][c-1]=1;/* code */
}
}
for (int i = 0; i < n; ++... | a.cc:2:10: fatal error: stdio: No such file or directory
2 | #include <stdio>
| ^~~~~~~
compilation terminated.
|
s161983117 | p02237 | C++ | #include <iostream>
#include <stdio>
using namespace std;
int main(){
int g[10010][10010]={};//要素を0で初期化
int n,a,b,c;
cin >> n;
for (int i = 0; i < n; ++i)
{
cin >> a >> b ;
for (int i = 0; i < b; ++i)
{
cin >> c;
g[a-1][c-1]=1;/* code */
}
}
for (int i = 0; i < n; ++... | a.cc:2:10: fatal error: stdio: No such file or directory
2 | #include <stdio>
| ^~~~~~~
compilation terminated.
|
s780117476 | p02237 | C++ | #include <iostream>
#include <stdio>
using namespace std;
int main(){
int g[10010][10010]={{0}};//要素を0で初期化
int n,a,b,c;
cin >> n;
for (int i = 0; i < n; ++i)
{
cin >> a >> b ;
for (int i = 0; i < b; ++i)
{
cin >> c;
g[a-1][c-1]=1;/* code */
}
}
for (int i = 0; i < n;... | a.cc:2:10: fatal error: stdio: No such file or directory
2 | #include <stdio>
| ^~~~~~~
compilation terminated.
|
s233946372 | p02237 | C++ | #include <iostream>
#include <stdio>
using namespace std;
int main(){
int g[10010][10010]={{0}};//要素を0で初期化
int n,a,b,c;
cin >> n;
for (int i = 0; i < n; ++i)
{
cin >> a >> b ;
for (int i = 0; i < b; ++i)
{
cin >> c;
g[a-1][c-1]=1;/* code */
}
}
for (int i = 0; i < n;... | a.cc:2:10: fatal error: stdio: No such file or directory
2 | #include <stdio>
| ^~~~~~~
compilation terminated.
|
s799280569 | p02237 | C++ | #include<iostream>
using namespace std;
static const int N=100;
int main( void ){
int M[N][N];
int n,m,l,k;
cin >> n;
for( int i = 0 ; i < n ; i++ ){
for( int j = 0 ; j < n ; j++ ){
M[i][j];
}
}
for( int i = 0 ; i < n ; i++ ){
cin >> m >> l;
m--;
for( j = 0 ; j < n ; j++ ){
... | a.cc: In function 'int main()':
a.cc:19:10: error: 'j' was not declared in this scope
19 | for( j = 0 ; j < n ; j++ ){
| ^
a.cc:22:16: error: expected primary-expression before '=' token
22 | M[m][k]; = 1;
| ^
|
s825756797 | p02237 | C++ |
import java.util.Scanner;
import java.util.ArrayList;
class Main{
public static void main(String[] args){
Solve s = new Solve();
s.solve();
}
}
class Solve{
Solve(){}
void solve(){
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int [][] ar = new int[n][n];
for(int i = 0; i < n; i++){... | a.cc:2:1: error: 'import' does not name a type
2 | import java.util.Scanner;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
3 | import java.util.ArrayList;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodule... |
s653033091 | p02237 | C++ | N = int(raw_input())
A = [0] * N
for i in range(N):
A[i] = [0] * N
for line in sys.stdin:
values = line.split()
u = int(values[0]) - 1
k = int(values[1])
nodes = values[2:]
for i in range(int(k)):
v = int(nodes[i]) - 1
A[u][v] = 1
for i in range(N):
print " ".join([str(x) for x in A[i]]) | a.cc:1:1: error: 'N' does not name a type
1 | N = int(raw_input())
| ^
|
s958363725 | p02237 | C++ | #include <iostream>
#include <algorithm>
#include <stack>
#include <string>
#include <queue>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <vector>
#include <list>
#include <string.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <map>
#define INFTY (1<<30)
#define MAX 100000000
using namespace... | a.cc: In function 'int main()':
a.cc:35:45: error: expected ';' before '}' token
35 | else cout << m[i][j]
| ^
| ;
36 | }
| ~ ... |
s743028741 | p02237 | C++ | int main(){ //??°???????????£??\??????????????£??\?????????????????????????????°??????
int n,k,v,w;
cin >> n; //??°????????????????????\???
Matrix M(n,Array(n,0)); //??£??\??????????????????
for (int i=0; i<n; i++) { //??????????¬???°?????????????????\??? ???????????\??????????????£?... | a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
5 | cin >> n; //??°????????????????????\???
| ^~~
a.cc:7:5: error: 'Matrix' was not declared in this scope
7 | Matrix M(n,Array(n,0)); //??£??\??????????????????
| ^~~~~~
a.cc:13:13: error: 'M' was ... |
s827317519 | p02237 | C++ | #include <iostream>
using namespace std;
const int N = 100;
int main (){
int M[N][N] = {0};
int n,u,k,v;
cin >> n;
for (int i = 0; i < n ; ++i) {
cin >> u >> k;
u--; //0?????????????????????
for (int j = 0; j < k ; ++j) {
cin >> v;
v -- ; // 0??????????????... | a.cc: In function 'int main()':
a.cc:21:29: error: expected primary-expression before ';' token
21 | for (int j = 0; j < ; ++j) {
| ^
|
s404614275 | p02237 | C++ | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <ctime>
#include <cstring>
using namespace std;
int n;
int main(void){
cin >> n;
int suji[n];
int num[n];
int adj[n][num];
int ans[n][n];
for(int i = 0; i < n; i++){
cin >> suji[i... | a.cc: In function 'int main()':
a.cc:19:20: error: conversion from 'int*' to 'long unsigned int' in a converted constant expression
19 | int adj[n][num];
| ^~~
a.cc:19:20: error: could not convert 'num' from 'int [n]' to 'long unsigned int'
19 | int adj[n][num];
| ... |
s819103524 | p02237 | C++ |
#include<iostream>
using namespace std;
int main()
{
int n,k,x;
int A[100][100]={};
cin>>n;
for(int i=0;i<n;i++)
{
cin>>u>>k;
if(k===0)
continue;
for(int j=0;j<k;j++)
{
cin>>x;
A[u][x-1]=1;
}
}
for(int i=0;i<n;i++)... | a.cc: In function 'int main()':
a.cc:12:14: error: 'u' was not declared in this scope
12 | cin>>u>>k;
| ^
a.cc:13:15: error: expected primary-expression before '=' token
13 | if(k===0)
| ^
|
s513619424 | p02237 | C++ |
#include <iostream>
using namespace std;
int main(){
int n,m,l,i,j;
cin >> n;
int f[100][100] =
for ( i = 0; i < n; i++){
cin >> m;
for ( j = 0; j < m; j++){
cin >> l;
f[m][l] = 1;
}
... | a.cc: In function 'int main()':
a.cc:10:9: error: expected primary-expression before 'for'
10 | for ( i = 0; i < n; i++){
| ^~~
a.cc:10:32: error: expected ';' before ')' token
10 | for ( i = 0; i < n; i++){
| ^
| ... |
s242247849 | p02237 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(){
int n;
cin >> n;
vector< vector<int> > a;
for(int i=0;i<n;i++){
int u;
int k;
cin >> u >> k;
vector<int> tmpa;
for(int j=0;j<k;j++){
int tmp;
cin >> tmp;
tmpa.push_back(tmp);
... | a.cc: In function 'int main()':
a.cc:35:7: error: 'a2' was not declared in this scope; did you mean 'a'?
35 | a2[i][j]=0;
| ^~
| a
a.cc:41:7: error: 'a2' was not declared in this scope; did you mean 'a'?
41 | a2[i][a[i][j]-1] = 1;
| ^~
| a
a.cc:48:15: er... |
s038471719 | p02237 | C++ | #iunclude<iostream>
using namespace std;
static const int N = 100;
int main(){
int M[N][N];
int n,u,k,v;
cin >> n;
for(int i = 0; i < n; i++){
for(int j = 0; j <n j++)M[i][j]=0;
}
for(int i = 0;i <n; i++){
cin >> u >> k;
u--;
for(int j =0; j <k; j++){
cin >> v;
v--;
M[u... | a.cc:1:2: error: invalid preprocessing directive #iunclude; did you mean #include?
1 | #iunclude<iostream>
| ^~~~~~~~
| include
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
9 | cin >> n;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iost... |
s518149712 | p02237 | C++ | #define scanf_s scanf
#include <string>
#include <stdio.h>
#include <math.h>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <iostream>
using namespace std;
#define MAX 100
//#define MAX_ 1000
int time = 0;
int main(void)
{
int G[MAX][MAX] = { false };
int n, u, k, v;
scanf_s("%d", &n);... | a.cc:14:5: error: 'int time' redeclared as different kind of entity
14 | int time = 0;
| ^~~~
In file included from /usr/include/pthread.h:23,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
... |
s630128873 | p02237 | C++ | #include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
vector<vector<int> > a(n, vector<int>(n, 0));
for (int i=0; i<n; i++) {
int u, k, v;
cin >> u;
for (int j=0; j<k; j++) {
cin >> v;
a[u-1][v-1] = 1;
}
}
for (int i=... | a.cc: In function 'int main()':
a.cc:7:5: error: 'vector' was not declared in this scope
7 | vector<vector<int> > a(n, vector<int>(n, 0));
| ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
1 | #include <iostream>
+++ |+... |
s408306362 | p02237 | C++ | #include<iostream>
using namespace std;
int main(){
int N;
int u[101],k[101],a[101],d[101][101];
memset(d,0,sizeof(d));
cin>>N;
for(int i=0;i<N;++i){
cin>>u[i]>>k[i];
for(int j=0;j<k[i];++j){
cin>>a[j];
d[u[i]][a[j]]=1;
}
for(int m=1;m<=N;++m){... | a.cc: In function 'int main()':
a.cc:6:5: error: 'memset' was not declared in this scope
6 | memset(d,0,sizeof(d));
| ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
1 | #include<iostream>
+++ |+#include <cstring>
2 | ... |
s675858419 | p02237 | C++ | #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
int g[100][100];
int main(){
int n;cin>>n;
rep(i,n){
int u,k;cin>>u>>k;u--;
rep(j,k){
int v;cin>>v;v--;
g[u][v]=1;
}
}
rep(i,n){
rep(j,n){
if(j)cout<<" ";
cout<<a[i][j];
}
cout<<endl;
}
} | a.cc: In function 'int main()':
a.cc:18:31: error: 'a' was not declared in this scope
18 | cout<<a[i][j];
| ^
|
s188515286 | p02237 | C++ | #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
int g[100][100];
int main(){
int n;cin>>n;
rep(i,n){
int u,k;cin>>u>>k;u--;
rep(j,k){
int v;cin>>v;v--;
g[u][v]=1;
}
}
rep(i,n){
rep(j,n){
if(j)cout<<" ";
cout<<[i][j];
}
cout<<endl;
}
} | a.cc: In lambda function:
a.cc:18:34: error: expected '{' before '[' token
18 | cout<<[i][j];
| ^
a.cc: In function 'int main()':
a.cc:18:34: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'int')
|
s498818873 | p02237 | C++ | #include <iostream>
using namespace std;
static const int N = 100;
int main() {
int N[N][N];
int n, u, k, v, i, j;
cin >> n;
for ( i = 0; i < n; i++ ) {
for ( j = 0; j < n; j++ ) {
M[i][j] = 0;
}
}
for ( i = 0; i < n; i++ ) {
cin >> u >> k;
u--;
for ( j = 0; j < k; j++ ) {
scanf("%d", &v);
... | a.cc: In function 'int main()':
a.cc:13:25: error: 'M' was not declared in this scope
13 | M[i][j] = 0;
| ^
a.cc:23:25: error: 'M' was not declared in this scope
23 | M[u][v] = 1;
| ^
a.cc:30:33: error: 'M'... |
s943069268 | p02237 | C++ | #include <iostream>
#define REP(i,n) for (int i=0;i<(n);i++)
using namespace std;
int n;
typedef vector<vector<int> > AdjMatrix;
AdjMatrix graph;
int main()
{
int u,k,v;
cin >> n;
graph = AdjMatrix(n, vector<int>(n, 0));
REP(i,n){
cin >> u >> k;
REP(j,k){
cin >> v;
... | a.cc:7:9: error: 'vector' does not name a type
7 | typedef vector<vector<int> > AdjMatrix;
| ^~~~~~
a.cc:8:1: error: 'AdjMatrix' does not name a type
8 | AdjMatrix graph;
| ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:15:5: error: 'graph' was not declared in this scope; did you mean 'isgra... |
s799246591 | p02237 | C++ | #include <iostream>
using namespace std;
static const int N=100;
int main(){
//0 0 ??????????????\??????
int M[N][N];
int n,u,k,v;
cin>>n;
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
N[i][j]=0;
for(int i=0;i<n;i++){
cin>>u>>k;
//??¬??¢???0??????
u--;... | a.cc: In function 'int main()':
a.cc:14:14: error: invalid types 'const int[int]' for array subscript
14 | N[i][j]=0;
| ^
|
s506962745 | p02237 | C++ | int main(){
int n;
cin >> n;
vector<vector<int> > A(n, vector<int>(n, 0));
for(int i=0; i<n; ++i){
int k;
cin >> k;
// 1~n???index?????¨????????????????????????????????????1????????????0~n-1????????????
k -= 1;
int u;
cin >> u;
for(int j=0; j<u; ++... | a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
3 | cin >> n;
| ^~~
a.cc:4:5: error: 'vector' was not declared in this scope
4 | vector<vector<int> > A(n, vector<int>(n, 0));
| ^~~~~~
a.cc:4:19: error: expected primary-expression before 'int'
... |
s344882309 | p02237 | C++ | #include <iostream>
#include <vector>
using namespace std;
int main(){
int n;
cin >> n;
vector<vector<int> > A(n, vector<int>(n, 0));
for(int i=0; i<n; ++i){
int k;
// 1~n???index?????¨????????????????????????????????????1????????????0~n-1????????????
cin >> k-1;
int u;
... | a.cc: In function 'int main()':
a.cc:12:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
12 | cin >> k-1;
| ~~~ ^~ ~~~
| | |
| | int
| std::istream {aka std::basic_istream<cha... |
s594122857 | p02237 | C++ | #include <iostream>
int main(){
int n,k,u,v;
bool G[100][100] = {};
cin>>n;
for(int i=0;i<n;i++){
cin>>u>>k;
for(int j=0;j<k;j++){
cin>>v;
G[u-1][v-1]=1;
}
}
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
cout<<G[i][j];
if(j<n-1)cout<<" ";
}
cout<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; //... |
s034721751 | p02237 | C++ | #include <iostream>
int main(){
int n,k,u,v;
bool G[100][100] = {};
cin>>n;
for(int i=0;i<n;i++){
cin>>u>>k;
for(int j=0;j<k;j++){
cin>>v;
G[u-1][v-1]=1;
}
}
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
cout<<G[i][j];
if(j<n-1)cout<<" ";
}
cout<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>n;
| ^~~
| std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
62 | extern istream cin; //... |
s145784368 | p02237 | C++ |
#include<iostream>
using namespace std;
//??£??\?????????????¬??????????????¨???¶??? array[i][j] i??????j???????????????
//??£??\?????????????????????????????????????????????,?????????????¨???¶
//ALDS1_11-A
int n,u,k,a;
int map[101][101];
int main(){
for(int i=0;i<101;i++){
for(int j=0;j<101;j++){
map[i][j]=0;
... | a.cc: In function 'int main()':
a.cc:29:33: error: expected primary-expression before ')' token
29 | if(j==n&) cout<<endl;
| ^
|
s768417288 | p02237 | C++ | #include<iostream>
using namespace std;
#define ll long long
int main(){
ll n, u, k, v;
cin >> n;
ll A[n][n];
for (ll i=0; i<n; i++){
for(ll j=0; j<n; j++){
A[i][j] = 0;
}
}
for(ll i=0; i<n; i++){
cin >> u;
cin >> k;
for(ll j=0; j<k; j++){
... | a.cc:35:1: error: expected declaration before '}' token
35 | }
| ^
|
s016419189 | p02237 | C++ | /**
* boost graph ????????£??????????????????
*/
// #include {{{
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <forward_list>
#include ... | a.cc:50:10: fatal error: boost/graph/adjacency_list.hpp: No such file or directory
50 | #include <boost/graph/adjacency_list.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
|
s945916173 | p02237 | C++ | #include<iostream>
#include<queue>
using namespace std;
void bfs(int src)
{
queue<int>Q;
Q.
}
int main()
{
int n,u,k,v,**M;
cin>>n;
M=new int*[n];
for(int i=0;i<n;i++)
{
M[i]=new int[n];
for(int j=0;j<n;j++)
M[i][j]=0;
}
int count=0;
while(count<n)
{
count++;
cin>>u... | a.cc: In function 'void bfs(int)':
a.cc:8:1: error: expected unqualified-id before '}' token
8 | }
| ^
|
s283091528 | p02237 | C++ | #include<iostream>
using namespace std;
void main() {
int Adj[100][100];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
Adj[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin >> v;
v--;
Adj[u][v] = 1;
... | a.cc:5:1: error: '::main' must return 'int'
5 | void main() {
| ^~~~
|
s762643548 | p02237 | C++ | #include<iostream>
using namespace std;
void main() {
int Adj[100][100];
int n, u, k, v;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
Adj[i][j] = 0;
}
}
for (int i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (int j = 0; j < k; j++) {
cin >> v;
v--;
Adj[u][v] = 1;
... | a.cc:4:1: error: '::main' must return 'int'
4 | void main() {
| ^~~~
|
s455496832 | p02237 | C++ | #include<iostream>
using namespace std;
int main () {
int n, u, k, v, M[100][100], i, j;
cin >> n;
for (i = 0; i < n; i++) {
for (j = 0; j < n, j++) {
M[i][j] = 0;
}
}
for (i = 0; i < n; i++) {
cin >> u >> k;
u--;
for (j = 0; j < k; j++) {
... | a.cc: In function 'int main()':
a.cc:11:31: error: expected ';' before ')' token
11 | for (j = 0; j < n, j++) {
| ^
| ;
|
s105750136 | p02237 | C++ | #include<iostream>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REP(j, n) for(int j = 0;j < n;j++)
using namespace std;
int main()
{
int i,n,u;
int v[100][100];
cin >> n;
REP(i,n){
cin >> u;
cin >> k;
REP(i,k){
cin >>v[i][k];
}
}
REP(i,n){
REP(j,n){
cout << v[i][j] << " ";
}
cout<<endl;... | a.cc:3:9: warning: "REP" redefined
3 | #define REP(j, n) for(int j = 0;j < n;j++)
| ^~~
a.cc:2:9: note: this is the location of the previous definition
2 | #define REP(i, n) for(int i = 0;i < n;i++)
| ^~~
a.cc: In function 'int main()':
a.cc:13:24: error: 'k' was not declared in this... |
s064102841 | p02237 | C++ | #include<iostream>
using namespace std;
int main()
{
int i,n,u,k;
int v[100][100];
cin >> n;
for(i=0;i<n;i++){
cin >> u;
for(j=0;j<u;j++){
cin >> k;
cin >>v[i][k];
}
}
for(i=0;i<n;i++){
for(j=0;j<n;j++){
cout << v[i][j] << " ";
}
cout<<endl;
}
} | a.cc: In function 'int main()':
a.cc:11:21: error: 'j' was not declared in this scope
11 | for(j=0;j<u;j++){
| ^
a.cc:17:21: error: 'j' was not declared in this scope
17 | for(j=0;j<n;j++){
| ^
|
s788249369 | p02237 | C++ | #include<iostream>
using namespace std;
int main()
{
int i,j,n,u,k;
int v[100][100];
cin >> n;
for(i=0;i<n;i++){
for(j=0;j<n;j++){
cin>>v[i][j]=0;
}
}
for(i=0;i<n;i++){
cin >> u;
for(j=0;j<u;j++){
cin >> k;
v[i][k-1]=1;
}
}
for(i=0;i<n;i++){
for(j=0;j<n;j++){
cout << v[i][j] << " ";
}... | a.cc: In function 'int main()':
a.cc:11:38: error: no match for 'operator=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int')
11 | cin>>v[i][j]=0;
| ^
In file included from /usr/include/c++/14/i... |
s699298918 | p02237 | C++ | #include<iostream>
using namespace std;
int main()
{
int i,j,n,u,k,a;
int v[100][100];
cin >> n;
for(i=0;i<n;i++){
for(j=0;j<n;j++){
v[i][j]=0;
}
}
for(i=0;i<n;i++){
cin >> u;
cin >> k;
for(j=0;j<k;j++){
cin >>a;
v[u-1][a-1]=1;
}
}
for(i=0;i<n;i++){
for(j=0;j<n;j++){
cout << v[i][j];
... | a.cc: In function 'int main()':
a.cc:25:32: error: expected primary-expression before '=' token
25 | if (i!==n-1) cout << " ";
| ^
|
s360343357 | p02237 | C++ | #include <iostream>
using namespace std;
const int N = 100 + 1;
int main() {
int A[N][N] = {{0}};
int n;
cin >> n;
for (int i = 0; i < n; ++i) {
int u;
cin >> u;
int k;
cin >> k;
for (int j = 0; j < k; ++jrand48) {
int x;
cin >> x;
... | a.cc: In function 'int main()':
a.cc:18:34: warning: ISO C++ forbids incrementing a pointer of type 'long int (*)(short unsigned int*) noexcept' [-Wpointer-arith]
18 | for (int j = 0; j < k; ++jrand48) {
| ^~~~~~~
a.cc:18:34: error: lvalue required as increment operand
|
s984084640 | p02237 | C++ | #include<stdio.h>
using namespace std;
static const int N = 100;
int main() {
int n, u, k, v;
int M[N][N];
cin >> n;
for ( i = 0; i < n; i++ ){
for ( j = 0; j < n; j++ )
M[i][j] = 0;
}
for ( i = 0; i < n; i++ ){
cin >> u >> k;
u--;
... | a.cc: In function 'int main()':
a.cc:9:5: error: 'cin' was not declared in this scope
9 | cin >> n;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<stdio.h>
+++ |+#include <iostream>
2 | using namespace... |
s299344574 | p02237 | C++ | #include<stdio.h>
using namespace std;
static const int N = 100;
int main() {
int n, u, k, v;
int M[N][N];
cin >> n;
for ( i = 0; i < n; i++ ){
for ( j = 0; j < n; j++ )
M[i][j] = 0;
}
for ( i = 0; i < n; i++ ){
cin >> u >> k;
u--;
... | a.cc: In function 'int main()':
a.cc:9:5: error: 'cin' was not declared in this scope
9 | cin >> n;
| ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
1 | #include<stdio.h>
+++ |+#include <iostream>
2 | using namespace... |
s564367912 | p02237 | C++ | public class GraphAizu {
//directed graph
List<Integer> adg[];
GraphAizu(int n){
adg = new LinkedList[n+1];
for(int i = 0; i<=n; i++){
adg[i] = new LinkedList<>();
}
}
void addEdge(int index, int vertex){
adg[index].add(vertex);
}
public static vo... | a.cc:1:1: error: expected unqualified-id before 'public'
1 | public class GraphAizu {
| ^~~~~~
|
s576335598 | p02237 | C++ | public class Main{
//directed graph
List<Integer> adg[];
Main(int n){
adg = new LinkedList[n+1];
for(int i = 0; i<=n; i++){
adg[i] = new LinkedList<>();
}
}
void addEdge(int index, int vertex){
adg[index].add(vertex);
}
public static void main(Str... | a.cc:1:1: error: expected unqualified-id before 'public'
1 | public class Main{
| ^~~~~~
|
s153972960 | p02237 | C++ | class Main{
//directed graph
List<Integer> adg[];
Main(int n){
adg = new LinkedList[n+1];
for(int i = 0; i<=n; i++){
adg[i] = new LinkedList<>();
}
}
void addEdge(int index, int vertex){
adg[index].add(vertex);
}
public static void main(String[] a... | a.cc:3:5: error: 'List' does not name a type
3 | List<Integer> adg[];
| ^~~~
a.cc:14:11: error: expected ':' before 'static'
14 | public static void main(String[] args) {
| ^~~~~~~
| :
a.cc:14:29: error: 'String' has not been declared
14 | public static vo... |
s190629141 | p02237 | C++ | class Main{
//directed graph
List<Integer> adg[];
Main(int n){
adg = new LinkedList[n+1];
for(int i = 0; i<=n; i++){
adg[i] = new LinkedList<>();
}
}
void addEdge(int index, int vertex){
adg[index].add(vertex);
}
public static void main(String[] a... | a.cc:3:5: error: 'List' does not name a type
3 | List<Integer> adg[];
| ^~~~
a.cc:14:11: error: expected ':' before 'static'
14 | public static void main(String[] args) {
| ^~~~~~~
| :
a.cc:14:29: error: 'String' has not been declared
14 | public static vo... |
s711385637 | p02237 | C++ | class Main{
//directed graph
LinkedList<Integer> adg[];
Main(int n){
adg = new LinkedList[n+1];
for(int i = 0; i<=n; i++){
adg[i] = new LinkedList<>();
}
}
void addEdge(int index, int vertex){
adg[index].add(vertex);
}
public static void main(Stri... | a.cc:3:5: error: 'LinkedList' does not name a type
3 | LinkedList<Integer> adg[];
| ^~~~~~~~~~
a.cc:14:11: error: expected ':' before 'static'
14 | public static void main(String[] args) {
| ^~~~~~~
| :
a.cc:14:29: error: 'String' has not been declared
14 | ... |
s873578978 | p02237 | C++ | import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;
public class Main{
//directed graph
LinkedList<Integer> adg[];
Main(int n){
adg = new LinkedList[n+1];
for(int i = 0; i<=n; i++){
adg[i] = new LinkedList<>();
}
}
void addEdge(int index... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.LinkedList;
| ^~~~~~
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.util.List;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-... |
s007848231 | p02237 | C++ | import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;
public class Main{
//directed graph
List<Integer> adg[];
GraphAizu(int n){
adg = new LinkedList[n+1];
for(int i = 0; i<=n; i++){
adg[i] = new LinkedList<>();
}
}
void addEdge(int index,... | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.LinkedList;
| ^~~~~~
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.util.List;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-... |
s938477152 | p02237 | C++ | #include <iostream>
#include <vector>
using namespace std;
class branch{
int to;
branch(int to){
this->to = to;
}
};
int main(){
int n; cin >> n;
vector<branch> graph[n+1];
int g[n+1][n+1];
memset(g, 0, sizeof(g));
int v, k, to;
for(int i=0; i<n; i++){
cin >> v;
cin >> k;
for(int j=... | a.cc: In function 'int main()':
a.cc:16:3: error: 'memset' was not declared in this scope
16 | memset(g, 0, sizeof(g));
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <vector>
+++ |+#include <cstring>
3 | us... |
s816327107 | p02237 | C++ | #include <iostream>
#include <string>
#include <vector>
using namespace std;
class branch{
int to;
branch(int to){
this->to = to;
}
};
int main(){
int n; cin >> n;
vector<branch> graph[n+1];
int g[n+1][n+1];
memset(g, 0, sizeof(g));
int v, k, to;
for(int i=0; i<n; i++){
cin >> v;
cin >>... | a.cc: In function 'int main()':
a.cc:17:3: error: 'memset' was not declared in this scope
17 | memset(g, 0, sizeof(g));
| ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
3 | #include <vector>
+++ |+#include <cstring>
4 | us... |
s596529904 | p02237 | C++ | #include<iostream>
using namespace std;
static const int N = 100;
int main() {
int M[N][N]
int n;
cin >> n;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
M[i][j] = 0;
}
}
int u, k, v;
for (int i = 0; i < n; i++) {
cin >> u >> k;
for (int j = 0; j < k; j++) {
... | a.cc: In function 'int main()':
a.cc:10:3: error: expected initializer before 'int'
10 | int n;
| ^~~
a.cc:11:10: error: 'n' was not declared in this scope
11 | cin >> n;
| ^
a.cc:15:7: error: 'M' was not declared in this scope
15 | M[i][j] = 0;
| ^
a.cc:25:7: error... |
s116535179 | p02237 | C++ | #include <iostream>
#include <string>
#include <map>
#include <set>
#include <algorithm>
using namespace std;
#define MAX 100000
int main(){
int n;
cin >>n;
int A[n+2][n+2]={0};
int t,k,l,
for(int i=1;i<=n;i++){
cin >> t >> k;
for(int j=1;j<=k;j++){
cin >> l;
A[i][l]=1;
}
}
for(in... | a.cc: In function 'int main()':
a.cc:14:3: error: expected unqualified-id before 'for'
14 | for(int i=1;i<=n;i++){
| ^~~
a.cc:14:15: error: 'i' was not declared in this scope
14 | for(int i=1;i<=n;i++){
| ^
|
s512111096 | p02237 | C++ | #include<iostream>
using namespace std;
const static int N = 100;
int main() {
int n, G[N][N];
cin >> n;
for ( int i = 0; i < n; i++ ) {
for ( int j = 0; j < n; j++ ) G[i][j] = 0;
}
for ( int i = 0; i < n; i++ ) {
cin >> v >> m;
for ( int j = 0; j < m; j++ ) {
cin >> k;
G[v][k] ... | a.cc: In function 'int main()':
a.cc:16:12: error: 'v' was not declared in this scope
16 | cin >> v >> m;
| ^
a.cc:16:17: error: 'm' was not declared in this scope
16 | cin >> v >> m;
| ^
a.cc:18:14: error: 'k' was not declared in this scope
18 | cin >> k;
... |
s758651337 | p02237 | C++ | #include<iostream>
using namespace std;
const static int N = 100;
int main() {
int n, G[N][N];
int v, m, k;
cin >> n;
for ( int i = 0; i < n; i++ ) {
for ( int j = 0; j < n; j++ ) G[i][j] = 0;
}
for ( int i = 0; i < n; i++ ) {
cin >> v >> m;
for ( int j = 0; j < m; j++ ) {
cin >> k;... | a.cc: In function 'int main()':
a.cc:20:18: error: expected ';' before '}' token
20 | G[v][k] = 1
| ^
| ;
21 | }
| ~
|
s531165280 | p02237 | C++ | #include <iostream>
#include <queue>
#include <stack>
#include <cstdio>
#include <vector>
#include <sstream>
using namespace std;
const int N_MAX = 1000000;
int main(){
int N;
cin >> N;
// table
int** table = new int*[N];
for(int i=0; i<N; i++){
table[i] = new int[N];
memset(&table[i][0], 0, N*siz... | a.cc: In function 'int main()':
a.cc:20:5: error: 'memset' was not declared in this scope
20 | memset(&table[i][0], 0, N*sizeof(table[i][0]));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <sstream>
+++ |+#... |
s637234918 | p02237 | C++ | #include <iostream>
#include <queue>
#include <stack>
#include <cstdio>
#include <vector>
#include <sstream>
#include <stdio.h>
using namespace std;
const int N_MAX = 1000000;
int main(){
int N;
cin >> N;
// table
int** table = new int*[N];
for(int i=0; i<N; i++){
table[i] = new int[N];
memset(&ta... | a.cc: In function 'int main()':
a.cc:21:5: error: 'memset' was not declared in this scope
21 | memset(&table[i][0], 0, N*sizeof(table[i][0]));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <sstream>
+++ |+#... |
s922365133 | p02237 | C++ | #include <iostream>
#include <queue>
#include <stack>
#include <cstdio>
#include <vector>
#include <sstream>
#include <stdio.h>
using namespace std;
const int N_MAX = 1000000;
int main(){
int N;
cin >> N;
// table
int** table = new int*[N];
for(int i=0; i<N; i++){
table[i] = new int[N];
memset(&ta... | a.cc: In function 'int main()':
a.cc:21:5: error: 'memset' was not declared in this scope
21 | memset(&table[i][0], 0, N*sizeof(table[i][0]));
| ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
6 | #include <sstream>
+++ |+#... |
s636986727 | p02237 | C++ | #include <iostream>
#include <queue>
#include <stack>
#include <cstdio>
#include <vector>
#include <sstream>
#include <stdio.h>
#include<cstdio>
//#include<string>
//#include<cmath>
//#include<map>
//#include<cstdlib>
//#include<deque>
//#include<queue>
//#include<climits>
//#include<cstring>
using namespace std;
con... | a.cc: In function 'int main()':
a.cc:30:5: error: 'memset' was not declared in this scope
30 | memset(&table[i][0], 0, N*sizeof(table[i][0]));
| ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
8 | #include<cstdio>
+++ |+#in... |
s832065732 | p02237 | C++ | n=gets.to_i;
a=Array.new(n){Array.new(n,0)}
m=Array.new
n.times do |i|
m.clear
m=gets.split.map{|i|i.to_i}
m[1].times do |j|
a[m[0]-1][m[j+2]-1]=1
end
end
n.times do |i|
print a[i],"\n"
end
| a.cc:1:1: error: 'n' does not name a type
1 | n=gets.to_i;
| ^
a.cc:2:1: error: 'a' does not name a type
2 | a=Array.new(n){Array.new(n,0)}
| ^
a.cc:3:1: error: 'm' does not name a type
3 | m=Array.new
| ^
a.cc:7:3: error: 'm' does not name a type
7 | m[1].times do |j|
| ^
|
s176991205 | p02237 | C++ | int main(){
int n;
cin>>n;
int u[n],k;
int a[n][n];
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
a[i][j]=0;
}
}
for(int i=0;i<n;i++){
cin>>u[i];
cin>>k;
for(int j=0;j<k;j++){
int v;
cin>>v;
a[i][v-1]=1;
}
}
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){... | a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
3 | cin>>n;
| ^~~
a.cc:23:7: error: 'cout' was not declared in this scope
23 | cout<<a[i][j];
| ^~~~
a.cc:25:5: error: 'cout' was not declared in this scope
25 | cout<<"\n";
| ^~~~
|
s856250712 | p02237 | C++ | #include <stdio.h>
int main() {
int n, m, tmp;
scanf("%d", &n);
int M[100][100];
for (int i=0; i<n; i++) {
for(int j=0; j<n; j++) {
M[i][j] = 0;
}
}
for (int i=0; i<n; i++) {
scanf("%d", &m);
for (int j=0; j<,; j++) {
scanf(... | a.cc: In function 'int main()':
a.cc:17:25: error: expected primary-expression before ',' token
17 | for (int j=0; j<,; j++) {
| ^
a.cc:17:26: error: expected primary-expression before ';' token
17 | for (int j=0; j<,; j++) {
| ^
|
s803758449 | p02237 | C++ | #include <iostream>
using namespace std;
int n;
int M[101][101];
int main() {
cin >> n;
for (int i = 0; i < n; ++i) {
int v, k;
cin >> v >> k;
for (int j = 0; j < k; ++j) {
int s;
cin >> s;
M[v][s] = 1;
}
}
for (int l = 1; l <= n; ++... | a.cc: In function 'int main()':
a.cc:21:30: error: expected ';' before 'cout'
21 | if(i) cout << " "
| ^
| ;
22 | cout << M[l][i];
| ~~~~
|
s499996090 | p02237 | C++ | include<iostream>
#include<cstdio>
#define N 101
using namespace std;
int main(){
int n,n2,data,u;
int g[N][N];
//load n
cin >>n;
//initialize
for(int i=0;i<N;i++){
for(int j=0;j<N;j++){
g[i][j]=0;
}
}
for(int i=0;i<n;i++){
scanf("%d%d",&u,&n2);
for(int j=0;j<n2;j++){
sca... | a.cc:1:1: error: 'include' does not name a type
1 | include<iostream>
| ^~~~~~~
a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope
11 | cin >>n;
| ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <io... |
s935441153 | p02237 | C++ | #include <iostream>
#include <algorithm>
using namespace std;
int main(void){
int graph[100][100];
fill( graph , graph + 100 , 0 );
int n;
cin >> n;
for( int i = 0 ; i < n ; i++ ){
int u, k;
cin >> u >> k;
u--;
while( k-- ){
int v;
cin >> v;
v--;
graph[u][v] = 1;
... | 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/ios:44,
from /usr/include/c++/14/ostream:40,
from /usr/includ... |
s277145741 | p02238 | Java | public class Main {
class Vertex {
int id;
int[] vertices;
int visited = -1;
int completed = -1;
}
public static void main(String[] args) throws IOException {
new Main().run();
}
private void run() throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
... | Main.java:10: error: cannot find symbol
public static void main(String[] args) throws IOException {
^
symbol: class IOException
location: class Main
Main.java:14: error: cannot find symbol
private void run() throws IOException {
^
symbo... |
s433935271 | p02238 | Java | n = int(input())
graph = [[] for _ in range(n)]
for i in range(n):
in_list = list(map(int, input().split()))
u = in_list[0]
graph[u - 1] = in_list[2:]
d = [0 for _ in range(n)]
f = [0 for _ in range(n)]
time = 0
def dfs(now, prev, graph, d, f):
if d[now] != 0:
return d, f
global time
t... | Main.java:1: error: class, interface, enum, or record expected
n = int(input())
^
1 error
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.