Submission #948942

#TimeUsernameProblemLanguageResultExecution timeMemory
948942IBory라멘 (JOI14_ramen)C++17
0 / 100
0 ms348 KiB
#include <bits/stdc++.h> #include "ramen.h" using namespace std; void Ramen(int N) { vector<int> L, R; for (int i = 0; i < N - 1; i += 2) { int n = Compare(i, i + 1); (n ? R : L).push_back(i + 1); (n ? L : R).push_back(i); } if (N & 1) L.push_back(N - 1), R.push_back(N - 1); int a = L[0], b = R[0]; for (int i = 1; i < L.size(); ++i) if (Compare(a, L[i])) a = L[i]; for (int i = 1; i < R.size(); ++i) if (Compare(R[i], b)) b = R[i]; Answer(a, b); }

Compilation message (stderr)

ramen.cpp: In function 'void Ramen(int)':
ramen.cpp:15:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   15 |  for (int i = 1; i < L.size(); ++i) if (Compare(a, L[i])) a = L[i];
      |                  ~~^~~~~~~~~~
ramen.cpp:16:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |  for (int i = 1; i < R.size(); ++i) if (Compare(R[i], b)) b = R[i];
      |                  ~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...