Submission #140211

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1402112019-08-02 09:55:44rajarshi_basuMechanical Doll (IOI18_doll)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#include "doll.h"
#define FOR(i,n) for(int i = 0;i<n;i++)
#define FORE(i,a,b) for(int i= a;i<=b;i++)
#define ll long long int
#define vi vector<int>
#define vv vector
#define pb push_back
#define ii pair<int,int>
using namespace std;
const int MAXN = 4e5;
int n,m;
vi out[MAXN];
int ctr = 1;
int x[MAXN];
int y[MAXN];
bool dummy[MAXN];
void ans1wer(vi a,vi b,vi c){
for(auto e : a)cout << e << " ";cout << endl;
FOR(i,b.size()){
cout << b[i] << " " << c[i] << endl;
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

doll.cpp: In function 'void ans1wer(std::vector<int>, std::vector<int>, std::vector<int>)':
doll.cpp:25:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   25 |  for(auto e : a)cout << e << " ";cout << endl;
      |  ^~~
doll.cpp:25:34: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   25 |  for(auto e : a)cout << e << " ";cout << endl;
      |                                  ^~~~
doll.cpp:5:33: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    5 | #define FOR(i,n) for(int i = 0;i<n;i++)
......
   26 |  FOR(i,b.size()){
      |      ~~~~~~~~~~                  
doll.cpp:26:2: note: in expansion of macro 'FOR'
   26 |  FOR(i,b.size()){
      |  ^~~
doll.cpp: In function 'int solve(std::vector<int>)':
doll.cpp:5:33: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    5 | #define FOR(i,n) for(int i = 0;i<n;i++)
......
   37 |  FOR(i,nums.size()){
      |      ~~~~~~~~~~~~~               
doll.cpp:37:2: note: in expansion of macro 'FOR'
   37 |  FOR(i,nums.size()){
      |  ^~~
doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:87:20: error: 'yy' was not declared in this scope; did you mean 'y'?
   87 |    for(auto e: ids)yy[e] = outof[i];
      |                    ^~
      |                    y