Submission #101164

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1011642019-03-17 07:23:36square1001Wall (CEOI14_wall)C++14
30 / 100
926 ms17152 KiB
#include <queue>
#include <vector>
#include <cassert>
#include <iostream>
#include <functional>
using namespace std;
const long long inf = 1LL << 61;
class edge {
public:
int to, bit; long long cost;
edge() : to(-1), cost(0), bit(0) {};
edge(int to_, long long cost_, int bit_) : to(to_), cost(cost_), bit(bit_) {};
};
class state {
public:
int pos, bit; long long cost;
state() : pos(-1), cost(0), bit(0) {};
state(int pos_, long long cost_, int bit_) : pos(pos_), cost(cost_), bit(bit_) {};
bool operator>(const state& s) const {
return cost > s.cost;
}
};
int main() {
cin.tie(0);
ios_base::sync_with_stdio(false);
int H, W;
cin >> H >> W;
vector<vector<int> > A(H, vector<int>(W));
vector<pair<int, int> > points;
for (int i = 0; i < H; ++i) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

wall.cpp: In constructor 'edge::edge()':
wall.cpp:10:25: warning: 'edge::cost' will be initialized after [-Wreorder]
  int to, bit; long long cost;
                         ^~~~
wall.cpp:10:10: warning:   'int edge::bit' [-Wreorder]
  int to, bit; long long cost;
          ^~~
wall.cpp:11:2: warning:   when initialized here [-Wreorder]
  edge() : to(-1), cost(0), bit(0) {};
  ^~~~
wall.cpp: In constructor 'edge::edge(int, long long int, int)':
wall.cpp:10:25: warning: 'edge::cost' will be initialized after [-Wreorder]
  int to, bit; long long cost;
                         ^~~~
wall.cpp:10:10: warning:   'int edge::bit' [-Wreorder]
  int to, bit; long long cost;
          ^~~
wall.cpp:12:2: warning:   when initialized here [-Wreorder]
  edge(int to_, long long cost_, int bit_) : to(to_), cost(cost_), bit(bit_) {};
  ^~~~
wall.cpp: In constructor 'state::state()':
wall.cpp:16:26: warning: 'state::cost' will be initialized after [-Wreorder]
  int pos, bit; long long cost;
                          ^~~~
wall.cpp:16:11: warning:   'int state::bit' [-Wreorder]
  int pos, bit; long long cost;
           ^~~
wall.cpp:17:2: warning:   when initialized here [-Wreorder]
  state() : pos(-1), cost(0), bit(0) {};
  ^~~~~
wall.cpp: In constructor 'state::state(int, long long int, int)':
wall.cpp:16:26: warning: 'state::cost' will be initialized after [-Wreorder]
  int pos, bit; long long cost;
                          ^~~~
wall.cpp:16:11: warning:   'int state::bit' [-Wreorder]
  int pos, bit; long long cost;
           ^~~
wall.cpp:18:2: warning:   when initialized here [-Wreorder]
  state(int pos_, long long cost_, int bit_) : pos(pos_), cost(cost_), bit(bit_) {};
  ^~~~~
wall.cpp: In function 'int main()':
wall.cpp:45:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (int k = 0; k < points.size(); ++k) {
                    ~~^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...