Submission #122378

#TimeUsernameProblemLanguageResultExecution timeMemory
122378bekzhan29Mousetrap (CEOI17_mousetrap)C++14
0 / 100
356 ms76536 KiB
//#include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <vector> #include <map> #include <unordered_map> #include <set> #include <queue> using namespace std; #define pb push_back #define mp make_pair #define INF 1e9 #define mod 1000000007 #define eps 1e-6 #define abs(x) ((x)>=0?(x):-(x)) #define y1 solai #define fi first #define se second typedef long long ll; void read(ll &x) { scanf("%lld",&x); } void read(ll &x, ll &y) { scanf("%lld%lld",&x,&y); } void read(ll &x, ll &y, ll &z) { scanf("%lld%lld%lld",&x,&y,&z); } void print(ll x) { printf("%lld ",x); } void println(ll x) { printf("%lld\n",x); } const ll N=1000100; ll n,t,m,x,y; vector<ll>v[N]; int main() { cin>>n>>t>>m; for(ll i=1;i<n;i++) { read(x,y); v[x].pb(y); v[y].pb(x); } println(v[m].size()-1); }

Compilation message (stderr)

mousetrap.cpp: In function 'void read(ll&)':
mousetrap.cpp:22:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld",&x);
  ~~~~~^~~~~~~~~~~
mousetrap.cpp: In function 'void read(ll&, ll&)':
mousetrap.cpp:26:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld%lld",&x,&y);
  ~~~~~^~~~~~~~~~~~~~~~~~
mousetrap.cpp: In function 'void read(ll&, ll&, ll&)':
mousetrap.cpp:30:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld%lld%lld",&x,&y,&z);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...