Submission #491814

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4918142021-12-04 14:49:23mickytanawinRobot (JOI21_ho_t4)C++17
34 / 100
3068 ms48148 KiB
#include <bits/stdc++.h>
using namespace std;
enum state {
ME = 0, OTHER = 1
};
#define f first
#define s second
typedef long long lli;
typedef pair<int, int> pii;
typedef pair<int, lli> pil;
typedef tuple<int, int, int> tiii;
typedef tuple<lli, int, state, int> tlisi;
const int N = 1e5 + 5;
const int M = 2e5 + 5;
map<int, pil> sum[N];
map<int, lli> distMe[N];
set<int> visitedMe[N];
vector<pii> adj[N];
lli distOther[N];
bool visitedOther[N];
pii edges[M];
void addColorEdge(int u, int c, int w){
map<int, pil>::iterator itr = sum[u].find(c);
if(itr == sum[u].end()){
sum[u][c].f = 1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:84:48: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   84 |                 if(sum[u][c].f == 1 || uc == c && sum[u][c].f == 2){
      |                                        ~~~~~~~~^~~~~~~~~~~~~~~~~~~
Main.cpp:41:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   41 |     scanf("%d%d", &nVertex, &nEdge);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:44:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   44 |         scanf("%d%d%d%d", &u, &v, &c, &w);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...