Submission #411572

#TimeUsernameProblemLanguageResultExecution timeMemory
411572ioiSplit the Attractions (IOI19_split)C++14
0 / 100
45 ms4912 KiB
#include "split.h"
#include<bits/stdc++.h>

using namespace std;

vector<int> find_split(int n, int a, int b, int c, vector<int> p, vector<int> q) {
	vector<int> res;

	int idx = 0 , number = 1 ;

	while(a --)
        res.push_back(number);
    number ++ ;

    while(b--)
        res.push_back(number);
    number ++ ;
    while(c--)
        res.push_back(number);
	return res;
}

Compilation message (stderr)

split.cpp: In function 'std::vector<int> find_split(int, int, int, int, std::vector<int>, std::vector<int>)':
split.cpp:18:5: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
   18 |     while(c--)
      |     ^~~~~
split.cpp:20:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
   20 |  return res;
      |  ^~~~~~
split.cpp:9:6: warning: unused variable 'idx' [-Wunused-variable]
    9 |  int idx = 0 , number = 1 ;
      |      ^~~
#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...