Submission #1066335

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10663352024-08-19 18:15:59sammyuriSoccer (JOI17_soccer)C++17
100 / 100
226 ms17104 KiB
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll dist[505][505];
ll dist_2[505][505][5];
ll a, b, c;
inline ll pack(pair<ll, pair<int, pair<int, int>>> xx) {
return -(xx.second.first + 5ll * (xx.first * 360000ll + (600ll * xx.second.second.first + xx.second.second.second)));
}
inline pair<ll, pair<int, pair<int, int>>> unpack(ll xx) {
xx = -xx;
int aa = xx % 5;
ll k = (xx / 5) % 360000ll;
return {xx / (5ll * 360000ll), {aa, {k / 600ll, k % 600ll}}};
}
priority_queue<ll> pq;
int ddx[] = {0, 0, 1, -1};
int ddy[] = {1, -1, 0, 0};
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
memset(dist, -1, sizeof(dist));
int h, w; cin >> h >> w;
h ++; w ++;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

soccer.cpp: In function 'int main()':
soccer.cpp:12:112: warning: 'startj' may be used uninitialized in this function [-Wmaybe-uninitialized]
   12 |     return -(xx.second.first + 5ll * (xx.first * 360000ll + (600ll * xx.second.second.first + xx.second.second.second)));
      |                                                                                               ~~~~~~~~~~~~~~~~~^~~~~~
soccer.cpp:34:17: note: 'startj' was declared here
   34 |     int starti, startj, endi, endj;
      |                 ^~~~~~
soccer.cpp:12:87: warning: 'starti' may be used uninitialized in this function [-Wmaybe-uninitialized]
   12 |     return -(xx.second.first + 5ll * (xx.first * 360000ll + (600ll * xx.second.second.first + xx.second.second.second)));
      |                                                                      ~~~~~~~~~~~~~~~~~^~~~~
soccer.cpp:34:9: note: 'starti' was declared here
   34 |     int starti, startj, endi, endj;
      |         ^~~~~~
soccer.cpp:118:33: warning: 'endj' may be used uninitialized in this function [-Wmaybe-uninitialized]
  118 |     cout << dist_2[endi][endj][4] << endl;
      |                                 ^
soccer.cpp:118:33: warning: 'endi' may be used uninitialized in this function [-Wmaybe-uninitialized]
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...