Submission #891530

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8915302023-12-23 07:27:55coding_monk3Valley (BOI19_valley)C++17
0 / 100
136 ms34908 KiB
#include <bits/stdc++.h>
using namespace std;
// Miscellanous
#define gc getchar_unlocked
#define ll long long
#define ull unsigned long long
#define si(x) scanf("%d",&x)
#define si2(x,y) scanf("%d %d",&x,&y)
#define sl(x) scanf("%lld",&x)
#define sl2(x,y) scanf("%lld %lld",&x,&y)
#define sstr(s) cin >> s
#define pi(x) printf("%d\n",x)
#define pi2(x,y) printf("%d %d\n",x,y)
#define pl(x) printf("%lld\n",x)
#define pl2(x,y) printf("%lld %lld\n",x,y)
#define ps(s) cout << s << endl
#define py printf("YES\n")
#define pn printf("NO\n")
#define pnl printf("\n")
#define pb push_back
#define ff first
#define ss second
#define sz(v) (int)v.size()
#define all(v) v.begin(),v.end()
#define sortv(v) sort(all(v))
#define revsort(v) sort(v.rbegin(),v.rend())
#define reverse(v) reverse(all(v))
#define alla(arr,sz) arr,arr+sz
#define sorta(arr,sz) sort(alla(arr,sz))
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

valley.cpp: In function 'std::string uppercase(std::string)':
valley.cpp:42:30: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   42 | #define loop(i,s,e) for (int (i)=(s);(i)<(e);++(i))
      |                              ^
valley.cpp:47:18: note: in expansion of macro 'loop'
   47 | #define rep(i,n) loop(i,0,n)
      |                  ^~~~
valley.cpp:138:3: note: in expansion of macro 'rep'
  138 |   rep(i,n) if (s[i] >= 'a' && s[i] <= 'z') s[i] = s[i] - 'a' + 'A';
      |   ^~~
valley.cpp: In function 'std::string lowercase(std::string)':
valley.cpp:42:30: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   42 | #define loop(i,s,e) for (int (i)=(s);(i)<(e);++(i))
      |                              ^
valley.cpp:47:18: note: in expansion of macro 'loop'
   47 | #define rep(i,n) loop(i,0,n)
      |                  ^~~~
valley.cpp:144:3: note: in expansion of macro 'rep'
  144 |   rep(i,n) if (s[i] >= 'A' && s[i] <= 'Z') s[i] = s[i] - 'A' + 'a';
      |   ^~~
valley.cpp: In function 'void dfs1(int, int)':
valley.cpp:43:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   43 | #define loope(i,s,e) for (int (i)=(s);(i)<=(e);++(i))
      |                               ^
valley.cpp:48:19: note: in expansion of macro 'loope'
   48 | #define repn(i,n) loope(i,1,n)
      |                   ^~~~~
valley.cpp:188:5: note: in expansion of macro 'repn'
  188 |     repn(i,LOG-1) up[v][i] = up[up[v][i-1]][i-1];
      |     ^~~~
valley.cpp:43:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   43 | #define loope(i,s,e) for (int (i)=(s);(i)<=(e);++(i))
      |                               ^
valley.cpp:48:19: note: in expansion of macro 'loope'
   48 | #define repn(i,n) loope(i,1,n)
      |                   ^~~~~
valley.cpp:191:5: note: in expansion of macro 'repn'
  191 |     repn(i,LOG-1) upf[v][i] = min(upf[v][i-1], upf[up[v][i-1]][i-1]);
      |     ^~~~
valley.cpp: In function 'int main()':
valley.cpp:43:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
   43 | #define loope(i,s,e) for (int (i)=(s);(i)<=(e);++(i))
      |                               ^
valley.cpp:48:19: note: in expansion of macro 'loope'
   48 | #define repn(i,n) loope(i,1,n)
      |                   ^~~~~
valley.cpp:252:3: note: in expansion of macro 'repn'
  252 |   repn(i,n-1)
      |   ^~~~
valley.cpp:9:23: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 | #define si2(x,y) scanf("%d %d",&x,&y)
      |                  ~~~~~^~~~~~~~~~~~~~~
valley.cpp:69:30: note: in expansion of macro 'si2'
   69 | #define takei2(a,b) int a,b; si2(a,b)
      |                              ^~~
valley.cpp:248:3: note: in expansion of macro 'takei2'
  248 |   takei2(n,m);
      |   ^~~~~~
valley.cpp:8:20: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 | #define si(x) scanf("%d",&x)
      |               ~~~~~^~~~~~~~~
valley.cpp:68:25: note: in expansion of macro 'si'
   68 | #define takei(a) int a; si(a)
      |                         ^~
valley.cpp:249:3: note: in expansion of macro 'takei'
  249 |   takei(q); si(root);
      |   ^~~~~
valley.cpp:8:20: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 | #define si(x) scanf("%d",&x)
      |               ~~~~~^~~~~~~~~
valley.cpp:249:13: note: in expansion of macro 'si'
  249 |   takei(q); si(root);
      |             ^~
valley.cpp:9:23: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 | #define si2(x,y) scanf("%d %d",&x,&y)
      |                  ~~~~~^~~~~~~~~~~~~~~
valley.cpp:69:30: note: in expansion of macro 'si2'
   69 | #define takei2(a,b) int a,b; si2(a,b)
      |                              ^~~
valley.cpp:254:5: note: in expansion of macro 'takei2'
  254 |     takei2(u,v); takei(wt);
      |     ^~~~~~
valley.cpp:8:20: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 | #define si(x) scanf("%d",&x)
      |               ~~~~~^~~~~~~~~
valley.cpp:68:25: note: in expansion of macro 'si'
   68 | #define takei(a) int a; si(a)
      |                         ^~
valley.cpp:254:18: note: in expansion of macro 'takei'
  254 |     takei2(u,v); takei(wt);
      |                  ^~~~~
valley.cpp:8:20: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 | #define si(x) scanf("%d",&x)
      |               ~~~~~^~~~~~~~~
valley.cpp:68:25: note: in expansion of macro 'si'
   68 | #define takei(a) int a; si(a)
      |                         ^~
valley.cpp:259:15: note: in expansion of macro 'takei'
  259 |   while(m--) {takei(c); is_shop[c] = 1;}
      |               ^~~~~
valley.cpp:9:23: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 | #define si2(x,y) scanf("%d %d",&x,&y)
      |                  ~~~~~^~~~~~~~~~~~~~~
valley.cpp:69:30: note: in expansion of macro 'si2'
   69 | #define takei2(a,b) int a,b; si2(a,b)
      |                              ^~~
valley.cpp:272:5: note: in expansion of macro 'takei2'
  272 |     takei2(i,r);
      |     ^~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...