Submission #1270688

#TimeUsernameProblemLanguageResultExecution timeMemory
1270688nerrrminWorld Map (IOI25_worldmap)C++20
Compilation error
0 ms0 KiB
#include "worldmap.h" #define pb push_back #define f first #define s second #include <bits/stdc++.h> using namespace std; const int maxn = 4e5 + 10; int n, m; vector < int > g[maxn]; int tmr, a[maxn]; int seen[maxn], label[maxn], is_label[maxn]; void dfs(int beg, int from) { seen[beg] = 1; cout << beg << " anddd from " << from << endl; tmr ++; a[tmr] = beg; label[beg] = tmr; is_label[tmr] = 1; for (auto nb: g[beg]) { if(nb == from) continue; if(seen[nb] == 1)continue; dfs(nb, beg); tmr ++; a[tmr] = beg; } } unordered_map < int, int > mp; int diff[maxn * 4], sz[maxn * 4]; int diag[maxn * 4]; int type[maxn * 4], col[maxn * 4], space[maxn * 4]; bool cmp(int col1, int col2) { if(space[col1] < space[col2])return true; return false; } int used[maxn]; vector < int > take[maxn]; vector < pair <int, int > > cells[maxn * 4]; std::vector<std::vector<int>> create_map(int N, int M, std::vector<int> A, std::vector<int> B) { n = N; m = M; for (int i = 0; i < m; ++ i) { int from = A[i], to = B[i]; g[from].pb(to); g[to].pb(from); } for (int i = 1; i <= n; ++ i) { cout <<"sysedi na " << i << endl; for (auto x: g[i]) cout << x << " "; cout << endl; } dfs(1, -1); cout << "flag 1" << endl; int r = 0; int currsz = 1; for (int i = -2*n+1; i < 2*n; ++ i) { r ++; diff[r] = i; mp[i] = r; sz[r] = currsz; if(i <= 0) currsz ++; else currsz --; } int on = 0; for (int i = 1; i <= tmr; ++ i) { on ++; type[on] = 1; col[on] = a[i]; if(is_label[i] == 1) { on ++; type[on] = 2; col[on] = a[i]; on ++; type[on] = 1; col[on] = a[i]; space[a[i]] = sz[on]; } } vector < int > u; for (int i = 1; i <= n; ++ i) u.pb(i); sort(u.begin(), u.end(), cmp); for (auto x: u) { used[x] = 1; for (auto nb: g[x]) { if(used[nb])take[x].pb(nb); } take[x].pb(x); } for (int i = 0; i < 2*n; ++ i) { for (int j = 0; j < 2*n; ++ j) { int diff = i - j; int diag = mp[diff]; cells[diag].pb(make_pair(i, j)); } } std::vector<std::vector<int>> ans(2 * n, std::vector<int>(2*n, 1)); for (int i = 1; i <= r; ++ i) { int cvqt = col[i]; if(type[i] == 1) { for (auto x: cells[i]) ans[x.f][x.s] = cvqt; } else { int j = 0; for(auto x: cells[i]) { ans[x.f][x.s] = take[cvqt][j]; if(j < take[cvqt].size()-1)j ++; } } } return ans; }

Compilation message (stderr)

In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:172,
                 from worldmap.cpp:5:
/usr/include/c++/13/chrono: In static member function 'static std::chrono::utc_time<typename std::common_type<_Dur, std::chrono::duration<long int, std::ratio<1, 1> > >::type> std::chrono::tai_clock::to_utc(std::chrono::tai_time<_Duration>&)':
/usr/include/c++/13/chrono:187:60: error: unable to find numeric literal operator 'operator""s'
  187 |           return utc_time<_CDur>{__t.time_since_epoch()} - 378691210s;
      |                                                            ^~~~~~~~~~
/usr/include/c++/13/chrono: In static member function 'static std::chrono::tai_time<typename std::common_type<_Dur, std::chrono::duration<long int, std::ratio<1, 1> > >::type> std::chrono::tai_clock::from_utc(std::chrono::utc_time<_Duration>&)':
/usr/include/c++/13/chrono:196:60: error: unable to find numeric literal operator 'operator""s'
  196 |           return tai_time<_CDur>{__t.time_since_epoch()} + 378691210s;
      |                                                            ^~~~~~~~~~
/usr/include/c++/13/chrono: In static member function 'static std::chrono::utc_time<typename std::common_type<_Dur, std::chrono::duration<long int, std::ratio<1, 1> > >::type> std::chrono::gps_clock::to_utc(std::chrono::gps_time<_Duration>&)':
/usr/include/c++/13/chrono:227:60: error: unable to find numeric literal operator 'operator""s'
  227 |           return utc_time<_CDur>{__t.time_since_epoch()} + 315964809s;
      |                                                            ^~~~~~~~~~
/usr/include/c++/13/chrono: In static member function 'static std::chrono::gps_time<typename std::common_type<_Dur, std::chrono::duration<long int, std::ratio<1, 1> > >::type> std::chrono::gps_clock::from_utc(std::chrono::utc_time<_Duration>&)':
/usr/include/c++/13/chrono:236:60: error: unable to find numeric literal operator 'operator""s'
  236 |           return gps_time<_CDur>{__t.time_since_epoch()} - 315964809s;
      |                                                            ^~~~~~~~~~
/usr/include/c++/13/chrono: In function 'std::chrono::leap_second_info std::chrono::__detail::__get_leap_second_info(std::chrono::sys_seconds, bool)':
/usr/include/c++/13/chrono:3256:35: error: unable to find numeric literal operator 'operator""s'
 3256 |       const sys_seconds __expires(1735344000s); // 2024-12-28 00:00:00 UTC
      |                                   ^~~~~~~~~~~
/usr/include/c++/13/chrono:3279:31: error: unable to find numeric literal operator 'operator""s'
 3279 |                   if ((__ss + 1s) >= __pos[-1])
      |                               ^~
In file included from /usr/include/c++/13/chrono:3370:
/usr/include/c++/13/bits/chrono_io.h: In member function 'typename _FormatContext::iterator std::__format::__formatter_chrono<_CharT>::_M_z(const _Tp&, typename _FormatContext::iterator, _FormatContext&, bool) const':
/usr/include/c++/13/bits/chrono_io.h:1333:45: error: unable to find numeric literal operator 'operator""s'
 1333 |                   if (*__t._M_offset_sec != 0s)
      |                                             ^~
/usr/include/c++/13/bits/chrono_io.h: In member function 'typename _FormatContext::iterator std::formatter<std::chrono::time_point<std::chrono::tai_clock, _Duration>, _CharT>::format(std::chrono::tai_time<_Duration>&, _FormatContext&) const':
/usr/include/c++/13/bits/chrono_io.h:2018:41: error: unable to find numeric literal operator 'operator""s'
 2018 |           const chrono::seconds __off = 0s;
      |                                         ^~
/usr/include/c++/13/bits/chrono_io.h: In member function 'typename _FormatContext::iterator std::formatter<std::chrono::time_point<std::chrono::gps_clock, _Duration>, _CharT>::format(std::chrono::gps_time<_Duration>&, _FormatContext&) const':
/usr/include/c++/13/bits/chrono_io.h:2048:41: error: unable to find numeric literal operator 'operator""s'
 2048 |           const chrono::seconds __off = 0s;
      |                                         ^~