Submission #642191

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
6421912022-09-18 16:41:02cadmiumskyTwo Transportations (JOI19_transportations)C++14
100 / 100
774 ms48888 KiB
#include "Azer.h"
#include <bits/stdc++.h>
using namespace std;
const int nmax = 2e3 + 5, inf = 1e9 + 5;
using pii = pair<int,int>;
namespace A {
int numberofstates;
int N;
set<pii> heap;
vector<pii> g[nmax];
int dist[nmax];
vector<int> bits;
int lastdocumented = 0;
int last = 0;
int state = 0;
int theircost = 0, theirnode = 0;
int mynode = 0, mycost = 0;
void receiveA(bool x) {
bits.emplace_back(x);
if(state == 0 && bits.size() == lastdocumented + 9) {
int node, cost;
if(heap.size())
tie(cost, node) = *heap.begin();
else
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Azer.cpp: In function 'void A::receiveA(bool)':
Azer.cpp:26:32: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   26 |   if(state == 0 && bits.size() == lastdocumented + 9) {
      |                    ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
Azer.cpp:34:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   34 |     for(int i = lastdocumented; i < bits.size(); i++) theircost = (theircost << 1) | bits[i];
      |                                 ~~^~~~~~~~~~~~~
Azer.cpp:53:40: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   53 |   if(state == 1 && lastdocumented + 11 == bits.size()) {
      |                    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
Azer.cpp:55:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   55 |     for(int i = lastdocumented; i < bits.size(); i++)
      |                                 ~~^~~~~~~~~~~~~
Azer.cpp:60:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   60 |     auto [node, cost] = pii{mynode, mycost};
      |          ^
Azer.cpp:71:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   71 |     for(auto [x, c] : g[node]) {
      |              ^

Baijan.cpp: In function 'void B::receiveB(bool)':
Baijan.cpp:25:32: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   25 |   if(state == 0 && bits.size() == lastdocumented + 9) {
      |                    ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
Baijan.cpp:33:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   33 |     for(int i = lastdocumented; i < bits.size(); i++) theircost = (theircost << 1) | bits[i];
      |                                 ~~^~~~~~~~~~~~~
Baijan.cpp:52:40: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   52 |   if(state == 1 && lastdocumented + 11 == bits.size()) {
      |                    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
Baijan.cpp:54:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   54 |     for(int i = lastdocumented; i < bits.size(); i++)
      |                                 ~~^~~~~~~~~~~~~
Baijan.cpp:59:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   59 |     auto [node, cost] = pii{mynode, mycost};
      |          ^
Baijan.cpp:68:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   68 |     for(auto [x, c] : g[node]) {
      |              ^
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...