submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s042134916
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M; cin >> N >> M ; for (int j=0 ; j < 2*M ; j++){ int s[j] ; cin >> s[j] ; } for (int i=0 ; i<N ; i++){ int count = 0; if ( s[i]==i+1){ count++; } } cout << count << endl; } }
a.cc: In function 'int main()': a.cc:13:10: error: 's' was not declared in this scope 13 | if ( s[i]==i+1){ | ^ a.cc:17:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 17 | cout << count << ...
s737913725
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { //都市の数N,道の数Mを宣言 都市一時保存用A int N, M, A=0; cin >> N >> M; vector<int> road ( N,0 ); for( int i = 0; i < 2*M ; i++){ cin >> A; ++road.at(A); } for( int i = 0; i < N ; i++){ cout << road(i) << endl; } }
a.cc: In function 'int main()': a.cc:18:21: error: no match for call to '(std::vector<int>) (int&)' 18 | cout << road(i) << endl; | ~~~~^~~
s187137882
p03720
C++
s
a.cc:1:1: error: 's' does not name a type 1 | s | ^
s561251468
p03720
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(int)n;i++) int main(){ int n,m; cin>>n>>m; vector<int> a(m); vector<int> b(m); vector<int> c(n,0); rep(i,m){ cin>>a.at(i)>>b.at(i); cout<<endl; } rep(i,n){ c.at(a.at(i)-1)++; c.at...
a.cc: In function 'int main()': a.cc:19:13: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}) 19 | cout>>c.at(i); | ~~~~^~~~~~~~~ | | | ...
s446392511
p03720
C++
#include<bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(int)n;i++) int main(){ int n,m; cin>>n>>m; vector<int> a(m); vector<int> b(m); vector<int> c(n,0); rep(i,m){ cin>>a.at(i)>>cin>>b.at(i); cout<<endl; } rep(i,n){ c.at(a.at(i)-1)++; ...
a.cc: In function 'int main()': a.cc:11:21: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'std::istream' {aka 'std::basic_istream<char>'}) 11 | cin>>a.at(i)>>cin>>b.at(i); | ~~~~~~~~~~~~^~~~~ | ...
s690647702
p03720
C++
#include <iostream> using namespace std; int main(void){ // Your code here! int N, M; cin >> h >> w; int ans[51] = {}; for(int i = 0;i < M; i ++){ int a, b; cin >> a >> b; ans[a]++; ans[b]++; } for(int i = 1; i <= N; i ++){ cout << a...
a.cc: In function 'int main()': a.cc:7:12: error: 'h' was not declared in this scope 7 | cin >> h >> w; | ^ a.cc:7:17: error: 'w' was not declared in this scope 7 | cin >> h >> w; | ^ a.cc:19:6: error: expected '}' at end of input 19 | } | ^ a.cc:...
s858263036
p03720
C++
int main(void) { int N, M; cin >> N >> M; const int NMMAX = 50; int A[NMMAX], B[NMMAX]; for (int i = 0; i < M; ++i) { cin >> A[i] >> B[i]; } int road[NMMAX]; for (int i = 0; i < N; ++i) { road[i] = 0; } for (int i = 0; i < M; ++i) { road[A[i] - 1] += 1; road[B[i] - 1] += 1; } for (int i = 0; i < N...
a.cc: In function 'int main()': a.cc:3:2: error: 'cin' was not declared in this scope 3 | cin >> N >> M; | ^~~ a.cc:23:2: error: 'cout' was not declared in this scope 23 | cout << road[i] << endl; | ^~~~ a.cc:23:21: error: 'endl' was not declared in this scope 23 | cout << road[i] << endl; ...
s027450990
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, M; cin >> N >> M; int A, B; for (int i = 0; i < M; i++) { cin >> A[i] >> B[i]; } int road[]; for (int i = 0; i < N; ++i) { road[i] = 0; } for (int i = 0; i < M; ++i) { road[A[i] - 1] += 1; road[B[i] - 1] += 1;...
a.cc: In function 'int main()': a.cc:13:13: error: invalid types 'int[int]' for array subscript 13 | cin >> A[i] >> B[i]; | ^ a.cc:13:21: error: invalid types 'int[int]' for array subscript 13 | cin >> A[i] >> B[i]; | ^ a.cc:16:7: error: storage size of 'road' i...
s248560465
p03720
C
# include<stdio.h> int main(){ int n,m; scanf ( "%d %d",&n,&m ); int r[m][2]; for ( int i = 0;i < m;i++ ) scanf ( "%d %d",&r[i][0],&r[i][1] ); for ( int i = 0;i < m;i++ ){ c[r[i][0]]++; c[r[i][1]]++; } for ( int i = 1;i < n+1;i++ ) printf ( "%d\n",c[i] ); }
main.c: In function 'main': main.c:11:9: error: 'c' undeclared (first use in this function) 11 | c[r[i][0]]++; | ^ main.c:11:9: note: each undeclared identifier is reported only once for each function it appears in
s152502055
p03720
C++
#include<iostream> #include<vector> using namespace std; int main() { int N,M; //N個の都市、M本の道路 cin>>N>>M; vector<int> a(M),b(M),total(N); for(int ni =0;ni<M;ni++) { cin>>a.at(ni)>>b.at(ni); total(a.at(ni)-1)++; total(b.at(ni)-1)++; } return 0; }
a.cc: In function 'int main()': a.cc:13:10: error: no match for call to '(std::vector<int>) (__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)' 13 | total(a.at(ni)-1)++; | ~~~~~^~~~~~~~~~~~ a.cc:14:10: error: no match for call to '(std::vector<int>) (__gnu_cxx::__alloc_traits<std::alloca...
s387354540
p03720
C++
#include<iostream> using namespace std; int main() { int N,M; //N個の都市、M本の道路 cin>>N>>M; vector<int> a(M),b(M),total(N); for(int ni =0;ni<M;ni++) { cin>>a.at(ni)>>b.at(ni); total(a.at(ni)-1)++; total(b.at(ni)-1)++; } return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: 'vector' was not declared in this scope 8 | vector<int> a(M),b(M),total(N); | ^~~~~~ a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 1 | #include<iostream> +++ |+#include <vector> ...
s310063043
p03720
C
#include <bits/stdc++.h> using namespace std; int main() { int N, M; int a, b; cin >> N >> M; vector<int> city(N); for (int i = 0; i < M; i++) { cin >> a >> b; city.at(a - 1)++; city.at(b - 1)++; } for (int i = 0; i < N; i++) { cout << ci...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s460627067
p03720
C
#include <bits/stdc++.h> using namespace std; int main() { int N, M; int a, b; cin >> N >> M; vector<int> city(N); for (int i = 0; i < M; i++) { cin >> a >> b; city.at(a - 1)++; city.at(b - 1)++; } for (int i = 0; i < N; i++) { cout << ci...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include <bits/stdc++.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s510154382
p03720
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m,tmp1,tmp2; cin >> n >> m; vector<int> town(n); for(int i=0;i<M;i++){ cin >> tmp1 >> tmp2; town.at(tmp1-1)++; town.at(tmp2-1)++; }
a.cc: In function 'int main()': a.cc:8:17: error: 'M' was not declared in this scope 8 | for(int i=0;i<M;i++){ | ^ a.cc:12:4: error: expected '}' at end of input 12 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s282529000
p03720
C++
#include <iostream> #include <algorithm> #include <math.h> using namespace std; int main(){ int N,M; cin>>N>>M; vector<int>c(N)={0}; int a,b; for(int i=0;i<N;i++){ cin>>a>>b; c[a]++; c[b]++; } for(int i=0;i<N;i++){ cout<<c[i]<<endl; } }
a.cc: In function 'int main()': a.cc:9:3: error: 'vector' was not declared in this scope 9 | vector<int>c(N)={0}; | ^~~~~~ a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 3 | #include <math.h> +++ |+#include <vector> 4 | using...
s995694572
p03720
C++
#include <bits/stdc++.h> using namespace std; int main(void) { int N, M; cin >> N >> M; const int NMMAX = 50; int A[NMMAX], B[NMMAX]; for (int i=0;i<M;++i){ cin >> A[i] >> B[i]; } int road[NMMAX]; for (inti=0;i<N;++i){ road[i] = 0; } for (int i=0;i<M;++i){ road[A[i] - 1] += 1; road[B[i] - 1] += 1; } for (int i...
a.cc: In function 'int main()': a.cc:12:6: error: 'inti' was not declared in this scope; did you mean 'int'? 12 | for (inti=0;i<N;++i){ | ^~~~ | int a.cc:12:13: error: 'i' was not declared in this scope 12 | for (inti=0;i<N;++i){ | ^
s176895717
p03720
C++
#include <bits/stdc++.h> using namespace std; int main(void) { int N, M; cin >> N >> M; const int NMMAX = 50; int A[NMMAX], B[NMMAX]; for (inti=0;i<M;++i){ cin >> A[i] >> B[i]; } int road[NMMAX]; for (inti=0;i<N;++i){ road[i] = 0; } for (inti=0;i<M;++i){ road[A[i] - 1] += 1; road[B[i] - 1] += 1; } for (inti=0;...
a.cc: In function 'int main()': a.cc:9:6: error: 'inti' was not declared in this scope; did you mean 'int'? 9 | for (inti=0;i<M;++i){ cin >> A[i] >> B[i]; | ^~~~ | int a.cc:9:13: error: 'i' was not declared in this scope 9 | for (inti=0;i<M;++i){ cin >> A[i] >> B[i]; | ^ ...
s460614811
p03720
Java
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int M = sc.nextInt(); int Count[] = new int[N]; int i = 0; for(i = 0;i < M;i++){ Count[sc.nextInt()]; } for(i = 0;i < N; i++)...
Main.java:11: error: not a statement Count[sc.nextInt()]; ^ 1 error
s139728199
p03720
C++
2 5 1 2 2 1 1 2 2 1 1 2
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 5 | ^
s380062450
p03720
C++
#include <bits/stdc++.h> #define rep(i, n) for(int i = 0; i < (int)(n); i++) using namespace std; int main() { int n, m, a; vector<int> num(53); cin >> n >> m; rep(i, m * 2){ cin >> a; num.at(a)++; } rep(i, n){ cout >> num.at(i + 1) >> endl; } }
a.cc: In function 'int main()': a.cc:17:10: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}) 17 | cout >> num.at(i + 1) >> endl; | ~~~~ ^~ ~~~~~~~~~~~~~ | | ...
s208922368
p03720
C++
ソースコード Copy Copy #include<bits/stdc++.h> using namespace std; int main (void){ int a,b,N,M; int road[55] = {}; cin >> N >> M; for(int i = 0; i < M; i++){ cin >> a >> b; a--; b--; road[a]++; road[b]++; } for(int i = 0; i < N; i++){ cout << road[i] << '\n'; } return 0; }
a.cc:1:1: error: '\U000030bd\U000030fc\U000030b9\U000030b3\U000030fc\U000030c9' does not name a type 1 | ソースコード | ^~~~~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/14/bi...
s492181370
p03720
C++
#include<bits/stdc++.h> using namespace std; int main (void){ int a,b,N,M; int road[55] = {}; cin >> N >> M; for(int i = 0; i < M; i++){ cin a >> b; a--; b--; road[a]++; road[b]++; } for(int i = 0; i < N; i++){ cout << road[i] << '\n'; } return 0; }
a.cc: In function 'int main()': a.cc:9:8: error: expected ';' before 'a' 9 | cin a >> b; | ^~ | ;
s249614393
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int n, m;// n 個の都市 m 本の道路 cin >> n >> m; int a, b; vector<int> c (n); for (int i = 0; i < m; i++) { cin >> a >> b ; c.at(a - 1)++; c.at(b - 1)++; } for (int j = 0; j < n; j++) { cout << c.at(j) << endl; } }#incl...
a.cc:17:2: error: stray '#' in program 17 | }#include <bits/stdc++.h> | ^ a.cc:33:2: error: stray '#' in program 33 | }#include <bits/stdc++.h> | ^ a.cc:49:2: error: stray '#' in program 49 | }#include <bits/stdc++.h> | ^ a.cc:65:2: error: stray '#' in program 65 | }#include <bits/stdc+...
s946390818
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int n, m;// n 個の都市 m 本の道路 cin >> n >> m; int a, b; vector<int> c (n); for (int i = 0; i < m; i++) { cin >> a >> b ; c.at(a - 1)++; c.at(b - 1)++; } for (int j = 0; j < n; j++) { cout << c.at(j) << endl; } }#incl...
a.cc:17:2: error: stray '#' in program 17 | }#include <bits/stdc++.h> | ^ a.cc:33:2: error: stray '#' in program 33 | }#include <bits/stdc++.h> | ^ a.cc:49:2: error: stray '#' in program 49 | }#include <bits/stdc++.h> | ^ a.cc:65:2: error: stray '#' in program 65 | }#include <bits/stdc+...
s710833124
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int n, m;// n 個の都市 m 本の道路 cin >> n >> m; int a, b; vector<int> c (n); for (int i = 0; i < m; i++) { cin >> a >> b ; vec.at(a - 1)++; vec.at(b - 1)++; } for (int j = 0; i < n; i++) { cout << vec.at(i) << endl; } ...
a.cc: In function 'int main()': a.cc:11:9: error: 'vec' was not declared in this scope 11 | vec.at(a - 1)++; | ^~~ a.cc:14:21: error: 'i' was not declared in this scope 14 | for (int j = 0; i < n; i++) { | ^ a.cc:15:17: error: 'vec' was not declared in this scop...
s178506682
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M; cin >> N >> M; int Answer; vector<int> road(2*M); for (int i=0; i<2*M; i++){ cin >> road.at(i); } for (int i=0; i<N; i++){ Answer = 0 for (int j=0; j<2*M; j++){ if(road.at(j) == i+1) Answer ++; } cou...
a.cc: In function 'int main()': a.cc:17:15: error: expected ';' before 'for' 17 | Answer = 0 | ^ | ; 18 | for (int j=0; j<2*M; j++){ | ~~~ a.cc:18:19: error: 'j' was not declared in this scope 18 | for (int j=0; j<2*M; j++){ | ...
s819057921
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M; cin >> N >> M; vecter<int> a(M); vecter<int> b(M); vector<int> c(N); for(int i=0;i<M;i++){ cin >> a.at(i) >> b.at(i); c.at(a.at(i)-1)++; c.at(b.at(i)-1)++; } for(int j=0;j<N;j++){ cout << c.at(j) << endl; } }
a.cc: In function 'int main()': a.cc:7:3: error: 'vecter' was not declared in this scope 7 | vecter<int> a(M); | ^~~~~~ a.cc:7:10: error: expected primary-expression before 'int' 7 | vecter<int> a(M); | ^~~ a.cc:8:10: error: expected primary-expression before 'int' 8 | vecter<in...
s419981696
p03720
C++
n, m = map(int, input().split()) t=[0]*n for i in range(m): a, b = map(int, input().split()) t[a-1]+=1 t[b-1]+=1 for x in t: print(x)
a.cc:1:1: error: 'n' does not name a type 1 | n, m = map(int, input().split()) | ^
s706883134
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, M; cin >> N >> M; vector<int> ans(N,0); for (int i =0;i<N;i++){ int P, Q; cin >> P >> Q; for(int j =0;j<100;j++){ if(j == P){ ans.at(j-1) +=1; } for(int j =0;j<100;j++){ if(j == Q){ ...
a.cc: In function 'int main()': a.cc:27:2: error: expected '}' at end of input 27 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s002146452
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, M; cin >> N >> M; vector<int> vec(0); int a, b; for (int i = 0; i < M; i++) { cin >> a >> b; vec.push_back(a); vec.push_back(b); } for (int k = 0; k < N; k++) { for (int j = 0; j < 2 * M; j++) { int counter = 0;...
a.cc: In function 'int main()': a.cc:22:13: error: 'counter' was not declared in this scope 22 | cout << counter << endl; | ^~~~~~~
s115455434
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, M; cin >> N >>M ; vector<int> road(M*2); for(int i; i<M*2; i++){ cin >> road.at(i) ; } vector<int> num(N); for(int k=1; k<=N; k++){ for(int i=0; i<M*2; i++){ if(road.at(i) == k){ num.at(k-1)++; } } for(in...
a.cc: In function 'int main()': a.cc:26:2: error: expected '}' at end of input 26 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s911892606
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M; cin >> N >> M; vector<int>result(N); for(int i=0;i<2*M;i++){ int a; cin >> a; result.at(a)++; } for(int i=0,i<N;i++){ cout << result.at(i) << endl; } }
a.cc: In function 'int main()': a.cc:13:16: error: expected ';' before '<' token 13 | for(int i=0,i<N;i++){ | ^ | ; a.cc:13:16: error: expected primary-expression before '<' token
s246385192
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,a,b,c; cin >> N >> a; vector<int> d(N); for(int i = 0; i < a; i++) { cin >> b >> c; d.at(b-1)++; d.at(c-1)++; } for(int i = 0; i < a; i++) { cout << d.at(i); << endl; } }
a.cc: In function 'int main()': a.cc:14:22: error: expected primary-expression before '<<' token 14 | cout << d.at(i); << endl; | ^~
s936810788
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,a,b,c; cin >> N >> a; vec<int> d(N); for(int i = 0; i < a; i++) { cin >> b >> c; d.at(b-1)++; d.at(c-1)++; } for(int i = 0; i < a; i++) { cout << d.at(i); << endl; } }
a.cc: In function 'int main()': a.cc:7:3: error: 'vec' was not declared in this scope 7 | vec<int> d(N); | ^~~ a.cc:7:7: error: expected primary-expression before 'int' 7 | vec<int> d(N); | ^~~ a.cc:10:5: error: 'd' was not declared in this scope 10 | d.at(b-1)++; | ^ a....
s129775039
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M,x; cin>>N>>M; vector<int> c(N); for(int i=0;i<M;i++){ cin>>x; c.at(x-1)++; cin>>x; c.at(x-1)++; } for(int i=0;i<N;i++){ cout>>c.at(i)>>endl; } }
a.cc: In function 'int main()': a.cc:15:9: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}) 15 | cout>>c.at(i)>>endl; | ~~~~^~~~~~~~~ | | | | ...
s359995026
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M,x; cin>>N>>M; vector<int> c(N); for(int i=0;i<M;i++){ cin>>x; c(x-1)++; cin>>x; c(x-1)++; } for(int i=0;i<N;i++){ cout>>c(i)>>endl; } }
a.cc: In function 'int main()': a.cc:10:4: error: no match for call to '(std::vector<int>) (int)' 10 | c(x-1)++; | ~^~~~~ a.cc:12:4: error: no match for call to '(std::vector<int>) (int)' 12 | c(x-1)++; | ~^~~~~ a.cc:15:12: error: no match for call to '(std::vector<int>) (int&)' 15 | co...
s916944142
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M,x; cin>>N>>M; vector<int> c(N); for(int i=0;i<M;i++){ cin>>x; c(x-1)++; cin>>x; c(x-1)++ } for(int i=0;i<N;i++){ cout>>c(i)>>endl; } }
a.cc: In function 'int main()': a.cc:10:4: error: no match for call to '(std::vector<int>) (int)' 10 | c(x-1)++; | ~^~~~~ a.cc:12:4: error: no match for call to '(std::vector<int>) (int)' 12 | c(x-1)++ | ~^~~~~ a.cc:15:12: error: no match for call to '(std::vector<int>) (int&)' 15 | cou...
s889421912
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int City, Road; cin >> City >> Road; vector<int> ans(City,0); for(int r = 0; r < Road * 2; r++){ int city; cin >> city; ans.at(city-1) += 1; } for(int c = 0; c < city.size(); c++){ cout << city.at(c) << endl; } }
a.cc: In function 'int main()': a.cc:14:22: error: 'city' was not declared in this scope; did you mean 'City'? 14 | for(int c = 0; c < city.size(); c++){ | ^~~~ | City
s722954801
p03720
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N, M; cin >> N >> M; vector<int> a(M); vector<int> b(M); for (int i = 0; i < M; i++){ cin >> a.at(i) >> b.at(i); } vector<int> road(N); for (int i = 0; i < N; i++){ for (int j = 0; j < M; j++){ if (a.at(j) == i + 1 || b.at(j) ==...
a.cc: In function 'int main()': a.cc:15:53: error: no match for call to '(std::vector<int>) (int&)' 15 | if (a.at(j) == i + 1 || b.at(j) == i + 1) road(i) += 1; | ~~~~^~~
s040042958
p03720
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N, M; cin >> N >> M; vector<int> a(M); vector<int> b(M); for (int i = 0; i < M; i++){ cin >> a.at(i) >> b.at(i); } vector<int> road(N); for (int i = 0; i < N; i++){ for (int j = 0; j < M; j++){ if (a.at(j) == i + 1 || b.at(j) ==...
a.cc: In function 'int main()': a.cc:15:57: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int') 15 | if (a.at(j) == i + 1 || b.at(j) == i + 1) road =+ 1; | ^ In file included from /usr/include/c++/14/vector:72, ...
s089465557
p03720
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N, M; cin >> N >> M; vector<int> a(M); vector<int> b(M); for (int i = 0; i < M; i++){ cin >> a.at(i) >> b.at(i); } vector<int> road(N); for (int i = 0; i < N; i++){ for (int j = 0; j < M; j++){ if (a.at(j) == i + 1 || b.at(j) ==...
a.cc: In function 'int main()': a.cc:15:54: error: no match for 'operator+=' (operand types are 'std::vector<int>' and 'int') 15 | if (a.at(j) == i + 1 || b.at(j) == i + 1) road += 1; | ~~~~~^~~~
s510176700
p03720
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N, M; cin >> N >> M; vector<int> a (50); vector<int> b (50); vector<int> c (50); for (int i = 0; i < M; i++){ cin >> a.at(i); cin >> b.at(i); } for (int i = 0; i < N; i++){ if (a.at(i) == i + 1 || b.at(i) == i) c.at(i) +=...
a.cc: In function 'int main()': a.cc:18:55: error: expected ';' before '}' token 18 | if (a.at(i) == i + 1 || b.at(i) == i) c.at(i) += 1 | ^ | ; 19 | } | ~ ...
s840899665
p03720
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,M; cin >> N >> M; vector<int> date(M); for(int i=0;i<M;i++){ int a , b; vector<int> road(2); cin >> a >> b; road.at(0) = a; road.at(1) = b; date.at(i) = road; } for(int i=0;i<N;i++...
a.cc: In function 'int main()': a.cc:16:22: error: cannot convert 'std::vector<int>' to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} in assignment 16 | date.at(i) = road; | ^~~~ | | | std::vector...
s162089296
p03720
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N; //都市の数 int M; //道路の数 cin >> N >> M; int Route; // 都市iから出ている道路の数 vector <int> RoadA(M); // 道路i 都市Aiの番号 vector <int> RoadB(M); // 道路i 都市Biの番号 for (int i=0; i<M; i++){ cin >> RoadA.at(i) >> RoadB.at(i); } fo...
a.cc: In function 'int main()': a.cc:22:9: error: 'Toshi' was not declared in this scope 22 | Toshi.at(i) +=1; | ^~~~~ a.cc:25:9: error: 'Toshi' was not declared in this scope 25 | Toshi.at(i) +=1; | ^~~~~
s960748631
p03720
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N; //都市の数 int M; //道路の数 cin >> N >> M; int Route; // 都市iから出ている道路の数 vector <int> RoadA(M); // 道路i 都市Aiの番号 vector <int> RoadB(M); // 道路i 都市Biの番号 for (int i=0; i<M; i++){ cin >> RoadA.at(i) >> RoadB.at(i); } fo...
a.cc: In function 'int main()': a.cc:21:17: error: 'at' was not declared in this scope 21 | if (RoadA,at(i) == i){ | ^~ a.cc:22:9: error: 'Toshi' was not declared in this scope 22 | Toshi.at(i) +=1; | ^~~~~ a.cc:25:9: error: 'Toshi' was not declared in this scope ...
s745692786
p03720
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N; //都市の数 int M; //道路の数 cin >> N >> M; int Route; // 都市iから出ている道路の数 vector <int> RoadA(M); // 道路i 都市Aiの番号 vector <int> RoadB(M); // 道路i 都市Biの番号 for (int i=0; i<M; i++){ cin >> RoadA.at(i) >> RoadB.at(i); } fo...
a.cc: In function 'int main()': a.cc:20:10: error: 'j' was not declared in this scope 20 | for (j=0; j<M; j++){ | ^ a.cc:21:17: error: 'at' was not declared in this scope 21 | if (RoadA,at(i) == i){ | ^~ a.cc:22:9: error: 'Toshi' was not declared in this scope 22 ...
s333197897
p03720
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N; //都市の数 int M; //道路の数 cin >> N >> M; vector <int> Route; // 都市iから出ている道路の数 vector <int> RoadA(M); // 道路i 都市Aiの番号 vector <int> RoadB(M); // 道路i 都市Biの番号 for (int i=0; i<M; i++){ cin >> RoadA.at(i) >> RoadB.at(i); } fo...
a.cc: In function 'int main()': a.cc:19:11: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int') 19 | Route=0; | ^ In file included from /usr/include/c++/14/vector:72, from /usr/include/c++/14/functional:64, from /usr/include/x86_64-li...
s315691174
p03720
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N; //都市の数 int M; //道路の数 cin >> N >> M; vector <int> Route; // 都市iから出ている道路の数 vector <int> RoadA(M); // 道路i 都市Aiの番号 vector <int> RoadB(M); // 道路i 都市Biの番号 for (int i=0; i<M; i++){ cin >> RoadA.at(i) >> RoadB.at(i); } fo...
a.cc: In function 'int main()': a.cc:18:17: error: 'j' was not declared in this scope 18 | for (int i=0; j<N; i++){ | ^ a.cc:19:11: error: no match for 'operator=' (operand types are 'std::vector<int>' and 'int') 19 | Route=0; | ^ In file included from /usr/include/c++/...
s700748295
p03720
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N; //都市の数 int M; //道路の数 cin >> N >> M; vector <int> Route; // 都市iから出ている道路の数 vector <int> RoadA(M); // 道路i 都市Aiの番号 vector <int> RoadB(M); // 道路i 都市Biの番号 for (int i=0; i<M; i++){ cin >> RoadA.at(i) >> RoadB,at(i); } fo...
a.cc: In function 'int main()': a.cc:15:24: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'std::vector<int>') 15 | cin >> RoadA.at(i) >> RoadB,at(i); | ~~~~~~~~~~~~~~~~~~ ^~ ~~~~~ | | | ...
s012928533
p03720
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N; //都市の数 int M; //道路の数 cin >> N >> M; vector <int> Route; // 都市iから出ている道路の数 vector <int> RoadA(M); // 道路i 都市Aiの番号 vector <int> RoadB(m); // 道路i 都市Biの番号 for (int i=0; i<M; i++){ cin >> RoadA.at(i) >> RoadB,at(i); } fo...
a.cc: In function 'int main()': a.cc:12:22: error: 'm' was not declared in this scope 12 | vector <int> RoadB(m); // 道路i 都市Biの番号 | ^ a.cc:15:24: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'std::ve...
s782950002
p03720
C++
#include<bits/stdc++.h> using namespace std; int main() { int N,M,x; cin>>N>>M; vector<int> a(N+1) for(int i=0;i<2*M;i++) { cin>>x; a.at(x)++; } for(int j=1;j<=N;j++) { cout<<a.at(j)<<endl; } }
a.cc: In function 'int main()': a.cc:8:3: error: expected ',' or ';' before 'for' 8 | for(int i=0;i<2*M;i++) | ^~~ a.cc:8:15: error: 'i' was not declared in this scope 8 | for(int i=0;i<2*M;i++) | ^
s070752964
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { cin >> int N, M; for(int t = 0; t < N; t++){ int a = 0; for(int i = 0; i < 2*M; i++) { cin >> int r; if(t+1 == r){ int a++; } } cout << int a << endl; } }
a.cc: In function 'int main()': a.cc:5:10: error: expected primary-expression before 'int' 5 | cin >> int N, M; | ^~~ a.cc:6:22: error: 'N' was not declared in this scope 6 | for(int t = 0; t < N; t++){ | ^ a.cc:8:26: error: 'M' was not declared in this scope 8 ...
s595117136
p03720
C++
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef pair<int,int> pi; #define F first #define S second #define PB push_back #define MP make_pair #define FOR(i,a,b) for (int i = a; i < b; i++) #define SQ(a) (a)*(a) template <class T, cl...
a.cc: In function 'int main()': a.cc:31:13: error: expected ']' before '-' token 31 | vi[a-1]++; | ^ | ] a.cc:31:11: error: structured binding declaration cannot have type 'vi' {aka 'std::vector<int>'} 31 | vi[a-1]++; | ^ a.cc:31:11: note: type m...
s071078698
p03720
C
#include <stdio.h> main(){ int N, M; scanf("%d %d",&N,&M); int A[50], B[50]; for(int i = 0; i < M; i++){ scanf("%d",&A[i]); scanf("%d",&B[i]); } int road[N]; for(int i = 0; i < M; i++){ road[A[i] - 1]++; road[B[i] - 1]++; } for(int i = 0; i < N; i++){ pritnf("%d\n",road[i]); } }
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function 'main': main.c:17:3: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration] 17 | pritnf("%d\n",road[i]); | ^~~~~~ | printf
s140158142
p03720
C
#include <stdio.h> main(){ int N, M; scanf("%d %d",&N,&M); int A[50], B[50]; for(int i = 0; i < M; i++){ scanf("%d",&A[i]); scanf("%d",&B[i]); } int road[N]; for(int i = 0; i < M; i++){ roaa[A[i] - 1]++; road[B[i] - 1]++; } for(int i = 0; i < N; i++){ pritnf("%d\n",road[i]); } }
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function 'main': main.c:13:5: error: 'roaa' undeclared (first use in this function); did you mean 'road'? 13 | roaa[A[i] - 1]++; | ^~~~ | road main.c:13:5: note: each undeclared identifie...
s634029467
p03720
C
#include <stdio.h> main(){ int N, M; scanf("%d %d",&N,&M); int A[50], B[50]; for(int i = 0; i < M; i++){ scanf("%d",&A[i]); scanf("%d",&B[i]); } int road[N]; for(int i = 0; i < M; i++){ roaa[A[i] - 1]++; road[B[i] - 1]++; } for(int i = 0; i < N; i++){ pritnf("%d",road[i]); } }
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function 'main': main.c:13:5: error: 'roaa' undeclared (first use in this function); did you mean 'road'? 13 | roaa[A[i] - 1]++; | ^~~~ | road main.c:13:5: note: each undeclared identifie...
s306773383
p03720
Java
List<String> firstRow = Arrays.asList(br.readLine().split(" "));
Main.java:1: error: unnamed classes are a preview feature and are disabled by default. List<String> firstRow = Arrays.asList(br.readLine().split(" ")); ^ (use --enable-preview to enable unnamed classes) 1 error
s440586242
p03720
C++
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; int main() { int N , M; cin >> N >> M; vector <int> a(N) , b(N); for(int i = 0; i < N; i++){ cin >> a.at(i) >> b.at(i); } vector <int> t(N); for (int i = 0; i < N...
a.cc: In function 'int main()': a.cc:19:11: error: expected ',' before '[' token 19 | [b[i] - 1] += 1; | ^ | , a.cc:19:11: error: expected identifier before '[' token a.cc: In lambda function: a.cc:19:20: error: expected '{' before '+=' token 19 | [b[i] - 1] += 1; ...
s799212245
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, M; vector<int> a(M), b(M); cin >> N >> M; for (imt j=0;j<N;j++) { int x=0; for (int i=0;i<M;i++) { cin >> a.at(i) >> b.at(i); if(a.at(i)==j+1||b.at(i)==j+1) { x++; } cout << x << endl; ...
a.cc: In function 'int main()': a.cc:9:8: error: 'imt' was not declared in this scope; did you mean 'int'? 9 | for (imt j=0;j<N;j++) { | ^~~ | int a.cc:9:16: error: 'j' was not declared in this scope 9 | for (imt j=0;j<N;j++) { | ^
s195145624
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, M; vector<int> a(M), b(M); cin >> N >> M; for (imt j=0;j<N;j++) { for (int i=0;i<M;i++) { cin >> a.at(i) >> b.at(i); if(a.at(i)==j+1||b.at(i)==j+1) { int x=0; x++; } cout << x << en...
a.cc: In function 'int main()': a.cc:9:8: error: 'imt' was not declared in this scope; did you mean 'int'? 9 | for (imt j=0;j<N;j++) { | ^~~ | int a.cc:9:16: error: 'j' was not declared in this scope 9 | for (imt j=0;j<N;j++) { | ^ a.cc:19:15: error: 'x' was no...
s267158954
p03720
C
#include <stdio.h> int main() { int i, N, M, a[51], b[51]; scanf("%d %d", &N, &M&); for (i = 1; i <= M; i++) scanf("%d %d", &(a[i]), &(b[i])); int deg[51] = {}; for (i = 1; i <= M; i++) { deg[a[i]]++; deg[b[i]]++; } for (i = 1; i <= N; i++) printf("%d\n", deg[i]); fflush(stdout); return 0; }
main.c: In function 'main': main.c:6:31: error: expected expression before ')' token 6 | scanf("%d %d", &N, &M&); | ^
s759466507
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { cin >> N >> M; vector<int> city(3,0); for ( int i=0; i < M; i++){ cin >> a >> b; city[a-1]+=1; city[b-1]+=1; i++; } for ( int i=0; i<N; i++){ cout << city[i] << endl; } }
a.cc: In function 'int main()': a.cc:5:10: error: 'N' was not declared in this scope 5 | cin >> N >> M; | ^ a.cc:5:15: error: 'M' was not declared in this scope 5 | cin >> N >> M; | ^ a.cc:8:12: error: 'a' was not declared in this scope 8 | cin >> a >> b; | ...
s859882474
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; vector<int> vec(n) for (int i=0; i<m; i++){ int a,b; cin >> a >> b; vec.at(a-1)++; vec.at(b-1)++; } for (int i=0; i<n; i++){ cout << vec.at(i) << endl; } }
a.cc: In function 'int main()': a.cc:10:3: error: expected ',' or ';' before 'for' 10 | for (int i=0; i<m; i++){ | ^~~ a.cc:10:17: error: 'i' was not declared in this scope 10 | for (int i=0; i<m; i++){ | ^
s982023452
p03720
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,M; cin >> N >> M; vector<int> vec1(M); vecotr<int> vec2(M); for (int i=0;i<M;i++){ cin >> vec1.at(i) >> vec2.at(i); } for(int i=1;i<=N;i++){ int x=0; for(int j=0;j<M;j++){ if(i==vec1.at(j)||i==vec2.at(j)){ x++; ...
a.cc: In function 'int main()': a.cc:7:3: error: 'vecotr' was not declared in this scope 7 | vecotr<int> vec2(M); | ^~~~~~ a.cc:7:10: error: expected primary-expression before 'int' 7 | vecotr<int> vec2(M); | ^~~ a.cc:9:26: error: 'vec2' was not declared in this scope; did you mean 'v...
s113387934
p03720
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N,M; cin >> N >> M; vector<int> vec1(M); vecotr<int> vec2(M); for (int i=0;i<M;i++){ cin >> vec1.at(i) >> vec2.at(i); } for(int i=1;i<=N;i++){ int x=0; for(int j=0;j<M;j++){ if(i==vec1.at(j)||i==vec2.at(j)){ x++; ...
a.cc: In function 'int main()': a.cc:7:3: error: 'vecotr' was not declared in this scope 7 | vecotr<int> vec2(M); | ^~~~~~ a.cc:7:10: error: expected primary-expression before 'int' 7 | vecotr<int> vec2(M); | ^~~ a.cc:9:26: error: 'vec2' was not declared in this scope; did you mean 'v...
s326316728
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M; cin >> N >> M; vector<int> c(M * 2); for(int i = 0; i < M * 2; i++){ cin >> c.at(i); } for(int j = 0; j < M; j++){ int n = 0; for(int i = 0; i < M * 2; i++){ if(c.at(i) == j + 1) n++; else continue; } if(n !=...
a.cc: In function 'int main()': a.cc:19:18: error: expected ';' before '}' token 19 | else continue | ^ | ; 20 | } | ~
s284756009
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M; cin >> N >> M; vector<int> c(M * 2); for(int i = 0; i < M * 2; i++){ cin >> c; } for(int j = 0; j < M; j++){ int n = 0; for(int i = 0; i < M * 2; i++){ if(c.at(i) == j + 1) n++; else continue; } cout << n << e...
a.cc: In function 'int main()': a.cc:9:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<int>') 9 | cin >> c; | ~~~ ^~ ~ | | | | | std::vector<int> | std::istream {aka std::basic_istream<char>...
s453393244
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M; cin >> N >> M; vector(int) c(M * 2); for(int i = 0; i < M * 2; i++){ cin >> c; } for(int j = 0; j < M; j++){ int n = 0; for(int i = 0; i < M * 2; i++){ if(c.at(i) == j + 1) n++; else continue; } cout << n << e...
a.cc: In function 'int main()': a.cc:7:9: error: missing template arguments before '(' token 7 | vector(int) c(M * 2); | ^ a.cc:7:10: error: expected primary-expression before 'int' 7 | vector(int) c(M * 2); | ^~~ a.cc:9:12: error: 'c' was not declared in this scope 9 | ...
s844636226
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M; cin >> N >> M; vector(int) c(M * 2); for(int i = 0; i < M * 2; i++){ cin >> c; } for(int j = 0; j < M; j++){ int n = 0; for(int i = 0; i < M * 2; i++){ if(c.at(i) == j + 1) n++; else continue; } cout << n << e...
a.cc:8:22: error: extended character   is not valid in an identifier 8 | for(int i = 0; i < M * 2; i++){ | ^ a.cc: In function 'int main()': a.cc:7:9: error: missing template arguments before '(' token 7 | vector(int) c(M * 2); | ^ a.cc:7:10: error: expected primary-...
s280067525
p03720
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s490941536
p03720
C++
#include<bits/stdc++.h> using namespace std; int main(){ int N,M; int tmp1,tmp2; cin >>N>>M; vector <int> hasi(N); for(int i=0;i<M;i++){ cin >> tmp1>>tmp2; hasi.at(tmp1-1)++; hasi.at(tmp2-1)++; } for(int i=0;i<N;i++) cout << hasi.at
a.cc: In function 'int main()': a.cc:17:10: error: no match for 'operator<<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and '<unresolved overloaded function type>') 17 | cout << hasi.at | ~~~~ ^~ ~~~~~~~ | | | | | <unresolved overloaded ...
s652994371
p03720
C++
//どの道が幾つの街を繋げれるか #include <bits/stdc++.h> using namespace std; int main() { int N ,M; //,a ,b; cin >> N >> M; vector<int> a(M); vector<int> b(M); vector<int> c(N); //= 0; // vector<int> c(M) = 0; (M)だとだいいから外れる // vector<string> だと3+3=33になる for (int i=0;i<M;i++){ cin >> a.at(i) >> b.at(i); ...
a.cc: In function 'int main()': a.cc:24:26: error: expected ';' before '}' token 24 | c.at(j) = c.at(j) + 1 | ^ | ; 25 | } | ~ a.cc:27:26: error: expected ';' before '}' token 27 | c.at(j) = c.at(j) + 1 ...
s346412089
p03720
C++
//どの道が幾つの街を繋げれるか #include <bits/stdc++.h> using namespace std; int main() { int N ,M ,a ,b; cin >> N >> M; vector<int> a(M); vector<int> b(M); vector<int> c(N) = 0; // vector<int> c(M) = 0; (M)だとだいいから外れる // vector<string> だと3+3=33になる for (int i=0;i<M;i++){ cin >> a.at(i) >> b.at(i); } cou...
a.cc: In function 'int main()': a.cc:10:15: error: conflicting declaration 'std::vector<int> a' 10 | vector<int> a(M); | ^ a.cc:8:13: note: previous declaration as 'int a' 8 | int N ,M ,a ,b; | ^ a.cc:11:15: error: conflicting declaration 'std::vector<int> b' 11 | v...
s815342771
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, M; cin >> N >> M; vector<string> town(M*2); for (int i=0; i<M*2; i++){ cin >> town.at(i); } vector<int> count(N); for(int i=0; i<N; i++) { for(int j=0; j<M*2; j++) { if (town.at(j) = i+1) { count.at(i) += ...
a.cc: In function 'int main()': a.cc:18:22: error: could not convert '(& town.std::vector<std::__cxx11::basic_string<char> >::at(((std::vector<std::__cxx11::basic_string<char> >::size_type)j)))->std::__cxx11::basic_string<char>::operator=(((int)((char)(i + 1))))' from 'std::__cxx11::basic_string<char>' to 'bool' 18 ...
s616014036
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, M; cin >> N >> M; vector<string> town(M*2); for (int i=0; i<M*2; i++){ cin >> town.at(i); } vector<int> count(N); for(int i=0; i<N; i++) { for(int j=0; j<M*2; j++) { if (road.at(j) = i+1) { count.at(i) += ...
a.cc: In function 'int main()': a.cc:18:11: error: 'road' was not declared in this scope; did you mean 'read'? 18 | if (road.at(j) = i+1) { | ^~~~ | read
s276245151
p03720
C++
#include <bits/stdc++.h. using namespace std; int main() { int N, M; cin >> N >> M; vector<int> city(N, 0); for (int i = 0; i < M; i++) { int a, b; cin >> a >> b; city.at(a - 1)++; city.at(b - 1)++; } for (int i = 0; i < M; i++) { cout << city.at(i) << endl; } }
a.cc:1:25: error: missing terminating > character 1 | #include <bits/stdc++.h. | ^ a.cc:1:10: fatal error: bits/stdc++.h.: No such file or directory 1 | #include <bits/stdc++.h. | ^ compilation terminated.
s487612392
p03720
C++
#include<bits/stdc.h> using namespace std; int main(){ int city,street; cin >> city>>street; vector<int> num(2*street); for(int i=0;i<2*street;i++){ cin >> num[i]; } for(int i=0;i<city;i++){ int ans=0; for(int j=0;j<2*street;j++){ if(num[j]==i){ans++;} } cout << ans <<e...
a.cc:1:9: fatal error: bits/stdc.h: No such file or directory 1 | #include<bits/stdc.h> | ^~~~~~~~~~~~~ compilation terminated.
s687978286
p03720
C++
#include<bits/studio.h> using namespace std; int main(){ int city,street; cin >> city>>street; vector<int> num(2*street); for(int i=0;i<2*street;i++){ cin >> num[i]; } for(int i=0;i<city;i++){ int ans=0; for(int j=0;j<2*street;j++){ if(num[j]==i){ans++;} } cout << ans <...
a.cc:1:9: fatal error: bits/studio.h: No such file or directory 1 | #include<bits/studio.h> | ^~~~~~~~~~~~~~~ compilation terminated.
s243071651
p03720
C
#include<stdio.h> int main(){ int N,M; scanf("%d %d",&N,&M); int a[M] int b[M]; int i; int count[50]={0}; for(i=0;i<M;i++){ scanf("%d %d",&a[i],&b[i]); count[a[i]]++; } for(i=0;i<M;i++){ count[b[i]]++; } for(i=1;i<=N;i++){ printf("%d\n",count[i]); } return 0; }
main.c: In function 'main': main.c:5:11: error: expected ';' before 'int' 5 | int a[M] | ^ | ; 6 | int b[M]; | ~~~ main.c:10:20: error: 'a' undeclared (first use in this function) 10 | scanf("%d %d",&a[i],&b[i]); | ^ main.c:10:20:...
s388033744
p03720
C
#include<stdio.h> int main(){ int N,M; scanf("%d %d",&N,&M); int a[M] int b[M]; int i; int count[50]={0}; for(i=0;i<M;i++){ scanf("%d %d",&a[i],&b[i]); count[a[i]]++; } for(i=0;i<M;i++){ count[b[i]]++; } for(i=1;i<=N;i++){ printf("%d\n",count[i]); } return 0; }
main.c: In function 'main': main.c:5:11: error: expected ';' before 'int' 5 | int a[M] | ^ | ; 6 | int b[M]; | ~~~ main.c:10:20: error: 'a' undeclared (first use in this function) 10 | scanf("%d %d",&a[i],&b[i]); | ^ main.c:10:20:...
s306120879
p03720
C++
#include<iostream> #include <bits/stdc++.h> using namespace std; int main(){ int N,M; cin >> N >> M; vector<int> vec(2*M): vector<int> ans(N,0); for(int i=0;i<2*M;i++){ cin >>vec.at(i); } for(int i=1;i<N+1;i++){ for(int k=0;...
a.cc: In function 'int main()': a.cc:7:29: error: expected ',' or ';' before ':' token 7 | vector<int> vec(2*M): | ^ a.cc:14:33: error: 'ans' was not declared in this scope; did you mean 'abs'? 14 | if(vec[k]==i) ++ans[i]; | ...
s632004241
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,m,h; cin>>n>>m; int a[n]; for(int i=0;i<n;i++) { a[i]=0; } for(int i=0;i<m;i++) int t; int r; cin>>t>>r; a[t-1]++; a[r-1]++; } for(h=0;h<n;h++) { cout<<a[h]<<endl; } }
a.cc: In function 'int main()': a.cc:20:10: error: 't' was not declared in this scope 20 | cin>>t>>r; | ^ a.cc: At global scope: a.cc:26:3: error: expected unqualified-id before 'for' 26 | for(h=0;h<n;h++) | ^~~ a.cc:26:11: error: 'h' does not name a type 26 | for(h=0;h<n;h++) ...
s709212670
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; int a[n]; for(int i=0;i<n;i++) a[i]=0; for(int i=0;i<m;i++) int t=0; int r=0; cin>>t>>r; a[t-1]++; a[r-1]++; } for(int h=0;h<n;h++) { cout<<a[h]<<endl; } }
a.cc: In function 'int main()': a.cc:18:10: error: 't' was not declared in this scope 18 | cin>>t>>r; | ^ a.cc: At global scope: a.cc:24:3: error: expected unqualified-id before 'for' 24 | for(int h=0;h<n;h++) | ^~~ a.cc:24:15: error: 'h' does not name a type 24 | for(int h=0;h<n...
s190426859
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; int a[n]; for(int i=0;i<n;i++) { a[i]=0; } for(int i=0;i<m;i++) int ai; int bi; cin>>ai>>bi; a[ai-1]++; a[bi-1]++; } for(int i=0;i<n;i++) { cout<<a[i]<<endl; } }
a.cc: In function 'int main()': a.cc:20:10: error: 'ai' was not declared in this scope; did you mean 'bi'? 20 | cin>>ai>>bi; | ^~ | bi a.cc: At global scope: a.cc:26:3: error: expected unqualified-id before 'for' 26 | for(int i=0;i<n;i++) | ^~~ a.cc:26:15: error: 'i' do...
s488951923
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; int a[n]; for(int i=0;i<n;i++) a[i]=0; for(int i=0;i<m;i++) int ai=0; int bi=0; cin>>ai>>bi; a[ai-1]++; a[bi-1]++; } for(int i=0;i<n;i++) { cout<<a[i]<<endl; } }
a.cc: In function 'int main()': a.cc:18:10: error: 'ai' was not declared in this scope; did you mean 'bi'? 18 | cin>>ai>>bi; | ^~ | bi a.cc: At global scope: a.cc:24:3: error: expected unqualified-id before 'for' 24 | for(int i=0;i<n;i++) | ^~~ a.cc:24:15: error: 'i' do...
s691593611
p03720
C++
4 3 1 2 2 3 1 4
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 4 3 | ^
s724022194
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M; cin >> N >> M; vector<int> out; //入力部 for (int j=0;j<M;j++) { int x,y; cin >> x >> y; out.at(x)++; out.at(y)++; } //出力部 for (int i=0;i<N;i++) { cout << out.at(i) << endl; }
a.cc: In function 'int main()': a.cc:18:2: error: expected '}' at end of input 18 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s126304789
p03720
C
#include<stdio.h> int main(void){ int n,m; scanf("%d %d",&n,&m); int a[50],b[50]; for(int i=0;i<m;++i){ scanf("%d %d",&a[i],&b[i]); } int road[50]; for (int i = 0; i < N; ++i){ road[i] = 0; } for(int i=0;i<m;++i){ road[a[i]-1]+=1; road[b[i]-1]+=1; } for(int i=0;i<n;++i){ printf...
main.c: In function 'main': main.c:10:23: error: 'N' undeclared (first use in this function) 10 | for (int i = 0; i < N; ++i){ | ^ main.c:10:23: note: each undeclared identifier is reported only once for each function it appears in
s996829944
p03720
C++
import sys import copy import math import bisect import pprint import bisect from functools import reduce from copy import deepcopy from collections import deque from decimal import * import math from functools import reduce def gcd(*numbers): return reduce(math.gcd, numbers) def gcd_list(numbers): return re...
a.cc:21:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 21 | if __name__ == '__main__': | ^~~~~~~~~~ a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s476836212
p03720
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s713764550
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M; cin >> N,M; vector<string> a(N+1); int i; for(i=0;i<M;i++){ int s; cin >> s; a.at(s)++; } for(i=1;i<N+1;i++){ cout<<a.at(i)<<endl; } }
a.cc: In function 'int main()': a.cc:12:12: error: no 'operator++(int)' declared for postfix '++' [-fpermissive] 12 | a.at(s)++; | ~~~~~~~^~
s842200978
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M; cin >> N >> M; vector<int> a(2*M); int x=0; for(int i=0;i<2*M;i++) { cin >> a.at(i); } for(int i=0;i<N;i++) { for(int l=0;l<2*M;l++) { if(a.at(l)==i+1) { x++; } } cout << x << endl; x=0: } ...
a.cc: In function 'int main()': a.cc:21:8: error: expected ';' before ':' token 21 | x=0: | ^ | ;
s147977372
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, M; cin >> N >> M; vector(int) buf(N); for (int i = 1; i < M + 1; i++) { int a, b; cin >> a >> b; if (a == i) { buf.at(i) += 1; } if (b == i) { buf.at(i) += 1; } } }
a.cc: In function 'int main()': a.cc:7:9: error: missing template arguments before '(' token 7 | vector(int) buf(N); | ^ a.cc:7:10: error: expected primary-expression before 'int' 7 | vector(int) buf(N); | ^~~ a.cc:12:7: error: 'buf' was not declared in this scope 12 | ...
s139733136
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N, M; cin >> N >> M; for (int i = 0; i < N; i++) { int ans = 0; for (int j = 0; j < M; j++) { vector<int> vec(2); cin >> vec; if (vec.at(0) == i) { ans++; } if (vec.at(1) == i) { ans++; } ...
a.cc: In function 'int main()': a.cc:12:11: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'std::vector<int>') 12 | cin >> vec; | ~~~ ^~ ~~~ | | | | | std::vector<int> | std::istream {aka std::bas...
s938492650
p03720
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N, M; cin >> N >> M; vector<int> cities(N), roads(2M); for(int i = 0;i<2M;i++){ cin >> roads(i); } for(int j = 0;j<2M;j++){ int c; c = roads(j); c = c-1; cities.at(c)++; } for(int k = 0;k<N;k++){ cout << cities(k) << endl; } }
a.cc: In function 'int main()': a.cc:7:38: error: unable to find numeric literal operator 'operator""M' 7 | vector<int> cities(N), roads(2M); | ^~ a.cc:9:25: error: unable to find numeric literal operator 'operator""M' 9 | for(int i = 0;i<2M;i++){ ...
s475194597
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M,i; vector<int> vecA(M) cin>>N>>M; for(i=0;i<M;i++){ vector<int> vec(2); cin>>vec.at(0)>>vec.at(1); if(vec.at(0)==i+1)vecA.at(i)++; if(vec.at(1)==i+1)vecA.at(i)++; } for(i=0;i<N;i++)cout<<vecA.at(i)<<endl; }
a.cc: In function 'int main()': a.cc:7:3: error: expected ',' or ';' before 'cin' 7 | cin>>N>>M; | ^~~
s310741642
p03720
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,m,ans[100]={}; cin>>n>>m; for(int i=0;i<n;i++){ for(int j=0;j<2;j++){ cin>>t; ans[t]++; } } for(int i=1;i<=n;i++){ cout<<ans[i]<<endl; } }
a.cc: In function 'int main()': a.cc:9:12: error: 't' was not declared in this scope 9 | cin>>t; | ^
s112330170
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int n,m; cin >> n>>m; vector<int>count(m); for(int i = 0;i <m;i++){ cin >> a >> b; count[a-1]++; count[b-1]++; } for(int i = 0;i < n;i++){ cout << count[i] <<endl; } }
a.cc: In function 'int main()': a.cc:9:10: error: 'a' was not declared in this scope 9 | cin >> a >> b; | ^ a.cc:9:15: error: 'b' was not declared in this scope 9 | cin >> a >> b; | ^
s653741168
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M; vector<int> Load; cin>>N>>M>>Load; }
a.cc: In function 'int main()': a.cc:7:14: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'std::vector<int>') 7 | cin>>N>>M>>Load; | ~~~~~~~~~^~~~~~ | | | | | std::vector<int> ...
s148459804
p03720
C++
#include <bits/stdc++.h> using namespace std; int main() { int N,M; cin >> N >> M; vector <int>a(M),b(M); for(int i=0;i<M;i++) { cin >> a.at(M); } for(int i=0;i<M;i++) { cin >> b.at(M); } int sum=0; for(int i=0;i<N;i++) { for(int j=0;j<N;j++) { if(a.at(i)==b.at(j)>0) { ...
a.cc: In function 'int main()': a.cc:19:25: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 19 | cout << sum +=1 << endl; | ~~^~~~~~~