Submission #570681

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5706812022-05-31 04:23:20nayhzJakarta Skyscrapers (APIO15_skyscraper)C++17
36 / 100
321 ms262144 KiB
// hkoi AP152 Jakarta Skyscrapers
#include <bits/stdc++.h>
#define lck cout << "ick bmi 32.9\n"
#define cam_cs cout << "ick orz\n"
#define orz(x) cout << (x) << " orz\n"
#define pii pair<int, int>
#define pll pair<long long, long long>
#define pcc pair<char, char>
#define ll long long
#define ull unsigned long long
#define ld long double
// #define int long long
#define vi vector<int>
#define vll vector<long long>
#define vd vector<double>
#define vpii vector<pair<int, int>>
#define vpll vector<pair<long long, long long>>
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define SET(x, a) memset((x), a, sizeof (x))
#define yes() cout << "YES\n"
#define no() cout << "NO\n"
#define impossible() cout << "Impossible\n"
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

skyscraper.cpp: In function 'long long int hamming(std::string&, std::string&)':
skyscraper.cpp:47:72: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   47 | inline ll hamming (string &a, string &b) {ll ret = 0; for (ll i = 0; i < a.length(); i++) if (a[i] != b[i]) ret++; return ret;}
      |                                                                      ~~^~~~~~~~~~~~
skyscraper.cpp: In member function 'bool TopoSort::sort()':
skyscraper.cpp:119:21: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  119 |   return ans.size() == n;
      |          ~~~~~~~~~~~^~~~
skyscraper.cpp: In function 'void solve(int&)':
skyscraper.cpp:173:117: warning: right operand of comma operator has no effect [-Wunused-value]
  173 |    if (x && !visited[curr.fi][curr.fi + x]) q.push({curr.fi + x, {curr.se.fi + 1, x}}), visited[curr.fi][curr.fi + x];
      |                                                                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
skyscraper.cpp:165:3: warning: 'e' may be used uninitialized in this function [-Wmaybe-uninitialized]
  165 |   if (curr.fi == e) {
      |   ^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...