submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s463766517 | p03719 | C++ | #include <iostream>
using namespace std;
int main(void){
int a,b,c;
cin>>a>>b>>C;
cout<<( a<=c && c<=b)? "Yes":"No";
}
| a.cc: In function 'int main()':
a.cc:5:16: error: 'C' was not declared in this scope
5 | cin>>a>>b>>C;
| ^
|
s951073117 | p03719 | C | #include <stdio.h>
int main(void) {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if (a <= c&&c <= b) puts("Yes");
else puts("No");
return 0;
} | main.c: In function 'main':
main.c:5:1: error: stray '\302' in program
5 | <U+00A0>
| ^~~~~~~~
main.c:7:1: error: stray '\302' in program
7 | <U+00A0>
| ^~~~~~~~
main.c:10:1: error: stray '\302' in program
10 | <U+00A0>
| ^~~~~~~~
|
s233149002 | p03719 | C | int main(void) {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if (a <= c&&c <= b) puts("Yes");
else puts("No");
return 0;
} | main.c: In function 'main':
main.c:3:1: error: stray '\302' in program
3 | <U+00A0>
| ^~~~~~~~
main.c:4:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | scanf("%d %d %d", &a, &b, &c);
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(void) {
main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
4 | scanf("%d %d %d", &a, &b, &c);
| ^~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:1: error: stray '\302' in program
5 | <U+00A0>
| ^~~~~~~~
main.c:6:29: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
6 | if (a <= c&&c <= b) puts("Yes");
| ^~~~
main.c:6:29: note: include '<stdio.h>' or provide a declaration of 'puts'
main.c:8:1: error: stray '\302' in program
8 | <U+00A0>
| ^~~~~~~~
|
s877051933 | p03719 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(ll i=a;i<b;i++)
#define iter(it,a) for(auto it=a.begin();it!=a.end();it++)
#define mp make_pair
#define pb push_back
#define F first
#define S second
#define endl '\n'
#define preturn(X) cout<<X<<endl; return 0
typedef long long ll;
vector<pair<pair<ll,ll>,ll> > edges;
ll val[2001];
bool vis[2001];
vector<int> adj[1001];
bool reach[2001];
bool dfs(int x){
vis[x] = 1;
iter(it,adj[x]){
if(!vis[(*it)]){
if(dfs((*it))==1){
return 1;
}
}
}
return 0;
}
int main(){
cin.tie(0);ios_base::sync_with_stdio(0);
ll n,m;
cin>>n>>m;
rep(i,1,n+1){
val[i] = 1e16;
}
ll u,v,c;
rep(i,0,m){
cin>>u>>v>>c;
adj[u].pb(v);
edges.pb(mp(mp(u,v),ll(-1)*c));
}
rep(i,1,n+1){
if(i==n){
reach[i] = 1;
return;
}
memset(vis,0,sizeof(vis));
reach[i] = dfs(i);
}
val[1]=0;
rep(i,0,n){
if(i==n-1){
rep(j,0,edges.size()){
if(val[edges[j].F.F]==1e16){
continue;
}
if(val[edges[j].F.S] > val[edges[j].F.F]+edges[j].S && reach[edges[j].F.S]){
preturn("inf");
}
}
}
else{
rep(j,0,edges.size()){
if(val[edges[j].F.F]==1e16){
continue;
}
val[edges[j].F.S] = min(val[edges[j].F.S],val[edges[j].F.F]+edges[j].S);
}
}
}
preturn(ll(-1)*val[n]);
} | a.cc: In function 'int main()':
a.cc:48:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
48 | return;
| ^~~~~~
|
s255963408 | p03719 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
cin >> a >> b >> c;
if(c >= a && c <= b) cout << "Yes";
else cout << "No";
} | a.cc: In function 'int main()':
a.cc:5:10: error: 'a' was not declared in this scope
5 | cin >> a >> b >> c;
| ^
a.cc:5:15: error: 'b' was not declared in this scope
5 | cin >> a >> b >> c;
| ^
a.cc:5:20: error: 'c' was not declared in this scope
5 | cin >> a >> b >> c;
| ^
|
s740266319 | p03719 | C++ | #include<iostream>
using namespace std;
int main()
{
long long int ,b,c;
cin>>a>>b>>c;
if(c>=a && c<=b)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:16: error: expected unqualified-id before ',' token
5 | long long int ,b,c;
| ^
a.cc:6:8: error: 'a' was not declared in this scope
6 | cin>>a>>b>>c;
| ^
|
s007048646 | p03719 | C++ | #include<iostream>
using namespace std;
int main()
{
long long int ,b,c;
cin>>a>>b>>c;
if(c>=a && c<=b)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:16: error: expected unqualified-id before ',' token
5 | long long int ,b,c;
| ^
a.cc:6:8: error: 'a' was not declared in this scope
6 | cin>>a>>b>>c;
| ^
|
s712804912 | p03719 | C | ll pow3(ll n) {
ll i;
ll ret = 1ll;
for (i = 1ll; i <= n; i++) {
ret *= 3ll;
}
return ret;
} | main.c:1:1: error: unknown type name 'll'
1 | ll pow3(ll n) {
| ^~
main.c:1:9: error: unknown type name 'll'
1 | ll pow3(ll n) {
| ^~
|
s910996372 | p03719 | C++ | using System;
using System.Collections.Generic;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string[] str = Console.ReadLine().Split(' ');
int A = int.Parse(str[0]);
int B = int.Parse(str[1]);
int C = int.Parse(str[2]);
if (C >= A && C <= B)
{
Console.WriteLine("Yes");
}
else
{
Console.WriteLine("No");
}
Console.ReadKey();
}
}
}
| a.cc:1:7: error: expected nested-name-specifier before 'System'
1 | using System;
| ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
2 | using System.Collections.Generic;
| ^~~~~~
a.cc:8:26: error: 'string' has not been declared
8 | static void Main(string[] args)
| ^~~~~~
a.cc:8:35: error: expected ',' or '...' before 'args'
8 | static void Main(string[] args)
| ^~~~
a.cc:24:6: error: expected ';' after class definition
24 | }
| ^
| ;
a.cc: In static member function 'static void ConsoleApplication1::Program::Main(int*)':
a.cc:10:13: error: 'string' was not declared in this scope
10 | string[] str = Console.ReadLine().Split(' ');
| ^~~~~~
a.cc:10:20: error: expected primary-expression before ']' token
10 | string[] str = Console.ReadLine().Split(' ');
| ^
a.cc:11:21: error: expected primary-expression before 'int'
11 | int A = int.Parse(str[0]);
| ^~~
a.cc:12:21: error: expected primary-expression before 'int'
12 | int B = int.Parse(str[1]);
| ^~~
a.cc:13:21: error: expected primary-expression before 'int'
13 | int C = int.Parse(str[2]);
| ^~~
a.cc:16:17: error: 'Console' was not declared in this scope
16 | Console.WriteLine("Yes");
| ^~~~~~~
a.cc:20:17: error: 'Console' was not declared in this scope
20 | Console.WriteLine("No");
| ^~~~~~~
a.cc:22:13: error: 'Console' was not declared in this scope
22 | Console.ReadKey();
| ^~~~~~~
|
s586411941 | p03719 | C++ | #include<iostream>
using namespace std;
int main(){
int N[10]{ai};
int M[10]{bi};
int ai=1;
int bi=1;
for (int ai = 0; i < 50; i++){
cin >> N{ai};
}
for (int bi = 0; i < 50; i++){
cout << N{ai} << " " << M{bi} << endl;
}
return 0;
}
| a.cc: In function 'int main()':
a.cc:5:13: error: 'ai' was not declared in this scope
5 | int N[10]{ai};
| ^~
a.cc:6:13: error: 'bi' was not declared in this scope
6 | int M[10]{bi};
| ^~
a.cc:11:20: error: 'i' was not declared in this scope; did you mean 'ai'?
11 | for (int ai = 0; i < 50; i++){
| ^
| ai
a.cc:12:8: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [10]')
12 | cin >> N{ai};
| ~~~ ^~ ~
| | |
| | int [10]
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/iostream:42,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed:
a.cc:12:11: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int*'
12 | cin >> N{ai};
| ^
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed:
a.cc:12:11: error: invalid conversion from 'int*' to 'short int' [-fpermissive]
12 | cin >> N{ai};
| ^
| |
| int*
a.cc:12:11: error: cannot bind rvalue '(short int)((int*)(& N))' to 'short int&'
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed:
a.cc:12:11: error: invalid conversion from 'int*' to 'short unsigned int' [-fpermissive]
12 | cin >> N{ai};
| ^
| |
| int*
a.cc:12:11: error: cannot bind rvalue '(short unsigned int)((int*)(& N))' to 'short unsigned int&'
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed:
a.cc:12:11: error: invalid conversion from 'int*' to 'int' [-fpermissive]
12 | cin >> N{ai};
| ^
| |
| int*
a.cc:12:11: error: cannot bind rvalue '(int)((int*)(& N))' to 'int&'
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed:
a.cc:12:11: error: invalid conversion from 'int*' to 'unsigned int' [-fpermissive]
12 | cin >> N{ai};
| ^
| |
| int*
a.cc:12:11: error: cannot bind rvalue '(unsigned int)((int*)(& N))' to 'unsigned int&'
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed:
a.cc:12:11: error: invalid conversion from 'int*' to 'long int' [-fpermissive]
12 | cin >> N{ai};
| ^
| |
| int*
a.cc:12:11: error: cannot bind rvalue '(long int)((int*)(& N))' to 'long int&'
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed:
a.cc:12:11: error: invalid conversion from 'int*' to 'long unsigned int' [-fpermissive]
12 | cin >> N{ai};
| ^
| |
| int*
a.cc:12:11: error: cannot bind rvalue '(long unsigned int)((int*)(& N))' to 'long unsigned int&'
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed:
a.cc:12:11: error: invalid conversion from 'int*' to 'long long int' [-fpermissive]
12 | cin >> N{ai};
| ^
| |
| int*
a.cc:12:11: error: cannot bind rvalue '(long long int)((int*)(& N))' to 'long long int&'
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed:
a.cc:12:11: error: invalid conversion from 'int*' to 'long long unsigned int' [-fpermissive]
12 | cin >> N{ai};
| ^
| |
| int*
a.cc:12:11: error: cannot bind rvalue '(long long unsigned int)((int*)(& N))' to 'long long unsigned int&'
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed:
a.cc:12:11: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*'
12 | cin >> N{ai};
| ^
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'int [10]' to 'float&'
219 | operator>>(float& __f)
| ~~~~~~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'int [10]' to 'double&'
223 | operator>>(double& __f)
| ~~~~~~~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'int [10]' to 'long double&'
227 | operator>>(long double& __f)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]'
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'int [10]' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'}
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]'
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'int [10]' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type& |
s225458591 | p03719 | C++ |
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include<math.h>
#define rep(i,a) for(int i=0;i<a;i++)
#define nrep(i,a,b) for(int i=a;i<b;i++)
#define mrep(i,a) for(int i=a;i>=0;i--)
#define ll long long
#define vl vector<ll>
#define vvl vector<vector<ll> >
#define vb vector<bool>
#define vvb vector<vector<bool> >
#define INF LLONG_MAX
using namespace std;
struct E{
ll from;
ll to;
ll cost;
};
ll ans,n,m;
vector<E> e;
vl dp;
bool bellman_ford(ll s){
dp[s] = 0;
rep(count, n) rep(i, m){
if (dp[e[i].from] + e[i].cost > dp[e[i].to]){
dp[e[i].to] = dp[e[i].from] + e[i].cost;
if (count == n - 1) return true;
}
}
return false;
}
int main(){
cin >> n >> m;
dp.resize(n, -INF);
e.resize(m);
rep(i, m){
ll a, b,c; cin >> a >> b >> c;
a--; b--;
e[i].from = a;
e[i].to = b;
e[i].cost = c;
}if (bellman_ford(0)) cout << "inf" << endl;
else cout << dp[n - 1] << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:15:13: error: 'LLONG_MAX' was not declared in this scope
15 | #define INF LLONG_MAX
| ^~~~~~~~~
a.cc:43:23: note: in expansion of macro 'INF'
43 | dp.resize(n, -INF);
| ^~~
a.cc:7:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
6 | #include<math.h>
+++ |+#include <climits>
7 | #define rep(i,a) for(int i=0;i<a;i++)
|
s166386506 | p03719 | C++ | #include<iostream>
int main(){
int A,B,C;
cin >> A>>B>>C;
if(A<=C&&C<=B){
cout << "YES"<<endl;
}else{
cout <<"NO"<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> A>>B>>C;
| ^~~
| 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; ///< Linked to standard input
| ^~~
a.cc:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | cout << "YES"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:7:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
7 | cout << "YES"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | cout <<"NO"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | cout <<"NO"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s611701492 | p03719 | C++ | #include<iostream>
int main(){
int A,B,C;
cin >> A>>B>>C;
if(A<=C&&C<=B){
cout << "YES"<<endl;
}else{
cout <<"NO"<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:5:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> A>>B>>C;
| ^~~
| 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; ///< Linked to standard input
| ^~~
a.cc:7:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | cout << "YES"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:7:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
7 | cout << "YES"<<endl;
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:9:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
9 | cout <<"NO"<<endl;
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:9:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
9 | cout <<"NO"<<endl;
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:12:2: error: expected '}' at end of input
12 | }
| ^
a.cc:2:11: note: to match this '{'
2 | int main(){
| ^
|
s454767486 | p03719 | C | #include <stdio.h>
int main(void)
{
int a,b,c;
a = 12;
b = 50;
c = 32;
if(a+100 >= 200 || b+100 >= 200 || c+100 >= 200){
printf("miss \n");
return 0;
}
if(c>=a&&c<=b){
printf("yes\n");
}
else{
printf("no\n");
}
return 0; | main.c: In function 'main':
main.c:23:9: error: expected declaration or statement at end of input
23 | return 0;
| ^~~~~~
|
s664550738 | p03719 | C++ | #include "bits/stdc++.h"
using namespace std;
int a, b, c;
int main()
{
cin >> a >> b >> c;
if(c >= a && c < = b)
printf("Yes");
else
printf("No");
return 0;
}
| a.cc: In function 'int main()':
a.cc:9:22: error: expected primary-expression before '=' token
9 | if(c >= a && c < = b)
| ^
|
s109619037 | p03719 | C++ | #include "iostream"
using namespace std;
int A;
int B;
int C;
int main(){
cin >>A>>B>>C;
if (C >= A&&C <= B){
cout << "YES" ;
}
else{
cout << "NO" ;
}
return 0;
| a.cc: In function 'int main()':
a.cc:17:10: error: expected '}' at end of input
17 | return 0;
| ^
a.cc:8:11: note: to match this '{'
8 | int main(){
| ^
|
s322726205 | p03719 | C++ | #include <stdio.h>
#include <stdlib.h>
int main(void)
{
int n, m, *ccnt, cnt;
scanf("%d %d", &n, &m);
ccnt = (int *)malloc(sizeof(int) * n);
memset(ccnt, 0, m);
for(cnt = 0; cnt < m; cnt++)
{
scanf("%d %d", &a, &b);
ccnt[a - 1] +=1;
ccnt[b - 1] +=1;
}
for(cnt = 0; cnt < n;cnt++)
{
printf("%d\n", ccnt[cnt]);
}
return 0;
} | a.cc: In function 'int main()':
a.cc:11:5: error: 'memset' was not declared in this scope
11 | memset(ccnt, 0, m);
| ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
2 | #include <stdlib.h>
+++ |+#include <cstring>
3 |
a.cc:15:25: error: 'a' was not declared in this scope
15 | scanf("%d %d", &a, &b);
| ^
a.cc:15:29: error: 'b' was not declared in this scope
15 | scanf("%d %d", &a, &b);
| ^
|
s905890874 | p03719 | C++ | #include<stdio.h>
void main()
{
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
if(c>=a&&c<=b)
printf("Yes");
else
printf("No");
}
| a.cc:2:1: error: '::main' must return 'int'
2 | void main()
| ^~~~
|
s400431479 | p03719 | C++ | read = lambda: map(int, input().split())
a, b, c = read()
print('Yes' if a <= c <= b else 'No') | a.cc:3:7: warning: multi-character character constant [-Wmultichar]
3 | print('Yes' if a <= c <= b else 'No')
| ^~~~~
a.cc:3:33: warning: multi-character character constant [-Wmultichar]
3 | print('Yes' if a <= c <= b else 'No')
| ^~~~
a.cc:1:1: error: 'read' does not name a type
1 | read = lambda: map(int, input().split())
| ^~~~
|
s341670748 | p03719 | C++ | int main()
{
int a;
int b;
int c;
if (a <= c && c <= b)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | a.cc: In function 'int main()':
a.cc:14:17: error: 'cout' was not declared in this scope
14 | cout << "Yes" << endl;
| ^~~~
a.cc:14:34: error: 'endl' was not declared in this scope
14 | cout << "Yes" << endl;
| ^~~~
a.cc:20:17: error: 'cout' was not declared in this scope
20 | cout << "No" << endl;
| ^~~~
a.cc:20:33: error: 'endl' was not declared in this scope
20 | cout << "No" << endl;
| ^~~~
|
s331888375 | p03719 | C++ | #include<iostream>
int main(){
int a,b,c;cin>>a>>b>>c;
if(a<= c && c<=b){
std::cout<<"Yes"<<std::endl;
}else std::cout<<"No"<<std::endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:4:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
4 | int a,b,c;cin>>a>>b>>c;
| ^~~
| 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; ///< Linked to standard input
| ^~~
|
s504898883 | p03719 | C++ | #include<iostream>
#include<cstdio>
using namespace std;
int main(void) {
int a, b, c;
scanf_s("%d%d%d", &a, &b, &c);
if (c >= a && c <= b)
printf("Yes\n");
else
printf("No\n");
return 0;
} | a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
8 | scanf_s("%d%d%d", &a, &b, &c);
| ^~~~~~~
| scanf
|
s086173098 | p03719 | Java | package atCorder.beginners061;
public class Main{
public static void main(String[] args) {
String ans = "No";
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
sc.close();
if (a <= c && c <= b){
ans = "Yes";
}
System.out.print(ans);
return;
}
} | Main.java:9: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:9: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s445822042 | p03719 | C | #include<stdo.h>
int main(){
int n,m,a,b,c,l[50]={0};
scanf("%d %d",&n,&m);
while(n){
scanf("%d %d %d",&a,&b,&c);
l[a]++;
l[b]++;
l[c]++;
n--;
}
for (char i=0;i<m;i++){
printf("%d\n",l[i]);
}
return 0;
} | main.c:1:9: fatal error: stdo.h: No such file or directory
1 | #include<stdo.h>
| ^~~~~~~~
compilation terminated.
|
s848735952 | p03719 | Java | import java.util.Scanner;
public class Beginners061A {
public static void main(String[] args) {
String ans = "NO";
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
sc.close();
if (a <= c && c <= b){
ans = "YES";
}
System.out.print(ans);
return;
}
} | Main.java:3: error: class Beginners061A is public, should be declared in a file named Beginners061A.java
public class Beginners061A {
^
1 error
|
s084578985 | p03719 | C++ | ソースコード
#include <stdio.h>
int main(){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
printf((c >= a && c <= b) ? "Yes" : "No");
return 0;
} | a.cc:1:1: error: '\U000030bd\U000030fc\U000030b9\U000030b3\U000030fc\U000030c9' does not name a type
1 | ソースコード
| ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'scanf' was not declared in this scope
7 | scanf("%d %d %d",&a,&b,&c);
| ^~~~~
a.cc:9:1: error: 'printf' was not declared in this scope
9 | printf((c >= a && c <= b) ? "Yes" : "No");
| ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
2 | #include <stdio.h>
+++ |+#include <cstdio>
3 |
|
s648488201 | p03719 | C++ | ソースコード
#include <stdio.h>
int main(){
short a,b,c;
scanf("%d %d %d",&a,&b,&c);
printf((c >= a && c <= b) ? "Yes" : "No");;
return 0;
} | a.cc:1:1: error: '\U000030bd\U000030fc\U000030b9\U000030b3\U000030fc\U000030c9' does not name a type
1 | ソースコード
| ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'scanf' was not declared in this scope
7 | scanf("%d %d %d",&a,&b,&c);
| ^~~~~
a.cc:9:1: error: 'printf' was not declared in this scope
9 | printf((c >= a && c <= b) ? "Yes" : "No");;
| ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
2 | #include <stdio.h>
+++ |+#include <cstdio>
3 |
|
s229378013 | p03719 | Java | public class Main{
public static void main(String[] args) {
String ans = "NO";
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
sc.close();
if (a <= c && c <= b){
ans = "YES";
}
System.out.print(ans);
return;
}
} | Main.java:7: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
Main.java:7: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
symbol: class Scanner
location: class Main
2 errors
|
s572769537 | p03719 | C++ | #include <iostream>
#include <utility>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
#include <cmath>
int main (){
int A,B,C;
int flag=0;
cin >> A >> B>>C;
if(C>=A)
flag++;
if(C<=B)
flag++;
if(flag==2)
cout<< "Yes"
else
cout<<"No"
} | a.cc: In function 'int main()':
a.cc:13:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
13 | cin >> A >> B>>C;
| ^~~
| 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; ///< Linked to standard input
| ^~~
a.cc:19:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
19 | cout<< "Yes"
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
|
s327390670 | p03719 | C++ | #include<stdio.h>
#include<vector>
#include<utility>
#include<algorithm>
#include<iostream>
using namespace std;
{
int a,b,c;
cin>>a>>b>>c;
if(a<=c&&c<=b)
cout<<"Yes"<<endl;
else cout<<"No"<<endl;
return 0;
}
| a.cc:8:1: error: expected unqualified-id before '{' token
8 | {
| ^
|
s387976658 | p03719 | C | #include <stdio.h>
int main(void) {
if(C<A)
printf("No\n");
else if(B<C)
printf("No\n");
else
printf("Yes"\n);
return 0;
}
| main.c: In function 'main':
main.c:4:12: error: 'C' undeclared (first use in this function)
4 | if(C<A)
| ^
main.c:4:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:14: error: 'A' undeclared (first use in this function)
4 | if(C<A)
| ^
main.c:6:18: error: 'B' undeclared (first use in this function)
6 | else if(B<C)
| ^
main.c:9:21: error: stray '\' in program
9 | printf("Yes"\n);
| ^
main.c:9:21: error: expected ')' before 'n'
9 | printf("Yes"\n);
| ~ ^~
| )
|
s610399794 | p03719 | Java | import java.util.Scanner;
public class Beginners061A {
public static void main(String[] args) {
String ans = "NO";
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
sc.close();
if (a <= b && b <= c){
ans = "YES";
}
System.out.print(ans);
return;
}
} | Main.java:3: error: class Beginners061A is public, should be declared in a file named Beginners061A.java
public class Beginners061A {
^
1 error
|
s567960298 | p03719 | C++ | #include <stdio.h>
int main(){
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
printf((c >= a && c <= b) ? "Yes" : "No":);
return 0;
} | a.cc: In function 'int main()':
a.cc:8:42: error: expected ')' before ':' token
8 | printf((c >= a && c <= b) ? "Yes" : "No":);
| ~ ^
| )
|
s185994887 | p03719 | Java | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static void main(String[]args)throws IOException{
BufferedReader br=
new BufferedReader(new InputStreamReader(System.in));
String str1=br.readLine();
String[] str2 = str1.split(" ", 0);
int n1=Integer.parseInt(str2[0]);
int n2=Integer.parseInt(str2[1]);
int n3=Integer.parseInt(str2[2]);
if(n1<=n3&&n3<=n2){
System.out.println("Yes");
}
else{
System.out.println("No");
}
}
| Main.java:23: error: reached end of file while parsing
}
^
1 error
|
s370856972 | p03719 | C | #include <stdio.h>
int main(void)
{
int A,B,C;
scanf("%d %d %d",&A,&B,&C);
if((A<=C)&&(C<=B))
printf("YES\n");
else
printf("NO\n");
return 0
} | main.c: In function 'main':
main.c:10:9: error: expected ';' before '}' token
10 | return 0
| ^
| ;
11 | }
| ~
|
s443673569 | p03719 | C | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <vector>
#pragma warning(disable : 4996)
using namespace std;
#define FOR(i,a,b) for (int i = (a); i < (b); i++)
#define REP(i,n) FOR(i,0,n)
//最大公約数
long gcd(long a, long b){
if (a%b==0){
return b;
}
else{
return gcd(b,a%b);
}
}
//最小公倍数
long lcm(long a, long b){
return (a*b) / gcd(a,b);
}
template<typename A, typename B> inline bool chmax(A &a, B b) { if (a < b) { a = b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a > b) { a = b; return 1; } return 0; }
typedef long long ll;
const ll INF = 1ll<<29;
const ll MOD = 1000000007;
const double EPS = 1e-10;
int main(){
int a, b, c;
cin >> a >> b >> c;
if (a <= c && c <= b) cout << "Yes"<< endl;
else cout << "No" << endl;
return 0;
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s237672603 | p03719 | C++ | #include <iostream>
int main(void){
int a,b,c;
cin >> a >> b >> c;
if(a<=c&&c<=b){ cout << "Yes" << endl; }
else{ cout << "No" << endl; }
return 0;
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
5 | cin >> a >> b >> c;
| ^~~
| 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; ///< Linked to standard input
| ^~~
a.cc:6:19: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
6 | if(a<=c&&c<=b){ cout << "Yes" << endl; }
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:6:36: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
6 | if(a<=c&&c<=b){ cout << "Yes" << endl; }
| ^~~~
| std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
a.cc:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
7 | else{ cout << "No" << endl; }
| ^~~~
| std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
63 | extern ostream cout; ///< Linked to standard output
| ^~~~
a.cc:7:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
7 | else{ cout << "No" << endl; }
| ^~~~
| std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
744 | endl(basic_ostream<_CharT, _Traits>& __os)
| ^~~~
|
s017365367 | p03719 | Java | import java.util.Scanner;
public class beginner61A{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
if(C>=A && C<=B){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
} | Main.java:2: error: class beginner61A is public, should be declared in a file named beginner61A.java
public class beginner61A{
^
1 error
|
s258572393 | p03719 | C++ | #include <bits\stdc++.h>
using namespace std;
int main() {
int n, k;
pair<int, int> p[200000];
cin >> n >> k;
for (int i = 0; i < n; i++) {
cin >> p[i].first >> p[i].second;
}
sort(p, p + n);
int kk = k;
for (int i = 0; i < n; i++) {
kk -= p[i].second;
if (kk <= 0) {
cout << p[i].first;
break;
}
}
} | a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory
1 | #include <bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s853955010 | p03719 | Java | import java.util.Scanner;
public class beginner61A{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
if(C>=A && C<=B){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
} | Main.java:2: error: class beginner61A is public, should be declared in a file named beginner61A.java
public class beginner61A{
^
1 error
|
s805941895 | p03719 | C++ |
import java.io.*;
import java.util.*;
import java.lang.Math.*;
public class Main {
public static void main(String[] args) {
Main main = new Main();
try {
main.solve(args);
} catch (Exception e) {
e.printStackTrace();
}
}
public void solve(String[] args) throws Exception {
MyScanner scanner = new MyScanner();
int A = scanner.nextInt();
int B = scanner.nextInt();
int C = scanner.nextInt();
if (A <= C && C <= B) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
private class MyScanner {
String[] s;
int i;
BufferedReader br;
String reg = " ";
MyScanner () {
s = new String[0];
i = 0;
br = new BufferedReader(new InputStreamReader(System.in));
}
public String next() throws IOException {
if (i < s.length) return s[i++];
String line = br.readLine();
while (line.equals("")) {
line = br.readLine();
}
s = line.split(reg, 0);
i = 0;
return s[i++];
}
public int nextInt() {
try {
return Integer.parseInt(next());
} catch (Exception e) {
e.printStackTrace();
}
return -1;
}
public double nextDouble() {
try {
return Double.parseDouble(next());
} catch (Exception e) {
e.printStackTrace();
}
return -1;
}
public long nextLong() {
try {
return Long.parseLong(next());
} catch (Exception e) {
e.printStackTrace();
}
return -1;
}
}
}
| a.cc:2:1: error: 'import' does not name a type
2 | import java.io.*;
| ^~~~~~
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.*;
| ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
4 | import java.lang.Math.*;
| ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
6 | public class Main {
| ^~~~~~
|
s645093460 | p03719 | C | #include <stdio.h>
int main(void)
{
int A,B,C;
scanf("%d %d %d",&A,&B,&C);
if(A<=C&&C<=B)
printf("YES\n");
else
printf("NO\n");
return 0
} | main.c: In function 'main':
main.c:10:9: error: expected ';' before '}' token
10 | return 0
| ^
| ;
11 | }
| ~
|
s640576363 | p03719 | Java | import java.util.Scanner;
public class Atcoder {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
// String s = sc.next();
if (c >= a && c <= b){
System.out.println("Yes");
}
else {
System.out.println("No");
}
}
}
| Main.java:3: error: class Atcoder is public, should be declared in a file named Atcoder.java
public class Atcoder {
^
1 error
|
s574471338 | p03719 | C | include <stdio.h>
int main(void)
{
int A,B,C;
scanf("%d %d %d",&A,&B,&C);
if(A<=C&&C<=B)
printf("YES\n");
else
printf("NO\n");
return 0
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s556894516 | p03719 | C++ | l = input().split()
A = int(l[0])
B = int(l[1])
C = int(l[2])
if C >= A:
if C <= B:
print("Yes")
else:
print("No") | a.cc:1:1: error: 'l' does not name a type
1 | l = input().split()
| ^
|
s918051712 | p03719 | C++ | #include<iostream>
#include<fstream>
#include<cmath>
#include<string>
#include<set>
#include <map>
#include<algorithm>
#include<vector>
#include <queue>
#include <stack>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
const double PI = acos(-1.0);
const ll INF = LLONG_MAX;
const int A = 1234567;
double arr[A];
int main() {
int a, b, c;
cin >> a >> b >> c;
if (c => a && c <= b)
cout << "Yes";
else
cout << "No";
} | a.cc:15:16: error: 'LLONG_MAX' was not declared in this scope
15 | const ll INF = LLONG_MAX;
| ^~~~~~~~~
a.cc:11:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
10 | #include <stack>
+++ |+#include <climits>
11 | using namespace std;
a.cc: In function 'int main()':
a.cc:22:16: error: expected primary-expression before '>' token
22 | if (c => a && c <= b)
| ^
|
s305982943 | p03719 | C++ | #include <stdio.h>
void main(){
int a,b,c;
scanf("%d%d%d", &a, &b, &c);
if(a <= b && b <= c){
printf("Yes\n");
}else{
printf("No\n");
}
}
| a.cc:3:1: error: '::main' must return 'int'
3 | void main(){
| ^~~~
|
s635460568 | p03719 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c;
if(a<b){
}
else{
} | a.cc: In function 'int main()':
a.cc:11:2: error: expected '}' at end of input
11 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s096040077 | p03719 | C++ | #include<iostream>
using namespace std;
int main(){
int a,b,c;
if(a<b){
}
else{
} | a.cc: In function 'int main()':
a.cc:11:2: error: expected '}' at end of input
11 | }
| ^
a.cc:4:11: note: to match this '{'
4 | int main(){
| ^
|
s022066332 | p03719 | C | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if ( c >= a && c <=∑ b)
printf("Yes");
else
printf("No");
return 0;
} | main.c: In function 'main':
main.c:9:22: error: stray '\342' in program
9 | if ( c >= a && c <=<U+2211> b)
| ^~~~~~~~
|
s016809937 | p03719 | Java | import java.util.Scanner;
public class AtCoder {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
// String s = sc.next();
if (c >= a && c <= b){
System.out.println("Yes");
}
else {
System.out.println("No");
}
}
}
| Main.java:3: error: class AtCoder is public, should be declared in a file named AtCoder.java
public class AtCoder {
^
1 error
|
s378701094 | p03719 | C++ | #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
int a, b; c; cin >> a >> b >> c;
if (a <= c&&c <= b)cout << "Yes\n";
else cout << "No\n";
} | a.cc: In function 'int main()':
a.cc:6:19: error: 'c' was not declared in this scope
6 | int a, b; c; cin >> a >> b >> c;
| ^
|
s873385227 | p03719 | C++ | int main(void){
long long a, b, c;
cin >> a >> b >> c;
if( a<=c && c<=b){
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
3 | cin >> a >> b >> c;
| ^~~
a.cc:5:9: error: 'cout' was not declared in this scope
5 | cout << "Yes" << endl;
| ^~~~
a.cc:5:26: error: 'endl' was not declared in this scope
5 | cout << "Yes" << endl;
| ^~~~
a.cc:7:9: error: 'cout' was not declared in this scope
7 | cout << "No" << endl;
| ^~~~
a.cc:7:25: error: 'endl' was not declared in this scope
7 | cout << "No" << endl;
| ^~~~
|
s889609497 | p03719 | C++ | #include "<iostream>
using namespace std;
int main() {
int a, b, c;
if (c >= a && c <= b)cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
} | a.cc:1:10: warning: missing terminating " character
1 | #include "<iostream>
| ^
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
1 | #include "<iostream>
| ^~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:30: error: 'cout' was not declared in this scope
6 | if (c >= a && c <= b)cout << "Yes" << endl;
| ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | #include "<iostream>
a.cc:6:47: error: 'endl' was not declared in this scope
6 | if (c >= a && c <= b)cout << "Yes" << endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | #include "<iostream>
a.cc:7:14: error: 'cout' was not declared in this scope
7 | else cout << "No" << endl;
| ^~~~
a.cc:7:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:30: error: 'endl' was not declared in this scope
7 | else cout << "No" << endl;
| ^~~~
a.cc:7:30: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
|
s002152112 | p03719 | C++ | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define ist istream_iterator
#define ost ostream_iterator
ll const inf = 100 * 1000;
int const N = (1 << 17) + 16;
int main() {
cin.tie(0);
cin.sync_with_stdio(0);
int a, b, c;
cin >> a >> b >> c;
cout << ((c >= a && c <= b) > "Yes" : "No") << endl;
} | a.cc: In function 'int main()':
a.cc:20:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
20 | cout << ((c >= a && c <= b) > "Yes" : "No") << endl;
| ~~~~~~~~~~~~~~~~~~~^~~~~~~
a.cc:20:38: error: expected ')' before ':' token
20 | cout << ((c >= a && c <= b) > "Yes" : "No") << endl;
| ~ ^~
| )
|
s553531157 | p03719 | C++ | #include <iostream>
#include <queue>
using namespace std;
int N;
long long W;
long long w[100], v[100];
long double va[100];
long long sumw = 0, sumv = 0, strsw=0, strsv=0;
struct VAR
{
long long w, v;
double va;
};
VAR str, str_pop;
queue<VAR> que;
queue<VAR> sum;
long long sumw = 0;
int main()
{
cin.tie(0);
ios::sync_with_stdio(false);
int a, b, c;
cin >> a >> b >> c;
if (c >= a && c <= b) {
cout << "Yes\n";;
}
else {
cout << "No\n";
}
return 0;
} | a.cc:20:11: error: redefinition of 'long long int sumw'
20 | long long sumw = 0;
| ^~~~
a.cc:10:11: note: 'long long int sumw' previously defined here
10 | long long sumw = 0, sumv = 0, strsw=0, strsv=0;
| ^~~~
|
s335248957 | p03719 | C++ | #include <bits\stdc++.h>
using namespace std;
int main() {
int a, b, c;
if (c >= a && c <= b)cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
} | a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory
1 | #include <bits\stdc++.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s990066010 | p03719 | C++ | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(c>=a&&c<=b) System.out.println("Yes");
else System.out.println("No");
}
} | a.cc:1:1: error: 'import' does not name a type
1 | import java.util.Scanner;
| ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
3 | public class Main {
| ^~~~~~
|
s125399252 | p03719 | C++ | #include <iostream>
#include <tuple>
#include <string>
#include <map>
#include <algorithm>
#include <list>
#include <vector>
#include <set>
#include <stdio.h>
#include <queue>
#include <stack>
#include <deque>
#include <math.h>
#include <sstream>
#include <stdlib.h>
#include <functional>
using namespace std;
#define rep(i,n) for(int i = 0; i < n; i++)
#define rrep(i,a,n) for(int i = a; i < n; i++)
#define INF (1<<29)
#define INFL 0x3f3f3f3f3f3f3f3fLL
#define MOD 1000000007
#define fi first
#define se second
#define pb push_back
#define PI 3.14159265358979323846
#define all(o) (o).begin(), (o).end()
#define rall(x) x.rbegin(),x.rend()
typedef double ld;
typedef vector<int> vi;
typedef vector< vi > vvi;
typedef vector<string> vs;
typedef vector<char> vc;
typedef vector<ld> vd;
typedef vector < vc > vvc;
typedef long long ll;
typedef pair<int, int> pii;
typedef unsigned long long int ulli;
const int dx[] = { 1, 0, -1, 0 };
const int dy[] = { 0, 1, 0, -1 };
template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
const ld eps = 1e-10, pi = acos(-1.0);
#define MAX_N 100001
// combination
ll fact[MAX_N], factinv[MAX_N];
ll mod_pow(ll n, ll p, ll m) {
ll a = n;
ll x = 1;
while (p) {
if (p & 1) x = (x * a) % m;
a = (a * a) % m;
p >>= 1;
}
return x;
}
int extgcd(int a, int b, int& x, int&y) {
int d = a;
if (b != 0) {
d = extgcd(b, a % b, y, x);
y -= (a / b) * x;
}
else {
x = 1; y = 0;
}
return d;
}
int mod_inverse(int a, int m) {
int x, y;
extgcd(a, m, x, y);
return (m + x % m) % m;
}
ll inv(ll n) {
return mod_pow(n, MOD - 2, MOD);
}
void combInit() {
fact[0] = 1;
rrep(i, 1, MAX_N) fact[i] = fact[i - 1] * i % MOD;
factinv[MAX_N - 1] = inv(fact[MAX_N - 1]);
for (int i = MAX_N - 2; i >= 0; i--) factinv[i] = factinv[i + 1] * (i + 1) % MOD;
}
// ダイクストラ
/*
struct edge { int to, cost; };
vector < vector < edge > > G;
vi d;
void dijkstra(int s) {priority_queue<pii, vector< pii >, greater<pii> > que;d[s] = 0;que.push(pii(0, s));while (!que.empty()) {pii p = que.top(); que.pop();int v = p.second;if (d[v] < p.first) continue;rep(i, G[v].size()) {edge e = G[v][i];int cost = e.cost;if (d[v] + cost < d[e.to]) {d[e.to] = d[v] + e.cost;que.push(pii(d[e.to], e.to));}}}}
*/
// Union-Find木
int par[MAX_N], rnk[MAX_N], unionSize[MAX_N];
// はじめは全ての頂点が根
void UnionFindTreeInit(int n) {
rep(i, n) {
par[i] = i;
rnk[i] = 0;
unionSize[i] = 1;
}
}
//木の根元を求める
int root(int x) {
if (par[x] == x) return x; // 根を返す
else return par[x] = root(par[x]);
}
// 連結成分の大きさを取得
int componentSize(int x) {
return unionSize[root(x)];
}
// xとyが同じ集合に属するか否か
bool same(int x, int y) {
return root(x) == root(y);
}
// xとyの属する集合を併合
void unite(int x, int y) {
x = root(x);
y = root(y);
if (x == y) return;
if (rnk[x] < rnk[y]) {
par[x] = y;
unionSize[y] += unionSize[x];
}
else {
par[y] = x;
if (rnk[x] == rnk[y]) rnk[x]++;
unionSize[x] += unionSize[y];
}
}
//-----------------------------------------------------------------
//int dx[8] = { -1, 1, 0, 0, 1, 1, -1, -1 };
//int dy[8] = { 0, 0, 1, -1, 1, -1, -1, 1 };
struct edge { int to, cost; };
vector < vector < edge > > G;
vi d;
void dijkstra(int s) {
priority_queue<pii, vector< pii >, greater<pii> > que;
d[s] = 0;
que.push(pii(0, s));
while (!que.empty()) {
pii p = que.top();
que.pop();
int v = p.second;
if (d[v] < p.first) continue;
rep(i, G[v].size()) {
edge e = G[v][i];
int cost = e.cost;
if (d[v] + cost < d[e.to]) {
d[e.to] = d[v] + e.cost;
que.push(pii(d[e.to], e.to));
}
}
}
}
vector<tuple<int,int,int> > vv;
vi eds[120000];
int cl[120000]
int lst[120000];
ll n, m, Q;↲
int main() {
void dfs1(int v, int d, int c) {
if (!cl[v]) {
cl[v] = c;
}
if (lst[v] >= d)
return;
if (d == 0) {
return 0;
}
for (int u : eds[v]) {
dfs1(u, d - 1, c);
}
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int a,b,c;
cin >> a >> b >> c;
if (a <= c && b >= c) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
| a.cc:174:12: error: extended character ↲ is not valid in an identifier
174 | ll n, m, Q;↲
| ^
a.cc:173:1: error: expected initializer before 'int'
173 | int lst[120000];
| ^~~
a.cc:174:12: error: '\U000021b2' does not name a type
174 | ll n, m, Q;↲
| ^
|
s177563424 | p03719 | C++ | #include<bits./stdc++.h>
using namespace std;
int main()
{
int A,B,C;
scanf("%d%d%d",&A,&B,&C);
if(A <= C && C <= B)printf("Yes\n");
else printf("No\n");
return 0;
}
| a.cc:1:9: fatal error: bits./stdc++.h: No such file or directory
1 | #include<bits./stdc++.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s814744714 | p03719 | C++ | #include <stdio.h>
int main(){
int A,B,C;
scanf("%d %d %d",&A,&B,&C);
if(A<C && B>C){
printf("Yes\n");
}
else{
printf("No\n");
}
return 0
} | a.cc: In function 'int main()':
a.cc:12:12: error: expected ';' before '}' token
12 | return 0
| ^
| ;
13 | }
| ~
|
s324257721 | p03719 | C++ | #include <bits/stdc++.h>
#define lli long long int
#define pb push_back
#define pii pair <int, int>
#define pll pair <lli, lli>
#define _F first
#define _S second
#define mset(x) memset(x, 0, sizeof(x))
#define fastio() ios_base::sync_with_stdio(0)
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
if((not (c < a)) && (not (c > b)))
cout << "Yes" << endl;
else
cout << "No" << endl;1 3 2
return (0-0);
} | a.cc: In function 'int main()':
a.cc:22:39: error: expected ';' before numeric constant
22 | cout << "No" << endl;1 3 2
| ^~
| ;
|
s317590941 | p03719 | Java | import java.util.*;
public class ABC061A {
public static int solve() {
return 0;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a, b, c;
a = sc.nextInt();
b = sc.nextInt();
c = sc.nextInt();
if (c >= a && c <= b)
System.out.println("YES");
else
System.out.println("NO");
}
}
| Main.java:3: error: class ABC061A is public, should be declared in a file named ABC061A.java
public class ABC061A {
^
1 error
|
s378648782 | p03719 | C++ | #include<bits./stdc++.h>
using namespace std;
int main()
{
int A,B,C;
scanf("%d%d%d",&A,&B,&C);
if(A <= C && C <= B)printf("Yes\n");
else printf("No\n");
}
| a.cc:1:9: fatal error: bits./stdc++.h: No such file or directory
1 | #include<bits./stdc++.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
|
s248806378 | p03719 | C++ | #include<iostream>
#include<fstream>
#include<cmath>
#include<string>
#include<set>
#include <map>
#include<algorithm>
#include<vector>
#include <queue>
#include <stack>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
const double PI = acos(-1.0);
const ll INF = LLONG_MAX;
const int A = 1234567;
double arr[A];
int main() {
int a, b, c;
cin >> a >> b >> c;
if (c > a && c < b)
cout << "Yes";
else
cout << "No";
} | a.cc:15:16: error: 'LLONG_MAX' was not declared in this scope
15 | const ll INF = LLONG_MAX;
| ^~~~~~~~~
a.cc:11:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
10 | #include <stack>
+++ |+#include <climits>
11 | using namespace std;
|
s963574961 | p03719 | C++ | #include "bits\stdc++.h"
using namespace std;
int main() {
int a, b, c;
if (c >= a && c <= b)cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
} | a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory
1 | #include "bits\stdc++.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
|
s773020613 | p03719 | C++ | #include <bits/stdc++.h>
using namespace std;
#define INF 1001000100010001000
#define MOD 1000000007
#define EPS 1e-10
#define int long long
#define rep(i, N) for (int i = 0; i < N; i++)
#define Rep(i, N) for (int i = 1; i < N; i++)
#define For(i, a, b) for (int i = (a); i < (b); i++)
#define pb push_back
#define eb emplece_back
#define mp make_pair
#define i_i pair<int, int>
#define vi vector<int>
#define vvi vector<vi >
#define vb vector<bool>
#define vvb vector<vb >
#define vp vector< i_i >
#define all(a) (a).begin(), (a).end()
#define Int(x) int x; scanf("%lld", &x);
#define int2(x, y) int x, y; scanf("%lld %lld", &x, &y);
//int dxy[5] = {0, 1, 0, -1, 0};
// assign
signed main()
{
int2(a, b);
Int(c);
if (a <= c && c <= b)
cout << "Yes" << endl;
else {
cout << "No" << endl;
return 0;
}
| a.cc: In function 'int main()':
a.cc:38:2: error: expected '}' at end of input
38 | }
| ^
a.cc:29:1: note: to match this '{'
29 | {
| ^
|
s257251228 | p03719 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if (c >= A && c <= B) printf("Yes");
else printf("No");
} | a.cc: In function 'int main()':
a.cc:7:18: error: 'A' was not declared in this scope
7 | if (c >= A && c <= B) printf("Yes");
| ^
a.cc:7:28: error: 'B' was not declared in this scope
7 | if (c >= A && c <= B) printf("Yes");
| ^
|
s044213666 | p03719 | C++ | #include <string>
#include <queue>
#include <stack>
#include <vector>
#include <sstream>
#include <algorithm>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <list>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <climits>
#include <bitset>
#include <functional>
#include <numeric>
#include <ctime>
#include <cassert>
#include <cstring>
#include <fstream>
#define FOR(i, a, b) for(int (i)=(a); (i)<(b); (i)++)
#define IFOR(i, a, b) for(int (i)=(a);(i)<=(b);(i)++)
#define RFOR(i, a, b) for(int (i)=(a);(i)>=(b);(i)--)
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout < ((a <= c && c <= b) ? "Yes" : "No") << endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:34:48: error: invalid operands of types 'const char*' and '<unresolved overloaded function type>' to binary 'operator<<'
34 | cout < ((a <= c && c <= b) ? "Yes" : "No") << endl;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
|
s338342948 | p03720 | C++ | 8 8
1 2
3 4
1 5
2 8
3 7
5 2
4 1
6 8 | a.cc:1:1: error: expected unqualified-id before numeric constant
1 | 8 8
| ^
|
s350851686 | p03720 | Java | import java.util.*;
import java.io.*;
public class A{
public static void main(String[] args) throws IOException,NumberFormatException{
try {
FastScanner sc=new FastScanner();
int n=sc.nextInt(),m=sc.nextInt();
int a[][]=new int[m][2];
for(int i=0;i<m;i++) {
a[i][0]=sc.nextInt();
a[i][1]=sc.nextInt();
}
int road[]=new int[50];
for(int i=0;i<m;i++) {
road[a[i][0]-1]++;
road[a[i][1]-1]++;
}
for(int i=0;i<n;i++) {
System.out.println(road[i]);
}
}
catch(Exception e) {
return ;
}
}
static final Random random=new Random();
static void ruffleSort(int[] a) {
int n=a.length;
for(int i=0;i<n;i++) {
int oi=random.nextInt(n),temp=a[oi];
a[oi]=a[i]; a[i]=temp;
}
Arrays.sort(a);
}
public static class FastScanner {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st=new StringTokenizer("");
String next() {
while (!st.hasMoreTokens())
try {
st=new StringTokenizer(br.readLine());
} catch (IOException e) {}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
int[] readArray(int n) {
int[] a=new int[n];
for (int i=0; i<n; i++) a[i]=nextInt();
return a;
}
long[] readLongArray(int n) {
long[] a=new long[n];
for(int i=0; i<n ; i++) a[i]=nextLong();
return a;
}
String nextLine()
{
String str = "";
try
{
str = br.readLine();
}
catch (IOException e)
{
e.printStackTrace();
}
return str;
}
}
}
| Main.java:4: error: class A is public, should be declared in a file named A.java
public class A{
^
1 error
|
s642069612 | p03720 | C | n, m = gets.chomp.split(" ").map(&:to_i)
arr = Array.new(n).map{Array.new}
m.times do |i|
a, b = gets.chomp.split(" ").map(&:to_i)
arr[a-1] << b
arr[b-1] << a
end
arr.each do |i|
puts i.size
end
| main.c:1:1: warning: data definition has no type or storage class
1 | n, m = gets.chomp.split(" ").map(&:to_i)
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:4: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
1 | n, m = gets.chomp.split(" ").map(&:to_i)
| ^
main.c:1:8: error: 'gets' undeclared here (not in a function)
1 | n, m = gets.chomp.split(" ").map(&:to_i)
| ^~~~
main.c:1:35: error: expected expression before ':' token
1 | n, m = gets.chomp.split(" ").map(&:to_i)
| ^
main.c:2:1: error: expected ',' or ';' before 'arr'
2 | arr = Array.new(n).map{Array.new}
| ^~~
main.c:3:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
3 | m.times do |i|
| ^
|
s302084499 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
#define txt \
freopen("ip.txt", "r", stdin); \
freopen("op.txt", "w", stdout)
#define a3 INT_MAX
#define i3 INT_MIN
#define a6 INT64_MAX
#define i6 INT64_MIN
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define fo(i, n) for (int i = 0; i < (int)n; i++)
#define rep(i, k, n) for (int i = k; k < (int)n ? i < (int)n : i > (int)n; k < (int)n ? i += 1 : i -= 1)
#define quickie \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define div2(a) (!(a & 1))
#define deb(x) cout << (#x) << " " << (x) << "\n";
#define newl cout << "\n"
#define all(s) s.begin(), s.end()
#define pi 3.14159265358979323846
#define fp(x) fixed << setprecision(x) <<
template <class T>
T mod(T a)
{
if (a < 0)
{
a += 1000000007;
}
return a % 1000000007;
}
template <class T>
T addmod(T a, T b)
{
return (mod(a) + mod(b)) % 1000000007;
}
template <class T>
T prodmod(T a, T b)
{
return (mod(a) * mod(b)) % 1000000007;
}
template <class T>
T bin_exp(T a, T b)
{
T res = 1;
T temp = 1;
if (b <= 1)
return a;
if (b % 2 == 0)
res = bin_exp(a * a, b / 2);
else
{
res *= a;
temp = bin_exp(a, --b);
}
return res * temp;
}
template <class T>
T bin_expmod(T a, T b)
{
T res = 1;
T temp = 1;
if (b <= 1)
return a;
if (b % 2 == 0)
res = bin_expmod(prodmod(a, a), b / 2);
else
{
res = prodmod(a, res);
temp = bin_exp(a, --b);
}
return prodmod(res, temp);
}
template <class T>
int digit(T a)
{
vector<long long> dig = {
0,
9,
99,
999,
9999,
99999,
999999,
9999999,
99999999,
999999999,
9999999999,
99999999999,
999999999999,
9999999999999,
99999999999999,
999999999999999,
9999999999999999,
99999999999999999,
999999999999999999,
INT64_MAX};
auto it = lower_bound(dig.begin(), dig.end(), a);
int idx = (it - dig.begin());
return idx;
}
template <class T>
int sumAllInts(T n)
{
int a = 1;
int su = 0;
while (n)
{
su += n % 10;
n /= 10;
}
return su;
}
template <class T>
void split(char c, T s)
{
int n = s.size();
int i = 0;
while ((cout << s[i], i += 1) && (i < n) && (cout << c << ' '))
;
}
void print(vi &vec)
{
for (int i = 0; i < vec.size(); i++)
{
cout << vec[i] << " ";
}
}
void solve()
{
vector<int> arr(51,0);
int n,m; cin>>n>>m;
fo(i,n{
int temp;
cin>>temp;
int t; cin>>t;
arr[temp]++; arr[t]++;
}
fo(i,n+1){
if(arr[i]){
cout<<arr[i];
newl;
}
}
return;
}
int main()
{
quickie;
txt;
int t = 1;
while (t--)
{
solve();
newl;
}
return 0;
} | a.cc:165:2: error: unterminated argument list invoking macro "fo"
165 | }
| ^
a.cc: In function 'void solve()':
a.cc:140:5: error: 'fo' was not declared in this scope
140 | fo(i,n{
| ^~
a.cc:140:7: error: expected '}' at end of input
140 | fo(i,n{
| ^
a.cc:137:1: note: to match this '{'
137 | {
| ^
|
s836739833 | p03720 | C++ | using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(N, 0);
for (int i = 0; i < M; i++) {
int a, b;
cin >> a >> b;
A.at(a-1) += 1;
A.at(b-1) += 1;
}
for (int i = 0; i < N; i++) {
cout << A.at(i) << endl;
}
} | a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
5 | cin >> N >> M;
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 | using namespace std;
a.cc:7:3: error: 'vector' was not declared in this scope
7 | vector<int> A(N, 0);
| ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
+++ |+#include <vector>
1 | using namespace std;
a.cc:7:10: error: expected primary-expression before 'int'
7 | vector<int> A(N, 0);
| ^~~
a.cc:12:5: error: 'A' was not declared in this scope
12 | A.at(a-1) += 1;
| ^
a.cc:17:5: error: 'cout' was not declared in this scope
17 | cout << A.at(i) << endl;
| ^~~~
a.cc:17:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:13: error: 'A' was not declared in this scope
17 | cout << A.at(i) << endl;
| ^
a.cc:17:24: error: 'endl' was not declared in this scope
17 | cout << A.at(i) << endl;
| ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
+++ |+#include <ostream>
1 | using namespace std;
|
s774223634 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main (){
int N,M,city;
cin>>N>>M;
vector<int> road(N,0);
for (int i=0;i<2*M;i++){
cin>>city;
for(int k=0;k<N;k++){
if(k==city){
road.at(k)+=1;
}
}
}
for (int i=0;i<N;i++){
cout<<road.at(k)<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:16:19: error: 'k' was not declared in this scope
16 | cout<<road.at(k)<<endl;
| ^
|
s978170586 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main (){
int N,M,city;
cin>>N>>M;
vector<int> road(N,0);
for (i=0;i<2*M;i++){
cin>>city;
for(k=0;k<N;k++){
if(k==city){
road.at(k)+=1;
}
}
}
for (i=0;i<N;i++){
cout<<road.at(k)<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:8: error: 'i' was not declared in this scope
7 | for (i=0;i<2*M;i++){
| ^
a.cc:9:9: error: 'k' was not declared in this scope
9 | for(k=0;k<N;k++){
| ^
a.cc:15:8: error: 'i' was not declared in this scope
15 | for (i=0;i<N;i++){
| ^
a.cc:16:19: error: 'k' was not declared in this scope
16 | cout<<road.at(k)<<endl;
| ^
|
s574277185 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main (){
int N,M,city;
cin>>N>>M;
vector<int> road(N,0);
for (i=0;i<2*M;i++){
cin>>city;
for(k=0;k<N;k++){
if(k==city){
road.at(k)+=1;
}
}
}
for (i=0;i<N;i++){
cout<<road.at(k)<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:7:8: error: 'i' was not declared in this scope
7 | for (i=0;i<2*M;i++){
| ^
a.cc:9:9: error: 'k' was not declared in this scope
9 | for(k=0;k<N;k++){
| ^
a.cc:15:8: error: 'i' was not declared in this scope
15 | for (i=0;i<N;i++){
| ^
a.cc:16:19: error: 'k' was not declared in this scope
16 | cout<<road.at(k)<<endl;
| ^
|
s294856054 | p03720 | C++ | /*
このコード、と~おれ!
Be accepted!
∧_∧
(。・ω・。)つ━☆・*。
⊂ ノ ・゜+.
しーJ °。+ *´¨)
.· ´¸.·*´¨) ¸.·*¨)
(¸.·´ (¸.·'* ☆
*/
#include <cstdio>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstring>
#include <vector>
#include <numeric>
#include <iostream>
#include <random>
#include <map>
#include <unordered_map>
#include <queue>
#include <regex>
#include <functional>
#include <complex>
#include <list>
#include <cassert>
#include <iomanip>
#include <set>
#include <stack>
#include <bitset>
////多倍長整数, cpp_intで宣言
//#include <boost/multiprecision/cpp_int.hpp>
//using namespace boost::multiprecision;
//#pragma GCC target ("avx2")
//#pragma GCC optimization ("Ofast")
//#pragma GCC optimization ("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define repeat(i, n, m) for(int i = n; i < (m); ++i)
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define printynl(a) printf(a ? "yes\n" : "no\n")
#define printyn(a) printf(a ? "Yes\n" : "No\n")
#define printYN(a) printf(a ? "YES\n" : "NO\n")
#define printim(a) printf(a ? "possible\n" : "imposible\n")
#define printdb(a) printf("%.50lf\n", a) //少数出力
#define printLdb(a) printf("%.50Lf\n", a) //少数出力
#define printdbd(a) printf("%.16lf\n", a) //少数出力(桁少なめ)
#define prints(s) printf("%s\n", s.c_str()) //string出力
#define all(x) (x).begin(), (x).end()
#define deg_to_rad(deg) (((deg)/360.0L)*2.0L*PI)
#define rad_to_deg(rad) (((rad)/2.0L/PI)*360.0L)
#define Please return
#define AC 0
#define manhattan_dist(a, b, c, d) (abs(a - c) + abs(b - d)) /*(a, b) から (c, d) のマンハッタン距離 */
#define inf numeric_limits<double>::infinity();
#define linf numeric_limits<long double>::infinity()
using ll = long long;
using ull = unsigned long long;
constexpr int INF = 1073741823;
constexpr int MINF = -1073741823;
constexpr ll LINF = ll(4661686018427387903);
constexpr ll MOD = 1e9 + 7;
constexpr ll mod = 998244353;
constexpr long double eps = 1e-6;
const long double PI = acos(-1.0L);
using namespace std;
void scans(string& str) {
char c;
str = "";
scanf("%c", &c);
if (c == '\n')scanf("%c", &c);
while (c != '\n' && c != -1 && c != ' ') {
str += c;
scanf("%c", &c);
}
}
void scanc(char& str) {
char c;
scanf("%c", &c);
if (c == -1)return;
while (c == '\n') {
scanf("%c", &c);
}
str = c;
}
double acot(double x) {
return PI / 2 - atan(x);
}
ll LSB(ll n) { return (n & (-n)); }
template<typename T>
inline T chmin(T& a, const T& b) {
if (a > b)a = b;
return a;
}
template<typename T>
inline T chmax(T& a, const T& b) {
if (a < b)a = b;
return a;
}
/*-----------------------------------------ここからコード-----------------------------------------*/
/*
* @title template(graph)
* @docs kyopro/docs/graph_template.md
*/
template<typename T>
struct edge {
T cost;
int from, to;
edge(int from, int to) : from(from), to(to), cost(T(1)) {}
edge(int from, int to, T cost) : from(from), to(to), cost(cost) {}
};
template<typename T = int>
struct graph {
int n;
bool directed, weighted;
vector<vector<edge<T>>> g;
graph(int n, bool directed, bool weighted) : g(n), n(n), directed(directed), weighted(weighted) {}
void add_edge(int from, int to, T cost = T(1)) {
g[from].emplace_back(from, to, cost);
if (not directed) {
g[to].emplace_back(to, from, cost);
}
}
vector<edge<T>>& operator[](const int& idx) {
return g[idx];
}
void read(int e, bool one_indexed) {
int a, b, c = 1;
while (e--) {
scanf("%d%d", &a, &b);
if (weighted) {
scanf("%d", &c);
}
if (one_indexed)--a, --b;
add_edge(a, b, c);
}
}
void read(int e, bool one_indexed, const string &format) {
int a, b;
T c = T(1);
while (e--) {
scanf("%d%d", &a, &b);
if (weighted) {
scanf(format, &c);
}
if (one_indexed)--a, --b;
add_edge(a, b, c);
}
}
};
int main() {
int n, m;
scanf("%d%d", &n, &m);
graph<int> g(n, false, false);
g.read(m, true);
rep(i, n)printf("%d\n", (int)g[i].size());
Please AC;
} | a.cc:116:1: error: '\U0000feff' does not name a type
116 | /*
|
a.cc:136:23: error: 'edge' was not declared in this scope
136 | vector<vector<edge<T>>> g;
| ^~~~
a.cc:136:28: error: template argument 1 is invalid
136 | vector<vector<edge<T>>> g;
| ^
a.cc:136:28: error: template argument 2 is invalid
a.cc:136:29: error: template argument 1 is invalid
136 | vector<vector<edge<T>>> g;
| ^~
a.cc:136:29: error: template argument 2 is invalid
a.cc:136:31: error: expected unqualified-id before '>' token
136 | vector<vector<edge<T>>> g;
| ^
a.cc:147:16: error: 'edge' was not declared in this scope
147 | vector<edge<T>>& operator[](const int& idx) {
| ^~~~
a.cc:147:21: error: template argument 1 is invalid
147 | vector<edge<T>>& operator[](const int& idx) {
| ^
a.cc:147:21: error: template argument 2 is invalid
a.cc:147:22: error: expected unqualified-id before '>' token
147 | vector<edge<T>>& operator[](const int& idx) {
| ^~
a.cc: In constructor 'graph<T>::graph(int, bool, bool)':
a.cc:138:54: error: class 'graph<T>' does not have any field named 'g'
138 | graph(int n, bool directed, bool weighted) : g(n), n(n), directed(directed), weighted(weighted) {}
| ^
a.cc: In member function 'void graph<T>::add_edge(int, int, T)':
a.cc:141:17: error: 'g' was not declared in this scope
141 | g[from].emplace_back(from, to, cost);
| ^
a.cc: In function 'int main()':
a.cc:184:39: error: no match for 'operator[]' (operand types are 'graph<int>' and 'int')
184 | rep(i, n)printf("%d\n", (int)g[i].size());
| ^
|
s749849902 | p03720 | C++ | /*
このコード、と~おれ!
Be accepted!
∧_∧
(。・ω・。)つ━☆・*。
⊂ ノ ・゜+.
しーJ °。+ *´¨)
.· ´¸.·*´¨) ¸.·*¨)
(¸.·´ (¸.·'* ☆
*/
#include <cstdio>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstring>
#include <vector>
#include <numeric>
#include <iostream>
#include <random>
#include <map>
#include <unordered_map>
#include <queue>
#include <regex>
#include <functional>
#include <complex>
#include <list>
#include <cassert>
#include <iomanip>
#include <set>
#include <stack>
#include <bitset>
////多倍長整数, cpp_intで宣言
//#include <boost/multiprecision/cpp_int.hpp>
//using namespace boost::multiprecision;
//#pragma GCC target ("avx2")
//#pragma GCC optimization ("Ofast")
//#pragma GCC optimization ("unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define repeat(i, n, m) for(int i = n; i < (m); ++i)
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define printynl(a) printf(a ? "yes\n" : "no\n")
#define printyn(a) printf(a ? "Yes\n" : "No\n")
#define printYN(a) printf(a ? "YES\n" : "NO\n")
#define printim(a) printf(a ? "possible\n" : "imposible\n")
#define printdb(a) printf("%.50lf\n", a) //少数出力
#define printLdb(a) printf("%.50Lf\n", a) //少数出力
#define printdbd(a) printf("%.16lf\n", a) //少数出力(桁少なめ)
#define prints(s) printf("%s\n", s.c_str()) //string出力
#define all(x) (x).begin(), (x).end()
#define deg_to_rad(deg) (((deg)/360.0L)*2.0L*PI)
#define rad_to_deg(rad) (((rad)/2.0L/PI)*360.0L)
#define Please return
#define AC 0
#define manhattan_dist(a, b, c, d) (abs(a - c) + abs(b - d)) /*(a, b) から (c, d) のマンハッタン距離 */
#define inf numeric_limits<double>::infinity();
#define linf numeric_limits<long double>::infinity()
using ll = long long;
using ull = unsigned long long;
constexpr int INF = 1073741823;
constexpr int MINF = -1073741823;
constexpr ll LINF = ll(4661686018427387903);
constexpr ll MOD = 1e9 + 7;
constexpr ll mod = 998244353;
constexpr long double eps = 1e-6;
const long double PI = acos(-1.0L);
using namespace std;
void scans(string& str) {
char c;
str = "";
scanf("%c", &c);
if (c == '\n')scanf("%c", &c);
while (c != '\n' && c != -1 && c != ' ') {
str += c;
scanf("%c", &c);
}
}
void scanc(char& str) {
char c;
scanf("%c", &c);
if (c == -1)return;
while (c == '\n') {
scanf("%c", &c);
}
str = c;
}
double acot(double x) {
return PI / 2 - atan(x);
}
ll LSB(ll n) { return (n & (-n)); }
template<typename T>
inline T chmin(T& a, const T& b) {
if (a > b)a = b;
return a;
}
template<typename T>
inline T chmax(T& a, const T& b) {
if (a < b)a = b;
return a;
}
/*-----------------------------------------ここからコード-----------------------------------------*/
/*
* @title template(graph)
* @docs kyopro/docs/graph_template.md
*/
template<typename T>
struct edge {
T cost;
int from, to;
edge(int from, int to) : from(from), to(to), cost(T(1)) {}
edge(int from, int to, T cost) : from(from), to(to), cost(cost) {}
};
template<typename T = int>
struct graph {
int n;
bool directed, weighted;
vector<vector<edge<T>>> g;
graph(int n, bool directed, bool weighted) : g(n), n(n), directed(directed), weighted(weighted) {}
void add_edge(int from, int to, T cost = T(1)) {
g[from].emplace_back(from, to, cost);
if (not directed) {
g[to].emplace_back(to, from, cost);
}
}
vector<edge<T>>& operator[](const int& idx) {
return g[idx];
}
void read(int e, bool one_indexed) {
int a, b, c = 1;
while (e--) {
scanf("%d%d", &a, &b);
if (weighted) {
scanf("%d", &c);
}
if (one_indexed)--a, --b;
add_edge(a, b, c);
}
}
void read(int e, bool one_indexed, const string &format) {
int a, b;
T c = T(1);
while (e--) {
scanf("%d%d", &a, &b);
if (weighted) {
scanf(format, &c);
}
if (one_indexed)--a, --b;
add_edge(a, b, c);
}
}
};
int main() {
int n, m;
scanf("%d%d", &n, &m);
graph g(n, false, false);
g.read(m, true);
rep(i, n)printf("%d\n", (int)g[i].size());
Please AC;
} | a.cc:116:1: error: '\U0000feff' does not name a type
116 | /*
|
a.cc:136:23: error: 'edge' was not declared in this scope
136 | vector<vector<edge<T>>> g;
| ^~~~
a.cc:136:28: error: template argument 1 is invalid
136 | vector<vector<edge<T>>> g;
| ^
a.cc:136:28: error: template argument 2 is invalid
a.cc:136:29: error: template argument 1 is invalid
136 | vector<vector<edge<T>>> g;
| ^~
a.cc:136:29: error: template argument 2 is invalid
a.cc:136:31: error: expected unqualified-id before '>' token
136 | vector<vector<edge<T>>> g;
| ^
a.cc:147:16: error: 'edge' was not declared in this scope
147 | vector<edge<T>>& operator[](const int& idx) {
| ^~~~
a.cc:147:21: error: template argument 1 is invalid
147 | vector<edge<T>>& operator[](const int& idx) {
| ^
a.cc:147:21: error: template argument 2 is invalid
a.cc:147:22: error: expected unqualified-id before '>' token
147 | vector<edge<T>>& operator[](const int& idx) {
| ^~
a.cc: In constructor 'graph<T>::graph(int, bool, bool)':
a.cc:138:54: error: class 'graph<T>' does not have any field named 'g'
138 | graph(int n, bool directed, bool weighted) : g(n), n(n), directed(directed), weighted(weighted) {}
| ^
a.cc: In member function 'void graph<T>::add_edge(int, int, T)':
a.cc:141:17: error: 'g' was not declared in this scope
141 | g[from].emplace_back(from, to, cost);
| ^
a.cc: In function 'int main()':
a.cc:184:39: error: no match for 'operator[]' (operand types are 'graph<int>' and 'int')
184 | rep(i, n)printf("%d\n", (int)g[i].size());
| ^
|
s959567778 | p03720 | C++ | #include <iostream>
#include <unordered_map>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
unordered_map<int> cities;
int a, b;
for (int i = 0; i < m; i++) {
cin >> a >> b;
cities[a]++;
cities[b]++;
}
for (int i = 0; i < n; i++) {
cout << cities[i]++ << endl;;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:20: error: wrong number of template arguments (1, should be at least 2)
9 | unordered_map<int> cities;
| ^
In file included from /usr/include/c++/14/unordered_map:41,
from a.cc:2:
/usr/include/c++/14/bits/unordered_map.h:109:11: note: provided for 'template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> class std::unordered_map'
109 | class unordered_map
| ^~~~~~~~~~~~~
a.cc:13:11: error: invalid types 'int[int]' for array subscript
13 | cities[a]++;
| ^
a.cc:14:11: error: invalid types 'int[int]' for array subscript
14 | cities[b]++;
| ^
a.cc:17:19: error: invalid types 'int[int]' for array subscript
17 | cout << cities[i]++ << endl;;
| ^
|
s959961359 | p03720 | Java | import java.util.*;
public class Main {
public static void main(String[] args) throws Exception{
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int m = scn.nextInt();
int[] x = new int[n];
int a = 0;
int b = 0;
for(int i=0; i<n; i++){
a = scn.nextInt()-1;
b = scn.nextInt()-1;
ans[a]++;
ans[b]++;
}
for(int i=0; i<n; i++) {
System.out.println(A[i]);
}
}
} | Main.java:14: error: cannot find symbol
ans[a]++;
^
symbol: variable ans
location: class Main
Main.java:15: error: cannot find symbol
ans[b]++;
^
symbol: variable ans
location: class Main
Main.java:18: error: cannot find symbol
System.out.println(A[i]);
^
symbol: variable A
location: class Main
3 errors
|
s104833760 | p03720 | C++ | #include<bits/stdc++.h>
using namespace std;
typedef long long ll ;
typedef double db;
const double pi = 3.141592654;
#define pb push_back
#define forab(i,a,b) for(int i=(a);i<=(b);i++)
#define CIN ios_base::sync_with_stdio(0); cin.tie(0)
#define pcase(z,x) printf("Case %ld: %lld\n",z,x)
#define nw "\n"
ll arr[52][52];
int main(void)
{
CIN;
ll tc,l,k,sum=0,x=0,y,z=0,m=1,n=0,ans=0,cnt=0;
cin>>n>>m;
for(ll i=0;i<m;i++){
cin>>x>>y;
arr[x]++;
arr[y]++;
}
for(ll i=1;i<=n;i++)
cout<<arr[i]<<nw;
} | a.cc: In function 'int main()':
a.cc:20:22: error: lvalue required as increment operand
20 | arr[x]++;
| ~~~~~^
a.cc:21:22: error: lvalue required as increment operand
21 | arr[y]++;
| ~~~~~^
|
s418362456 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int a;
vector<int> towns(N);
for (int i = 0; i < 2*M; i++){
cin >> a;
towns.at(a-1)++;
}
for (int i = 0; i < N; i++){
cout << towns.at(i) << endl;
}
| a.cc: In function 'int main()':
a.cc:17:2: error: expected '}' at end of input
17 | }
| ^
a.cc:4:12: note: to match this '{'
4 | int main() {
| ^
|
s989110371 | 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 (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) { cout << road[i] << endl; } return; } | a.cc: In function 'int main()':
a.cc:6:81: error: return-statement with no value, in function returning 'int' [-fpermissive]
6 | road[B[i] - 1] += 1; } for (int i = 0; i < N; ++i) { cout << road[i] << endl; } return; }
| ^~~~~~
|
s461550876 | 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 (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) { cout << road[i] << endl } return } | a.cc: In function 'int main()':
a.cc:6:77: error: expected ';' before '}' token
6 | road[B[i] - 1] += 1; } for (int i = 0; i < N; ++i) { cout << road[i] << endl } return }
| ^~
| ;
a.cc:6:88: error: expected primary-expression before '}' token
6 | road[B[i] - 1] += 1; } for (int i = 0; i < N; ++i) { cout << road[i] << endl } return }
| ^
a.cc:6:86: error: expected ';' before '}' token
6 | road[B[i] - 1] += 1; } for (int i = 0; i < N; ++i) { cout << road[i] << endl } return }
| ^ ~
| ;
|
s091150088 | p03720 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n, m;
cin >> n >> m;
vector<int> city(n);
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 < n;i++){
cout << a.at(i) << endl;
}
}
| a.cc: In function 'int main()':
a.cc:15:13: error: 'a' was not declared in this scope
15 | cout << a.at(i) << endl;
| ^
|
s210686391 | p03720 | C++ | #include<bits/stdc++.h>
using namespace std;
int main(){
int n, m;
cin >> n >> m;
vector<int> city(n);
for(int i = 0;i < m;i++){
int a, b;
cin >> a - 1 >> b - 1;
city.at(a)++;
city.at(b)++;
}
for(int i = 0;i < n;i++){
cout << a.at(i) << endl;
}
} | a.cc: In function 'int main()':
a.cc:10:9: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
10 | cin >> a - 1 >> b - 1;
| ~~~ ^~ ~~~~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127,
from a.cc:1:
/usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
170 | operator>>(bool& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:14: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int'
10 | cin >> a - 1 >> b - 1;
| ~~^~~
/usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
174 | operator>>(short& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:14: error: cannot bind non-const lvalue reference of type 'short int&' to a value of type 'int'
10 | cin >> a - 1 >> b - 1;
| ~~^~~
/usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
177 | operator>>(unsigned short& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:14: error: cannot bind non-const lvalue reference of type 'short unsigned int&' to a value of type 'int'
10 | cin >> a - 1 >> b - 1;
| ~~^~~
/usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match)
181 | operator>>(int& __n);
| ^~~~~~~~
/usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:14: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
10 | cin >> a - 1 >> b - 1;
| ~~^~~
/usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
184 | operator>>(unsigned int& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:14: error: cannot bind non-const lvalue reference of type 'unsigned int&' to a value of type 'int'
10 | cin >> a - 1 >> b - 1;
| ~~^~~
/usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
188 | operator>>(long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:14: error: cannot bind non-const lvalue reference of type 'long int&' to a value of type 'int'
10 | cin >> a - 1 >> b - 1;
| ~~^~~
/usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
192 | operator>>(unsigned long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:14: error: cannot bind non-const lvalue reference of type 'long unsigned int&' to a value of type 'int'
10 | cin >> a - 1 >> b - 1;
| ~~^~~
/usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
199 | operator>>(long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:14: error: cannot bind non-const lvalue reference of type 'long long int&' to a value of type 'int'
10 | cin >> a - 1 >> b - 1;
| ~~^~~
/usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
203 | operator>>(unsigned long long& __n)
| ^~~~~~~~
/usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:14: error: cannot bind non-const lvalue reference of type 'long long unsigned int&' to a value of type 'int'
10 | cin >> a - 1 >> b - 1;
| ~~^~~
/usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
219 | operator>>(float& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:219:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:14: error: cannot bind non-const lvalue reference of type 'float&' to a value of type 'int'
10 | cin >> a - 1 >> b - 1;
| ~~^~~
/usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
223 | operator>>(double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:223:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:14: error: cannot bind non-const lvalue reference of type 'double&' to a value of type 'int'
10 | cin >> a - 1 >> b - 1;
| ~~^~~
/usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
227 | operator>>(long double& __f)
| ^~~~~~~~
/usr/include/c++/14/istream:227:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:14: error: cannot bind non-const lvalue reference of type 'long double&' to a value of type 'int'
10 | cin >> a - 1 >> b - 1;
| ~~^~~
/usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
328 | operator>>(void*& __p)
| ^~~~~~~~
/usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:14: error: invalid conversion from 'int' to 'void*' [-fpermissive]
10 | cin >> a - 1 >> b - 1;
| ~~^~~
| |
| int
a.cc:10:14: error: cannot bind rvalue '(void*)((long int)(a - 1))' to 'void*&'
/usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match)
122 | operator>>(__istream_type& (*__pf)(__istream_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:122:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:14: error: invalid conversion from 'int' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} [-fpermissive]
10 | cin >> a - 1 >> b - 1;
| ~~^~~
| |
| int
/usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' (near match)
126 | operator>>(__ios_type& (*__pf)(__ios_type&))
| ^~~~~~~~
/usr/include/c++/14/istream:126:7: note: conversion of argument 1 would be ill-formed:
a.cc:10:14: error: invalid conversion from 'int' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} [-fpermissive]
10 | cin >> a - 1 >> b - 1;
| ~~^~~
| |
| int
/usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_i |
s086969863 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int64_t MOD=1000000007;
const long long INF = 1LL<<60;
int main() {
int N,M; cin>N>>M;
vector<int> S(N,0);
rep(i,M){
int a,b; cin>>a>>b;
S.at(a-1)++;
S.at(b-1)++;
}
rep(i,N){
cout<<S.at(i)<<endl;
}
}
| a.cc: In function 'int main()':
a.cc:8:15: error: no match for 'operator>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
8 | int N,M; cin>N>>M;
| ~~~^~~~~
| | |
| | int
| std::istream {aka std::basic_istream<char>}
a.cc:8:15: note: candidate: 'operator>(int, int)' (built-in)
8 | int N,M; cin>N>>M;
| ~~~^~~~~
a.cc:8:15: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1176:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
1176 | operator>(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1176:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | int N,M; cin>N>>M;
| ^
/usr/include/c++/14/bits/regex.h:1236:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
1236 | operator>(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1236:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
8 | int N,M; cin>N>>M;
| ^
/usr/include/c++/14/bits/regex.h:1329:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator>(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
1329 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1329:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | int N,M; cin>N>>M;
| ^
/usr/include/c++/14/bits/regex.h:1403:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
1403 | operator>(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1403:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | int N,M; cin>N>>M;
| ^
/usr/include/c++/14/bits/regex.h:1497:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
1497 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1497:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | int N,M; cin>N>>M;
| ^
/usr/include/c++/14/bits/regex.h:1573:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
1573 | operator>(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1573:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'int'
8 | int N,M; cin>N>>M;
| ^
/usr/include/c++/14/bits/regex.h:1673:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator>(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
1673 | operator>(const sub_match<_Bi_iter>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1673:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
8 | int N,M; cin>N>>M;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
from /usr/include/c++/14/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
1058 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1058:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>'
8 | int N,M; cin>N>>M;
| ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:67:
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
462 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:462:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
8 | int N,M; cin>N>>M;
| ^
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
507 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:507:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
8 | int N,M; cin>N>>M;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
1714 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1714:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
8 | int N,M; cin>N>>M;
| ^
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
1774 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1774:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
8 | int N,M; cin>N>>M;
| ^
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:695:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)'
695 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:695:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | int N,M; cin>N>>M;
| ^
/usr/include/c++/14/string_view:702:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)'
702 | operator> (basic_string_view<_CharT, _Traits> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:702:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>'
8 | int N,M; cin>N>>M;
| ^
/usr/include/c++/14/string_view:710:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator>(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)'
710 | operator> (__type_identity_t<basic_string_view<_CharT, _Traits>> __x,
| ^~~~~~~~
/usr/include/c++/14/string_view:710:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int'
8 | int N,M; cin>N>>M;
| ^
/usr/include/c++/14/bits/basic_string.h:3915:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
3915 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3915:5: note: template argument deduction/substitution failed:
a.cc:8:19: note: 'std::istream' {aka 'std::bas |
s625181327 | p03720 | C++ | // ConsoleApplication2.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#include "pch.h"
#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <map>
#include <algorithm>
using namespace std;
int main()
{
int n, m;
cin >> n >> m;
vector<int> mati(n+1 , 0);
for (int i = 0; i < m; i++) {
int a, b;
cin >> a >> b;
mati[a]++;
mati[b]++;
}
for (int i = 1; i <= n; i++) {
cout << mati[i] << endl;
}
}
// プログラムの実行: Ctrl + F5 または [デバッグ] > [デバッグなしで開始] メニュー
// プログラムのデバッグ: F5 または [デバッグ] > [デバッグの開始] メニュー
// 作業を開始するためのヒント:
// 1. ソリューション エクスプローラー ウィンドウを使用してファイルを追加/管理します
// 2. チーム エクスプローラー ウィンドウを使用してソース管理に接続します
// 3. 出力ウィンドウを使用して、ビルド出力とその他のメッセージを表示します
// 4. エラー一覧ウィンドウを使用してエラーを表示します
// 5. [プロジェクト] > [新しい項目の追加] と移動して新しいコード ファイルを作成するか、[プロジェクト] > [既存の項目の追加] と移動して既存のコード ファイルをプロジェクトに追加します
// 6. 後ほどこのプロジェクトを再び開く場合、[ファイル] > [開く] > [プロジェクト] と移動して .sln ファイルを選択します
| a.cc:4:10: fatal error: pch.h: No such file or directory
4 | #include "pch.h"
| ^~~~~~~
compilation terminated.
|
s821463589 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define dump(...)
#endif
#define endl "\n"
#define ll long long
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define REP(i, x) for (int i = 0; i < (int)(x); i++)
#define REPS(i, x) for (int i = 1; i <= (int)(x); i++)
#define RREP(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define RREPS(i, x) for (int i = ((int)(x)); i > 0; i--)
#define INF 2147483647
#define LLINF 9223372036854775807LL
#define vi vector<int>
#define vvi vector<vector<int>>
#define pi pair<int, int>
#define ALL(a) (a).begin(), (a).end()
#define BIT(n) (1LL << (n))
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end()) //sortしてからつかうこと
constexpr ll MOD = 1e9 + 7;
int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
int dy[8] = {0, 1, 0, -1, 1, -1, 1, -1};
ll A, B, C, D, E, F, G, H, N, M, L, K, P, Q, R, W, X, Y, Z;
string S, T;
ll ans = 0;
template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
for (T &x : vec)
is >> x;
return is;
}
//0-indexedに注意
class Graph {
struct edge {
int from, to, cost;
edge(int from, int to, int cost) : from(from), to(to), cost(cost) {}
};
public:
int verN;
int edgeN = 0;
vector<edge> edge_set;
vector<vector<pair<int, int>>> adj_list;
Graph(int verN) : verN(verN), adj_list(verN) {}
void add_directed_edge(int from, int to, int cost = 1) {
edge_set.push_back(edge(from, to, cost));
adj_list[from].push_back(make_pair(to, cost));
edgeN++;
}
void add_undirected_edge(int from, int to, int cost = 1) {
edge_set.push_back(edge(from, to, cost));
edge_set.push_back(edge(to, from, cost));
adj_list[from].push_back(make_pair(to, cost));
adj_list[to].push_back(make_pair(from, cost));
edgeN += 2;
}
bool _cycleDetection(int now, int prev, vector<int> &seen, vector<int> &used, vector<int> &cycle) {
if (used[now]) {
return false;
}
if (seen[now]) {
cycle.push_back(now);
return true;
}
seen[now] = true;
for (auto adj_pair : adj_list[now]) {
int adj = adj_pair.first;
if (prev == adj)
continue;
bool hasDetected = _cycleDetection(adj, now, seen, used, cycle);
if (hasDetected) {
cycle.push_back(now);
return true;
}
}
used[now] = true;
seen[now] = false;
return false;
}
bool cycleDetection(vector<int> &cycle) {
cycle.reserve(N);
vector<int> seen(N);
vector<int> used(N);
for (int start = 0; start < N; start++) {
bool hasDetected = _cycleDetection(start, -1, seen, used, cycle);
if (hasDetected) {
for (int i = 1; i < (int)cycle.size(); i++) {
if (cycle[i] == cycle[0]) {
cycle.erase(cycle.begin() + i + 1, cycle.end());
}
}
reverse(cycle.begin(), cycle.end());
//cycle.pop_back();
return 1;
}
}
return 0;
}
int prim(int start, vector<int> &parent) {
parent.resize(N);
int cost = 0;
vector<pair<int, int>> edgeSet;
priority_queue<pair<int, pair<int, int>>, vector<pair<int, pair<int, int>>>, greater<pair<int, pair<int, int>>>> pq;
vector<int> used(verN, 0);
pq.push(make_pair(0, make_pair(start, start)));
while (!pq.empty()) {
auto tmp = pq.top();
pq.pop();
int now = tmp.second.first;
if (used[now])
continue;
cost += tmp.first;
parent[now] = tmp.second.second;
used[now] = 1;
for (auto adj_pair : adj_list[now]) {
int adj = adj_pair.first;
int dist = adj_pair.second;
if (used[adj])
continue;
pq.push(make_pair(dist, make_pair(adj, now)));
}
}
return cost;
}
bool bellmanford(int start, vector<int> &d) {
d.assign(verN, INF);
for (int i = 0; i < verN; i++) {
d[i] = INF;
}
d[start] = 0;
for (int i = 0; i < verN; i++) {
for (int j = 0; j < edgeN; j++) {
edge e = edge_set[j];
if (d[e.from] != INF && d[e.to] > d[e.from] + e.cost) {
d[e.to] = d[e.from] + e.cost;
if (i == verN - 1) {
return false;
}
}
}
}
return true;
}
vector<int> dijkstra(int start) {
vector<int> d(verN, INF);
d[start] = 0;
priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> pq;
vector<int> used(verN, 0);
pq.push(make_pair(0, start));
while (!pq.empty()) {
int now = pq.top().second;
pq.pop();
if (used[now])
continue;
used[now] = 1;
for (auto adj_pair : adj_list[now]) {
int adj = adj_pair.first;
int dist = adj_pair.second;
if (used[adj])
continue;
if (d[adj] > d[now] + dist) {
d[adj] = d[now] + dist;
pq.push(make_pair(d[adj], adj));
}
}
}
return d;
}
vector<vector<int>> warshallfloyd() {
vector<vector<int>> d(verN, vector<int>(verN, INF));
for (int i = 0; i < verN; i++) {
for (auto adj_pair : adj_list[i]) {
int adj = adj_pair.first;
int dist = adj_pair.second;
d[i][adj] = dist;
}
}
for (int i = 0; i < verN; i++) {
d[i][i] = 0;
}
for (int k = 0; k < verN; k++) { // 経由する頂点
for (int i = 0; i < verN; i++) { // 始点
for (int j = 0; j < verN; j++) { // 終点
if (d[i][k] != INF && d[k][j] != INF)
d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
}
}
}
return d;
}
}
signed
main() {
cin >> N >> M;
Graph g(N);
REP(i, M) {
cin >> A >> B;
A--, B--;
g.add_undirected_edge(A, B);
}
REP(i, N) {
cout << g.adj_list[i].size() << endl;
}
} | a.cc:208:2: error: expected ';' after class definition
208 | }
| ^
| ;
|
s996439385 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
for (int j = 0; j < M; j++) {
int a, b;
cin >> a >> b;
vector<int> count(N);
count.at(a - 1) += 1;
count.at(b - 1) += 1;
}
for (int i = 0; i < count.size(); i++) {
cout << count.at(i) << endl;
}
} | a.cc: In function 'int main()':
a.cc:15:29: error: overloaded function with no contextual type information
15 | for (int i = 0; i < count.size(); i++) {
| ^~~~
a.cc:16:19: error: overloaded function with no contextual type information
16 | cout << count.at(i) << endl;
| ^~
|
s366410522 | p03720 | C | #include<stdio.h>
int main()
{
int n,m,i;
scanf("%d %d",&n,&m);
int road[n+1],point[2m];
for(i=0;i<n;++i)
{
road[n]=0;
}
for(i=0;i<m;++i)
{
scanf("%d %d",&point[2i],&point[2i+1]);
road[point[2i]]++;
road[point[2i+1]]++;
}
for(i=1;i<n+1;++i)
{ printf("%d\n",road[i]);
}
return 0;
} | main.c: In function 'main':
main.c:6:21: error: invalid suffix "m" on integer constant
6 | int road[n+1],point[2m];
| ^~
|
s904039114 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> vec(M * 2);
for (int i = 0; i < M; i++) {
cin << vec.at(i) << vec.at(i+1);
i++;
}
vector<int> result(M * 2);
for (int i = 0; i < vec.size(); i++) {
result.at(vec.at(i) - 1)++;
}
for (int i = 0; i < result.size(); i++) {
cout >> result.at(i) >> endl;
}
}
| 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 '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
9 | cin << vec.at(i) << vec.at(i+1);
| ~~~ ^~ ~~~~~~~~~
| | |
| | __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}
| std::istream {aka std::basic_istream<char>}
a.cc:9:9: note: candidate: 'operator<<(int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int})' (built-in)
9 | cin << vec.at(i) << vec.at(i+1);
| ~~~~^~~~~~~~~~~~
a.cc:9:9: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int'
In file included from /usr/include/c++/14/regex:68,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181,
from a.cc:1:
/usr/include/c++/14/bits/regex.h:1715:5: note: candidate: 'template<class _Ch_type, class _Ch_traits, class _Bi_iter> std::basic_ostream<_CharT, _Traits>& std::__cxx11::operator<<(std::basic_ostream<_CharT, _Traits>&, const sub_match<_Bi_iter>&)'
1715 | operator<<(basic_ostream<_Ch_type, _Ch_traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/regex.h:1715:5: note: template argument deduction/substitution failed:
a.cc:9:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
9 | cin << vec.at(i) << vec.at(i+1);
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:41:
/usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)'
125 | operator<<(byte __b, _IntegerType __shift) noexcept
| ^~~~~~~~
/usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed:
a.cc:9:5: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte'
9 | cin << vec.at(i) << vec.at(i+1);
| ^~~
In file included from /usr/include/c++/14/bits/basic_string.h:47,
from /usr/include/c++/14/string:54,
from /usr/include/c++/14/bitset:52,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)'
763 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed:
a.cc:9:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
9 | cin << vec.at(i) << vec.at(i+1);
| ^
/usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)'
4077 | operator<<(basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed:
a.cc:9:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
9 | cin << vec.at(i) << vec.at(i+1);
| ^
/usr/include/c++/14/bitset:1687:5: note: candidate: 'template<class _CharT, class _Traits, long unsigned int _Nb> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const bitset<_Nb>&)'
1687 | operator<<(std::basic_ostream<_CharT, _Traits>& __os,
| ^~~~~~~~
/usr/include/c++/14/bitset:1687:5: note: template argument deduction/substitution failed:
a.cc:9:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
9 | cin << vec.at(i) << vec.at(i+1);
| ^
In file included from /usr/include/c++/14/bits/ios_base.h:46,
from /usr/include/c++/14/streambuf:43,
from /usr/include/c++/14/bits/streambuf_iterator.h:35,
from /usr/include/c++/14/iterator:66,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:54:
/usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)'
339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
| ^~~~~~~~
/usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed:
a.cc:9:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
9 | cin << vec.at(i) << vec.at(i+1);
| ^
In file included from /usr/include/c++/14/memory:80,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:56:
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: candidate: 'template<class _Ch, class _Tr, class _Tp, __gnu_cxx::_Lock_policy _Lp> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __shared_ptr<_Tp, _Lp>&)'
70 | operator<<(std::basic_ostream<_Ch, _Tr>& __os,
| ^~~~~~~~
/usr/include/c++/14/bits/shared_ptr.h:70:5: note: template argument deduction/substitution failed:
a.cc:9:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
9 | cin << vec.at(i) << vec.at(i+1);
| ^
In file included from /usr/include/c++/14/istream:41,
from /usr/include/c++/14/sstream:40,
from /usr/include/c++/14/complex:45,
from /usr/include/c++/14/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)'
563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed:
a.cc:9:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
9 | cin << vec.at(i) << vec.at(i+1);
| ^
/usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)'
573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed:
a.cc:9:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
9 | cin << vec.at(i) << vec.at(i+1);
| ^
/usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)'
579 | operator<<(basic_ostream<char, _Traits>& __out, char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed:
a.cc:9:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
9 | cin << vec.at(i) << vec.at(i+1);
| ^
/usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)'
590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed:
a.cc:9:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
9 | cin << vec.at(i) << vec.at(i+1);
| ^
/usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)'
595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
| ^~~~~~~~
/usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed:
a.cc:9:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>'
9 | cin << vec.at(i) << vec.at(i+1);
| ^
/usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)'
654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
| ^~~~~~~~
/usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed:
a.cc:9:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
9 | cin << vec.at(i) << vec.at(i+1);
| ^
In file included from /usr/include/c++/14/ostream:1022:
/usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)'
307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
| ^~~~~~~~
/usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed:
a.cc:9:20: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>'
|
s101507015 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M ;
int A[M] ,B[M];
for ( int i=0 ; i < M ;i++){
cin >> A[i] >> B[i] ;
}
int road[N] ;
for ( int i=0 ; i<N ; i++ ){
road[i]=0
}
for ( int i=0 ; i < M ; i++){
road[A[i]-1]++;
road[B[i]-1]++;
}
for ( int i=0 ; i< N ; i++){
cout << road[i] << endl;
}
} | a.cc: In function 'int main()':
a.cc:13:14: error: expected ';' before '}' token
13 | road[i]=0
| ^
| ;
14 | }
| ~
|
s423669334 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M ;
int A[M] ,B[M];
for ( int i=0 ; i < M ;i++){
cin >> A[i] >> B[i] ;
}
int road[N] = 0;
for ( int i=0 ; i < M ; i++){
road[A[i]-1]++;
road[B[i]-1]++;
}
for ( int i=0 ; i< N ; i++){
cout << road[i] << endl;
}
} | a.cc: In function 'int main()':
a.cc:11:17: error: array must be initialized with a brace-enclosed initializer
11 | int road[N] = 0;
| ^
|
s357444348 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M ;
int A[M] ,B[M];
for ( int i=0 ; i < M ;i++){
cin >> A[i] >> 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++){
cout << road[i] << endl;
}
} | a.cc: In function 'int main()':
a.cc:13:9: error: 'road' cannot be used as a function
13 | road(A[i]-1)++;
| ~~~~^~~~~~~~
a.cc:14:9: error: 'road' cannot be used as a function
14 | road(B[i]-1)++;
| ~~~~^~~~~~~~
|
s909766031 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M ;
int A[M] ,B[M];
for ( int i=0 ; i < M ;i++){
cin >> A(i) >> 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++){
cout << road(i) << endl;
}
} | a.cc: In function 'int main()':
a.cc:9:13: error: 'A' cannot be used as a function
9 | cin >> A(i) >> B(i) ;
| ~^~~
a.cc:9:21: error: 'B' cannot be used as a function
9 | cin >> A(i) >> B(i) ;
| ~^~~
a.cc:13:11: error: 'A' cannot be used as a function
13 | road(A(i)-1)++;
| ~^~~
a.cc:13:16: error: 'road' cannot be used as a function
13 | road(A(i)-1)++;
| ^
a.cc:14:11: error: 'B' cannot be used as a function
14 | road(B(i)-1)++;
| ~^~~
a.cc:14:16: error: 'road' cannot be used as a function
14 | road(B(i)-1)++;
| ^
a.cc:17:17: error: 'road' cannot be used as a function
17 | cout << road(i) << endl;
| ~~~~^~~
|
s462199379 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M ;
int A(M) ,B(M);
for ( int i=0 ; i < M ;i++){
cin >> A(i) >> 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++){
cout << road(i) << endl;
}
} | a.cc: In function 'int main()':
a.cc:9:13: error: 'A' cannot be used as a function
9 | cin >> A(i) >> B(i) ;
| ~^~~
a.cc:9:21: error: 'B' cannot be used as a function
9 | cin >> A(i) >> B(i) ;
| ~^~~
a.cc:13:11: error: 'A' cannot be used as a function
13 | road(A(i)-1)++;
| ~^~~
a.cc:13:16: error: 'road' cannot be used as a function
13 | road(A(i)-1)++;
| ^
a.cc:14:11: error: 'B' cannot be used as a function
14 | road(B(i)-1)++;
| ~^~~
a.cc:14:16: error: 'road' cannot be used as a function
14 | road(B(i)-1)++;
| ^
a.cc:17:17: error: 'road' cannot be used as a function
17 | cout << road(i) << endl;
| ~~~~^~~
|
s765403525 | p03720 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N,M;
cin >> N >> M
int A(M) ,B(M);
for ( int i=0 ; i < M ;i++){
cin >> A(i) >> 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++){
cout << road(i) << endl;
}
} | a.cc: In function 'int main()':
a.cc:6:16: error: expected ';' before 'int'
6 | cin >> N >> M
| ^
| ;
7 | int A(M) ,B(M);
| ~~~
a.cc:9:12: error: 'A' was not declared in this scope
9 | cin >> A(i) >> B(i) ;
| ^
a.cc:9:20: error: 'B' was not declared in this scope
9 | cin >> A(i) >> B(i) ;
| ^
a.cc:13:10: error: 'A' was not declared in this scope
13 | road(A(i)-1)++;
| ^
a.cc:13:16: error: 'road' cannot be used as a function
13 | road(A(i)-1)++;
| ^
a.cc:14:10: error: 'B' was not declared in this scope
14 | road(B(i)-1)++;
| ^
a.cc:14:16: error: 'road' cannot be used as a function
14 | road(B(i)-1)++;
| ^
a.cc:17:17: error: 'road' cannot be used as a function
17 | cout << road(i) << endl;
| ~~~~^~~
|
s031381959 | 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;
for (int j=0 ; j< 2*M ; j++){
if ( s[j]==i+1){
count++;
}
}
cout << count << endl;
}
}
| a.cc: In function 'int main()':
a.cc:14:10: error: 's' was not declared in this scope
14 | if ( s[j]==i+1){
| ^
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.