Submission #885213

# Submission time Handle Problem Language Result Execution time Memory
885213 2023-12-09T09:12:19 Z HossamHero7 Super Dango Maker (JOI22_dango3) C++17
7 / 100
2848 ms 1088 KB
#include <bits/stdc++.h>
#include "dango3.h"
//#include "grader.cpp"
using namespace std;
typedef long long ll;
int query(set<int> &st){
    return Query(vector<int>(st.begin(),st.end()));
}
void Solve(int n, int m) {
    set<int> all;
    for(int i=1;i<=n*m;i++) all.insert(i);
    for(int it=0;it<m-1;it++){
        vector<int> x(all.begin(),all.end());
        all.erase(all.begin());
        int exp = m - 1 - it;
        vector<int> rem;
        rem.push_back(x[0]);
        for(int i=1;i<x.size();i++){
            if(rem.size() == n) break;
            all.erase(x[i]);
            if(query(all) < exp) all.insert(x[i]);
            else rem.push_back(x[i]);
        }
        Answer(rem);
    }
    Answer(vector<int>(all.begin(),all.end()));
}

Compilation message

dango3.cpp: In function 'void Solve(int, int)':
dango3.cpp:18:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   18 |         for(int i=1;i<x.size();i++){
      |                     ~^~~~~~~~~
dango3.cpp:19:27: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   19 |             if(rem.size() == n) break;
      |                ~~~~~~~~~~~^~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 436 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 20 ms 348 KB Output is correct
2 Correct 17 ms 348 KB Output is correct
3 Correct 35 ms 548 KB Output is correct
4 Correct 35 ms 552 KB Output is correct
5 Correct 6 ms 348 KB Output is correct
6 Correct 8 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 746 ms 604 KB Output is correct
2 Correct 871 ms 784 KB Output is correct
3 Incorrect 1965 ms 780 KB Wrong Answer [3]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2848 ms 1088 KB Wrong Answer [3]
2 Halted 0 ms 0 KB -