Submission #98953

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
989532019-02-27 17:27:24kjain_1810Shell (info1cup18_shell)C++17
100 / 100
525 ms56968 KiB
// #include <bits/stdc++.h>
#include<cstdio>
#include<vector>
#define pb push_back
// #define f first
// #define s second
// #define ind(a) scanf("%d", &a)
#define inlld(a) scanf("%lld", &a)
// #define ind2(a, b) scanf("%d%d", &a, &b)
#define inlld2(a, b) scanf("%lld%lld", &a, &b)
// #define ind3(a, b, c) scanf("%d%d%d", &a, &b, &c)
#define inlld3(a, b, c) scanf("%lld%lld%lld", &a, &b, &c)
using namespace std;
const int N=1e6+5;
const int MOD=1e9+7;
typedef long long ll;
// typedef long double ld;
ll n, m, p, tovis[N], visord[N];
vector<ll>adj[N];
ll vis[N], nex[N], dp[N];
void dfs(ll u)
{
vis[u]=1;
if(visord[u]>0)
nex[u]=visord[u];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

shell.cpp: In function 'void dfs(ll)':
shell.cpp:33:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(ll a=0; a<adj[u].size(); a++)
                 ~^~~~~~~~~~~~~~
shell.cpp: In function 'void dfs2(ll)':
shell.cpp:51:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(ll a=0; a<adj[u].size(); a++)
                 ~^~~~~~~~~~~~~~
shell.cpp: In function 'int main()':
shell.cpp:12:30: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 #define inlld3(a, b, c) scanf("%lld%lld%lld", &a, &b, &c)
                         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
shell.cpp:64:5: note: in expansion of macro 'inlld3'
     inlld3(n, m, p);
     ^~~~~~
shell.cpp:8:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 #define inlld(a) scanf("%lld", &a)
                  ~~~~~^~~~~~~~~~~~
shell.cpp:66:9: note: in expansion of macro 'inlld'
         inlld(tovis[a]);
         ^~~~~
shell.cpp:10:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
 #define inlld2(a, b) scanf("%lld%lld", &a, &b)
                      ~~~~~^~~~~~~~~~~~~~~~~~~~
shell.cpp:81:9: note: in expansion of macro 'inlld2'
         inlld2(u, v);
         ^~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...