#include <bits/stdc++.h>
#include "closing.h"
using namespace std; typedef long long ll; int max_score_seperate(int n, int x, int y, ll k, vector<int> u, vector<int> v, vector<int> w) { priority_queue<pair<ll, ll>> finalQX, finalQY, doubleQ; vector<vector<pair<ll, ll>>> adj(n); for (int i = 0; i < w.size(); i++) { adj[u[i]].push_back({-w[i], v[i]}); adj[v[i]].push_back({-w[i], u[i]}); } vector<ll> distX(n, 1ll << 62ll), distY(n, 1ll << 62ll); vector<bool> vstX(n), vstY(n); priority_queue<pair<ll, ll>> q; distX[x] = distY[y] = 0; q.push({0, x}); while (!q.empty()) { ll node = q.top().second; q.pop(); if (vstX[node]) continue; vstX[node] = true; for (auto &e : adj[node]) { distX[e.second] = min(distX[e.second], distX[node] - e.first); q.push({-distX[e.second], e.second}); } } q.push({0, y}); while (!q.empty()) { ll node = q.top().second; q.pop(); if (vstY[node]) continue; vstY[node] = true; for (auto &e : adj[node]) { distY[e.second] = min(distY[e.second], distY[node] - e.first); q.push({-distY[e.second], e.second}); } } finalQX.push({0, x}); finalQY.push({0, y}); vstX = vector<bool>(n); vstY = vector<bool>(n); vector<bool> nbX(n), nbY(n); nbX[x] = nbY[y] = true; ll res = 0; while (!finalQX.empty() || !finalQY.empty() || !doubleQ.empty()) { // Ensure no visited
ll t = finalQX.empty() ? 0 : finalQX.top().second; while (vstX[t] && !finalQX.empty()) { finalQX.pop(); t = finalQX.top().second; } t = finalQY.empty() ? 0 : finalQY.top().second; while (vstY[t] && !finalQY.empty()) { finalQY.pop(); t = finalQY.top().second; } t = doubleQ.empty() ? 0 : doubleQ.top().second; while ((vstX[t] || vstY[t]) && !doubleQ.empty()) { doubleQ.pop(); t = doubleQ.top().second; } if (!doubleQ.empty()) { ll x2 = 1ll << 62ll, y2 = 1ll << 62ll, xy = 1ll << 62ll; if (!finalQX.empty() && !finalQY.empty()) xy = -finalQX.top().first - finalQY.top().first; if (finalQX.size() >= 2) { auto i = finalQX.top(); finalQX.pop(); t = finalQX.top().second; while (vstX[t] && !finalQX.empty()) { finalQX.pop(); t = finalQX.top().second; } if (finalQX.empty()) { finalQX.push(i); goto skipX2; } x2 = -i.first - finalQX.top().first; finalQX.push(i); } skipX2: if (finalQY.size() >= 2) { auto i = finalQY.top(); finalQY.pop(); t = finalQY.top().second; while (vstY[t] && !finalQY.empty()) { finalQY.pop(); t = finalQY.top().second; } if (finalQY.empty()) { finalQY.push(i); goto skipY2; } y2 = -i.first - finalQY.top().first; finalQY.push(i); } skipY2: ll dub = -doubleQ.top().first; if (dub < x2 && dub < y2 && dub < xy && dub <= k) { auto node = doubleQ.top(); doubleQ.pop(); vstX[node.second] = vstY[node.second] = true; for (auto &e : adj[node.second]) { nbX[e.second] = nbY[e.second] = true; finalQX.push({-(vstY[e.second] ? abs(distX[e.second] - distY[e.second]) : distX[e.second]), e.second}); finalQY.push({-(vstX[e.second] ? abs(distX[e.second] - distY[e.second]) : distY[e.second]), e.second}); doubleQ.push({-max(distX[e.second], distY[e.second]), e.second}); } k -= dub; res += 2; continue; } } if (finalQX.empty() && finalQY.empty()) break; ll x1 = 1ll << 62ll, y1 = 1ll << 62ll; if (!finalQX.empty()) x1 = -finalQX.top().first; if (!finalQY.empty()) y1 = -finalQY.top().first; if (x1 < y1) { // X
auto node = finalQX.top(); ll dist = -node.first; finalQX.pop(); if (dist > k) break; vstX[node.second] = true; for (auto &e : adj[node.second]) { nbX[e.second] = true; finalQX.push({-(vstY[e.second] ? abs(distX[e.second] - distY[e.second]) : distX[e.second]), e.second}); if (nbY[e.second]) doubleQ.push({-max(distX[e.second], distY[e.second]), e.second}); } if (!vstY[node.second] && nbY[node.second]) finalQY.push({-abs(distX[node.second] - distY[node.second]), node.second}); k -= dist; res++; } else { // Y
auto node = finalQY.top(); ll dist = -node.first; finalQY.pop(); if (dist > k) break; vstY[node.second] = true; for (auto &e : adj[node.second]) { nbY[e.second] = true; finalQY.push({-(vstX[e.second] ? abs(distX[e.second] - distY[e.second]) : distY[e.second]), e.second}); if (nbX[e.second]) doubleQ.push({-max(distX[e.second], distY[e.second]), e.second}); } if (!vstX[node.second] && nbX[node.second]) finalQX.push({-abs(distX[node.second] - distY[node.second]), node.second}); k -= dist; res++; } } return res;} int max_score_meet(int n, int x, int y, ll k, vector<int> u, vector<int> v, vector<int> w) { priority_queue<pair<ll, ll>> finalQX, finalQY, doubleQ; vector<vector<pair<ll, ll>>> adj(n); for (int i = 0; i < w.size(); i++) { adj[u[i]].push_back({-w[i], v[i]}); adj[v[i]].push_back({-w[i], u[i]}); } vector<ll> distX(n, 1ll << 62ll), distY(n, 1ll << 62ll); vector<bool> vstX(n), vstY(n); priority_queue<pair<ll, ll>> q; distX[x] = distY[y] = 0; q.push({0, x}); while (!q.empty()) { ll node = q.top().second; q.pop(); if (vstX[node]) continue; vstX[node] = true; for (auto &e : adj[node]) { distX[e.second] = min(distX[e.second], distX[node] - e.first); q.push({-distX[e.second], e.second}); } } q.push({0, y}); while (!q.empty()) { ll node = q.top().second; q.pop(); if (vstY[node]) continue; vstY[node] = true; for (auto &e : adj[node]) { distY[e.second] = min(distY[e.second], distY[node] - e.first); q.push({-distY[e.second], e.second}); } } finalQX.push({0, x}); finalQY.push({0, y}); vstX = vector<bool>(n); vstY = vector<bool>(n); vector<bool> nbX(n), nbY(n); nbX[x] = nbY[y] = true; ll res = 0; while (!finalQX.empty() || !finalQY.empty() || !doubleQ.empty()) { // Ensure no visited
ll t = finalQX.empty() ? 0 : finalQX.top().second; while (vstX[t] && !finalQX.empty()) { finalQX.pop(); t = finalQX.top().second; } t = finalQY.empty() ? 0 : finalQY.top().second; while (vstY[t] && !finalQY.empty()) { finalQY.pop(); t = finalQY.top().second; } t = doubleQ.empty() ? 0 : doubleQ.top().second; while ((vstX[t] || vstY[t]) && !doubleQ.empty()) { doubleQ.pop(); t = doubleQ.top().second; } if (!doubleQ.empty()) { ll x2 = 1ll << 62ll, y2 = 1ll << 62ll, xy = 1ll << 62ll; if (!finalQX.empty() && !finalQY.empty()) xy = -finalQX.top().first - finalQY.top().first; if (finalQX.size() >= 2) { auto i = finalQX.top(); finalQX.pop(); t = finalQX.top().second; while (vstX[t] && !finalQX.empty()) { finalQX.pop(); t = finalQX.top().second; } if (finalQX.empty()) { finalQX.push(i); goto skipX1; } x2 = -i.first - finalQX.top().first; finalQX.push(i); } skipX1: if (finalQY.size() >= 2) { auto i = finalQY.top(); finalQY.pop(); t = finalQY.top().second; while (vstY[t] && !finalQY.empty()) { finalQY.pop(); t = finalQY.top().second; } if (finalQY.empty()) { finalQY.push(i); goto skipY1; } y2 = -i.first - finalQY.top().first; finalQY.push(i); } skipY1: ll dub = -doubleQ.top().first; if (dub < x2 && dub < y2 && dub < xy && dub <= k) { auto node = doubleQ.top(); doubleQ.pop(); vstX[node.second] = vstY[node.second] = true; for (auto &e : adj[node.second]) { nbX[e.second] = nbY[e.second] = true; finalQX.push({-(vstY[e.second] ? abs(distX[e.second] - distY[e.second]) : distX[e.second]), e.second}); finalQY.push({-(vstX[e.second] ? abs(distX[e.second] - distY[e.second]) : distY[e.second]), e.second}); doubleQ.push({-max(distX[e.second], distY[e.second]), e.second}); } k -= dub; res += 2; break; } } if (finalQX.empty() && finalQY.empty()) break; ll x1 = 1ll << 62ll, y1 = 1ll << 62ll; if (!finalQX.empty()) x1 = -finalQX.top().first; if (!finalQY.empty()) y1 = -finalQY.top().first; if (x1 < y1) { // X
auto node = finalQX.top(); ll dist = -node.first; finalQX.pop(); if (dist > k) break; vstX[node.second] = true; for (auto &e : adj[node.second]) { if (distY[e.second] > distY[node.second]) continue; nbX[e.second] = true; finalQX.push({-(vstY[e.second] ? abs(distX[e.second] - distY[e.second]) : distX[e.second]), e.second}); if (nbY[e.second]) doubleQ.push({-max(distX[e.second], distY[e.second]), e.second}); } if (!vstY[node.second] && nbY[node.second]) finalQY.push({-abs(distX[node.second] - distY[node.second]), node.second}); k -= dist; res++; if (vstY[node.second]) break; } else { // Y
auto node = finalQY.top(); ll dist = -node.first; finalQY.pop(); if (dist > k) break; vstY[node.second] = true; for (auto &e : adj[node.second]) { if (distX[e.second] > distX[node.second]) continue; nbY[e.second] = true; finalQY.push({-(vstX[e.second] ? abs(distX[e.second] - distY[e.second]) : distY[e.second]), e.second}); if (nbX[e.second]) doubleQ.push({-max(distX[e.second], distY[e.second]), e.second}); } if (!vstX[node.second] && nbX[node.second]) finalQX.push({-abs(distX[node.second] - distY[node.second]), node.second}); k -= dist; res++; if (vstX[node.second]) break; } } for (int i = 0; i < n; i++) { if (vstX[i]) { for (auto &e : adj[i]) { nbX[e.second] = true; finalQX.push({-(vstY[e.second] ? abs(distX[e.second] - distY[e.second]) : distX[e.second]), e.second}); if (nbY[e.second]) doubleQ.push({-max(distX[e.second], distY[e.second]), e.second}); } } if (vstY[i]) { for (auto &e : adj[i]) { nbY[e.second] = true; finalQY.push({-(vstX[e.second] ? abs(distX[e.second] - distY[e.second]) : distY[e.second]), e.second}); if (nbX[e.second]) doubleQ.push({-max(distX[e.second], distY[e.second]), e.second}); } }if (vstY[i]&&vstX[i]) { for (auto &e : adj[i]) { nbY[e.second] = true; doubleQ.push({-max(distX[e.second], distY[e.second]), e.second}); } } } for (int i = 0; i < n; i++) { if (vstX[i]) { if (!vstY[i] && nbY[i]) finalQY.push({-abs(distX[i] - distY[i]), i}); } if (vstY[i]) { if (!vstX[i] && nbX[i]) finalQX.push({-abs(distX[i] - distY[i]), i}); } } ////////////////////////////////////////
while (!finalQX.empty() || !finalQY.empty() || !doubleQ.empty()) { // Ensure no visited
ll t = finalQX.empty() ? 0 : finalQX.top().second; while (vstX[t] && !finalQX.empty()) { finalQX.pop(); t = finalQX.top().second; } t = finalQY.empty() ? 0 : finalQY.top().second; while (vstY[t] && !finalQY.empty()) { finalQY.pop(); t = finalQY.top().second; } t = doubleQ.empty() ? 0 : doubleQ.top().second; while ((vstX[t] || vstY[t]) && !doubleQ.empty()) { doubleQ.pop(); t = doubleQ.top().second; } if (!doubleQ.empty()) { ll x2 = 1ll << 62ll, y2 = 1ll << 62ll, xy = 1ll << 62ll; if (!finalQX.empty() && !finalQY.empty()) xy = -finalQX.top().first - finalQY.top().first; if (finalQX.size() >= 2) { auto i = finalQX.top(); finalQX.pop(); t = finalQX.top().second; while (vstX[t] && !finalQX.empty()) { finalQX.pop(); t = finalQX.top().second; } if (finalQX.empty()) { finalQX.push(i); goto skipX; } x2 = -i.first - finalQX.top().first; finalQX.push(i); } skipX: if (finalQY.size() >= 2) { auto i = finalQY.top(); finalQY.pop(); t = finalQY.top().second; while (vstY[t] && !finalQY.empty()) { finalQY.pop(); t = finalQY.top().second; } if (finalQY.empty()) { finalQY.push(i); goto skipY; } y2 = -i.first - finalQY.top().first; finalQY.push(i); } skipY: ll dub = -doubleQ.top().first; if (dub < x2 && dub < y2 && dub < xy && dub <= k) { auto node = doubleQ.top(); doubleQ.pop(); vstX[node.second] = vstY[node.second] = true; for (auto &e : adj[node.second]) { nbX[e.second] = nbY[e.second] = true; finalQX.push({-(vstY[e.second] ? abs(distX[e.second] - distY[e.second]) : distX[e.second]), e.second}); finalQY.push({-(vstX[e.second] ? abs(distX[e.second] - distY[e.second]) : distY[e.second]), e.second}); doubleQ.push({-max(distX[e.second], distY[e.second]), e.second}); } k -= dub; res += 2; continue; } } if (finalQX.empty() && finalQY.empty()) break; ll x1 = 1ll << 62ll, y1 = 1ll << 62ll; if (!finalQX.empty()) x1 = -finalQX.top().first; if (!finalQY.empty()) y1 = -finalQY.top().first; if (x1 < y1) { // X
auto node = finalQX.top(); ll dist = -node.first; finalQX.pop(); if (dist > k) break; vstX[node.second] = true; for (auto &e : adj[node.second]) { nbX[e.second] = true; finalQX.push({-(vstY[e.second] ? abs(distX[e.second] - distY[e.second]) : distX[e.second]), e.second}); if (nbY[e.second]) doubleQ.push({-max(distX[e.second], distY[e.second]), e.second}); } if (!vstY[node.second] && nbY[node.second]) finalQY.push({-abs(distX[node.second] - distY[node.second]), node.second}); k -= dist; res++; } else { // Y
auto node = finalQY.top(); ll dist = -node.first; finalQY.pop(); if (dist > k) break; vstY[node.second] = true; for (auto &e : adj[node.second]) { nbY[e.second] = true; finalQY.push({-(vstX[e.second] ? abs(distX[e.second] - distY[e.second]) : distY[e.second]), e.second}); if (nbX[e.second]) doubleQ.push({-max(distX[e.second], distY[e.second]), e.second}); } if (!vstX[node.second] && nbX[node.second]) finalQX.push({-abs(distX[node.second] - distY[node.second]), node.second}); k -= dist; res++; } } return res;} int max_score(int n, int x, int y, ll k, vector<int> u, vector<int> v, vector<int> w) { ll sep = max_score_seperate(n, x, y, k, u, v, w); ll meet = max_score_meet(n, x, y, k, u, v, w); ll res = max(sep, meet); return res;}
Compilation message
closing.cpp: In function 'int max_score_seperate(int, int, int, ll, std::vector<int>, std::vector<int>, std::vector<int>)':
closing.cpp:3:261: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
3 | using namespace std; typedef long long ll; int max_score_seperate(int n, int x, int y, ll k, vector<int> u, vector<int> v, vector<int> w) { priority_queue<pair<ll, ll>> finalQX, finalQY, doubleQ; vector<vector<pair<ll, ll>>> adj(n); for (int i = 0; i < w.size(); i++) { adj[u[i]].push_back({-w[i], v[i]}); adj[v[i]].push_back({-w[i], u[i]}); } vector<ll> distX(n, 1ll << 62ll), distY(n, 1ll << 62ll); vector<bool> vstX(n), vstY(n); priority_queue<pair<ll, ll>> q; distX[x] = distY[y] = 0; q.push({0, x}); while (!q.empty()) { ll node = q.top().second; q.pop(); if (vstX[node]) continue; vstX[node] = true; for (auto &e : adj[node]) { distX[e.second] = min(distX[e.second], distX[node] - e.first); q.push({-distX[e.second], e.second}); } } q.push({0, y}); while (!q.empty()) { ll node = q.top().second; q.pop(); if (vstY[node]) continue; vstY[node] = true; for (auto &e : adj[node]) { distY[e.second] = min(distY[e.second], distY[node] - e.first); q.push({-distY[e.second], e.second}); } } finalQX.push({0, x}); finalQY.push({0, y}); vstX = vector<bool>(n); vstY = vector<bool>(n); vector<bool> nbX(n), nbY(n); nbX[x] = nbY[y] = true; ll res = 0; while (!finalQX.empty() || !finalQY.empty() || !doubleQ.empty()) { // Ensure no visited
| ~~^~~~~~~~~~
closing.cpp: In function 'int max_score_meet(int, int, int, ll, std::vector<int>, std::vector<int>, std::vector<int>)':
closing.cpp:6:877: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
6 | auto node = finalQY.top(); ll dist = -node.first; finalQY.pop(); if (dist > k) break; vstY[node.second] = true; for (auto &e : adj[node.second]) { nbY[e.second] = true; finalQY.push({-(vstX[e.second] ? abs(distX[e.second] - distY[e.second]) : distY[e.second]), e.second}); if (nbX[e.second]) doubleQ.push({-max(distX[e.second], distY[e.second]), e.second}); } if (!vstX[node.second] && nbX[node.second]) finalQX.push({-abs(distX[node.second] - distY[node.second]), node.second}); k -= dist; res++; } } return res;} int max_score_meet(int n, int x, int y, ll k, vector<int> u, vector<int> v, vector<int> w) { priority_queue<pair<ll, ll>> finalQX, finalQY, doubleQ; vector<vector<pair<ll, ll>>> adj(n); for (int i = 0; i < w.size(); i++) { adj[u[i]].push_back({-w[i], v[i]}); adj[v[i]].push_back({-w[i], u[i]}); } vector<ll> distX(n, 1ll << 62ll), distY(n, 1ll << 62ll); vector<bool> vstX(n), vstY(n); priority_queue<pair<ll, ll>> q; distX[x] = distY[y] = 0; q.push({0, x}); while (!q.empty()) { ll node = q.top().second; q.pop(); if (vstX[node]) continue; vstX[node] = true; for (auto &e : adj[node]) { distX[e.second] = min(distX[e.second], distX[node] - e.first); q.push({-distX[e.second], e.second}); } } q.push({0, y}); while (!q.empty()) { ll node = q.top().second; q.pop(); if (vstY[node]) continue; vstY[node] = true; for (auto &e : adj[node]) { distY[e.second] = min(distY[e.second], distY[node] - e.first); q.push({-distY[e.second], e.second}); } } finalQX.push({0, x}); finalQY.push({0, y}); vstX = vector<bool>(n); vstY = vector<bool>(n); vector<bool> nbX(n), nbY(n); nbX[x] = nbY[y] = true; ll res = 0; while (!finalQX.empty() || !finalQY.empty() || !doubleQ.empty()) { // Ensure no visited
| ~~^~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
117 ms |
27928 KB |
Output is correct |
2 |
Correct |
120 ms |
28048 KB |
Output is correct |
3 |
Correct |
77 ms |
4700 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
344 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
344 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
344 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
344 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
344 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
1 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
344 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
344 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
344 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
1 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
1 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
4 ms |
344 KB |
Output is correct |
26 |
Correct |
4 ms |
604 KB |
Output is correct |
27 |
Correct |
2 ms |
764 KB |
Output is correct |
28 |
Correct |
3 ms |
860 KB |
Output is correct |
29 |
Correct |
2 ms |
944 KB |
Output is correct |
30 |
Correct |
1 ms |
604 KB |
Output is correct |
31 |
Correct |
2 ms |
856 KB |
Output is correct |
32 |
Correct |
2 ms |
860 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
432 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
352 KB |
Output is correct |
24 |
Correct |
0 ms |
352 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
1 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
432 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
352 KB |
Output is correct |
36 |
Correct |
0 ms |
352 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
1 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
436 KB |
Output is correct |
41 |
Correct |
0 ms |
352 KB |
Output is correct |
42 |
Correct |
0 ms |
352 KB |
Output is correct |
43 |
Correct |
0 ms |
444 KB |
Output is correct |
44 |
Correct |
0 ms |
352 KB |
Output is correct |
45 |
Correct |
0 ms |
352 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
1 ms |
348 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
444 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
1 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
1 ms |
348 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
1 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
432 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
352 KB |
Output is correct |
43 |
Correct |
0 ms |
352 KB |
Output is correct |
44 |
Correct |
1 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
0 ms |
436 KB |
Output is correct |
48 |
Correct |
0 ms |
352 KB |
Output is correct |
49 |
Correct |
0 ms |
352 KB |
Output is correct |
50 |
Correct |
0 ms |
444 KB |
Output is correct |
51 |
Correct |
0 ms |
352 KB |
Output is correct |
52 |
Correct |
0 ms |
352 KB |
Output is correct |
53 |
Correct |
0 ms |
348 KB |
Output is correct |
54 |
Correct |
1 ms |
348 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
0 ms |
444 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Incorrect |
1 ms |
348 KB |
2nd lines differ - on the 1st token, expected: '57', found: '56' |
59 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
1 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
1 ms |
348 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
4 ms |
344 KB |
Output is correct |
27 |
Correct |
4 ms |
604 KB |
Output is correct |
28 |
Correct |
2 ms |
764 KB |
Output is correct |
29 |
Correct |
3 ms |
860 KB |
Output is correct |
30 |
Correct |
2 ms |
944 KB |
Output is correct |
31 |
Correct |
1 ms |
604 KB |
Output is correct |
32 |
Correct |
2 ms |
856 KB |
Output is correct |
33 |
Correct |
2 ms |
860 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
432 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
0 ms |
348 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
352 KB |
Output is correct |
51 |
Correct |
0 ms |
352 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
1 ms |
348 KB |
Output is correct |
54 |
Correct |
0 ms |
348 KB |
Output is correct |
55 |
Correct |
0 ms |
436 KB |
Output is correct |
56 |
Correct |
0 ms |
352 KB |
Output is correct |
57 |
Correct |
0 ms |
352 KB |
Output is correct |
58 |
Correct |
0 ms |
444 KB |
Output is correct |
59 |
Correct |
0 ms |
352 KB |
Output is correct |
60 |
Correct |
0 ms |
352 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
1 ms |
348 KB |
Output is correct |
63 |
Correct |
0 ms |
348 KB |
Output is correct |
64 |
Correct |
0 ms |
444 KB |
Output is correct |
65 |
Correct |
0 ms |
348 KB |
Output is correct |
66 |
Incorrect |
1 ms |
348 KB |
2nd lines differ - on the 1st token, expected: '57', found: '56' |
67 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
344 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
1 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
1 ms |
348 KB |
Output is correct |
24 |
Correct |
1 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
4 ms |
344 KB |
Output is correct |
27 |
Correct |
4 ms |
604 KB |
Output is correct |
28 |
Correct |
2 ms |
764 KB |
Output is correct |
29 |
Correct |
3 ms |
860 KB |
Output is correct |
30 |
Correct |
2 ms |
944 KB |
Output is correct |
31 |
Correct |
1 ms |
604 KB |
Output is correct |
32 |
Correct |
2 ms |
856 KB |
Output is correct |
33 |
Correct |
2 ms |
860 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
1 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
0 ms |
432 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
0 ms |
348 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
352 KB |
Output is correct |
51 |
Correct |
0 ms |
352 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
1 ms |
348 KB |
Output is correct |
54 |
Correct |
0 ms |
348 KB |
Output is correct |
55 |
Correct |
0 ms |
436 KB |
Output is correct |
56 |
Correct |
0 ms |
352 KB |
Output is correct |
57 |
Correct |
0 ms |
352 KB |
Output is correct |
58 |
Correct |
0 ms |
444 KB |
Output is correct |
59 |
Correct |
0 ms |
352 KB |
Output is correct |
60 |
Correct |
0 ms |
352 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
1 ms |
348 KB |
Output is correct |
63 |
Correct |
0 ms |
348 KB |
Output is correct |
64 |
Correct |
0 ms |
444 KB |
Output is correct |
65 |
Correct |
0 ms |
348 KB |
Output is correct |
66 |
Incorrect |
1 ms |
348 KB |
2nd lines differ - on the 1st token, expected: '57', found: '56' |
67 |
Halted |
0 ms |
0 KB |
- |