Submission #782334

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7823342023-07-13 20:15:02faruk자동 인형 (IOI18_doll)C++17
53 / 100
87 ms15744 KiB
#include "doll.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> X, Y, C;
struct trigger {
int id;
int type;
trigger() {}
trigger(int typ) {
if (typ != 0) {
id = typ;
type = 1;
} else {
id = X.size();
X.push_back(0);
Y.push_back(0);
type = 0;
}
}
void connect_parent(int par) {
C[par] = -id;
}
void connect_X(trigger x) {
if (x.type == 0)
X[id - 1] = -x.id;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

doll.cpp: In function 'void create_device(int, std::vector<trigger>)':
doll.cpp:61:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<trigger>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   61 |     while (siz < targets.size())
      |            ~~~~^~~~~~~~~~~~~~~~
doll.cpp:64:27: warning: comparison of integer expressions of different signedness: 'std::vector<trigger>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   64 |     while (targets.size() < siz)
      |            ~~~~~~~~~~~~~~~^~~~~
#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...