제출 #1000537

#제출 시각아이디문제언어결과실행 시간메모리
1000537De3b0oSuper Dango Maker (JOI22_dango3)C++17
7 / 100
2467 ms1116 KiB
#include "dango3.h"
#include<bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define in insert
#define pb push_back
#define ppb pop_back()
#define d3 ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define cans cout << ans << "\n";
#define yes cout << "Yes" << "\n";
#define no cout << "No" << "\n";
#define pll pair<ll,ll>
#define lin cout << "\n";
#define sqr 340
#define mod 1000000007
#define mid ((l+r)/2)
#define lc (2*x)
#define rc (2*x+1)

using namespace std;

ll n , m;
set<ll> cu[109];

void Solve(int N, int M)
{
    n=N;
    m=M;
    set<ll> s;
    for(int i = 1 ; n*m>=i ; i++)
        s.in(i);
    ll co = 0;
    while(!s.empty())
    {
        co++;
        auto it1 = s.begin();
        cu[co].in(*it1);
        ll st = *it1;
        for(auto it : s)
        {
            if(cu[co].size()==m)
                break;
            if(it==st)
                continue;
            vector<int> q;
            for(int i = 1 ; n*m>=i ; i++)
            {
                if(i==st||i==it)
                    continue;
                q.pb(i);
            }
            ll x = Query(q);
            if(x==m-2)
                cu[co].in(it);
        }
        for(auto it : cu[co])
            s.erase(s.find(it));
    }
    for(int i = 0 ; m>i ; i++)
    {
        vector<int> ans;
        for(int j = 1 ; n>=j ; j++)
        {
            auto it = cu[j].begin();
            ans.pb(*it);
            cu[j].erase(it);
        }
        Answer(ans);
    }
}

컴파일 시 표준 에러 (stderr) 메시지

dango3.cpp: In function 'void Solve(int, int)':
dango3.cpp:42:29: warning: comparison of integer expressions of different signedness: 'std::set<long long int>::size_type' {aka 'long unsigned int'} and 'long long int' [-Wsign-compare]
   42 |             if(cu[co].size()==m)
      |                ~~~~~~~~~~~~~^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...