Submission #30765942
Source Code Expand
#include "dango3.h"
#include<bits/stdc++.h>
using namespace std;
const int MM=27,NM=1e4+10;
namespace {
int variable_example = 1;
} // namespace
void Solve(int n,int m) {
vector<int>ans[MM];
int id[MM],vis[NM];
srand(time(0));
for(int i=1;i<=n*m;i++){
for(int j=1;j<=m;j++)id[j]=j;
random_shuffle(id+1,id+1+m);
for(int j=1;j<=m;j++){
int nw=id[j];
vector<int>qry;qry.clear();
for(int k=1;k<=n*m;k++)vis[k]=0;
vis[i]=1;for(auto t:ans[nw])vis[t]=1;
for(int k=1;k<=n*m;k++)if(!vis[k])qry.push_back(k);
int gt=Query(qry);
if(gt==m-1){ans[nw].push_back(i);break;}
}
}
for(int i=1;i<=m;i++)Answer(ans[i]);
}
Submission Info
| Submission Time | |
|---|---|
| Task | G - 一流の団子職人 (Super Dango Maker) |
| User | Zyh_277 |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 777 Byte |
| Status | AC |
| Exec Time | 2722 ms |
| Memory | 3884 KiB |
Compile Error
In file included from ./Main.cpp:1:
./dango3.h: In function ‘int main(int, char**)’:
./dango3.h:100:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
100 | int main(int argc, char **argv) {
| ~~~~^~~~
./dango3.h:100:27: warning: unused parameter ‘argv’ [-Wunused-parameter]
100 | int main(int argc, char **argv) {
| ~~~~~~~^~~~
./Main.cpp: At global scope:
./Main.cpp:8:5: warning: ‘{anonymous}::variable_example’ defined but not used [-Wunused-variable]
8 | int variable_example = 1;
| ^~~~~~~~~~~~~~~~
Judge Result
| Set Name | Subtask 1 | Subtask 2 | Subtask 3 | Subtask 4 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 5 / 5 | 12 / 12 | 22 / 22 | 61 / 61 | ||||||||
| Status |
|
|
|
|
| Set Name | Test Cases |
|---|---|
| Subtask 1 | 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt |
| Subtask 2 | 02-01.txt, 02-02.txt, 02-03.txt, 02-04.txt, 02-05.txt, 02-06.txt |
| Subtask 3 | 03-01.txt, 03-02.txt, 03-03.txt, 03-04.txt, 03-05.txt, 03-06.txt |
| Subtask 4 | 04-01.txt, 04-02.txt, 04-03.txt, 04-04.txt, 04-05.txt, 04-06.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01-01.txt | AC | 14 ms | 3532 KiB |
| 01-02.txt | AC | 6 ms | 3480 KiB |
| 01-03.txt | AC | 6 ms | 3532 KiB |
| 01-04.txt | AC | 6 ms | 3632 KiB |
| 01-05.txt | AC | 6 ms | 3660 KiB |
| 01-06.txt | AC | 10 ms | 3688 KiB |
| 02-01.txt | AC | 63 ms | 3540 KiB |
| 02-02.txt | AC | 59 ms | 3608 KiB |
| 02-03.txt | AC | 58 ms | 3680 KiB |
| 02-04.txt | AC | 58 ms | 3612 KiB |
| 02-05.txt | AC | 58 ms | 3656 KiB |
| 02-06.txt | AC | 58 ms | 3608 KiB |
| 03-01.txt | AC | 784 ms | 3712 KiB |
| 03-02.txt | AC | 760 ms | 3660 KiB |
| 03-03.txt | AC | 759 ms | 3776 KiB |
| 03-04.txt | AC | 747 ms | 3776 KiB |
| 03-05.txt | AC | 758 ms | 3716 KiB |
| 03-06.txt | AC | 758 ms | 3712 KiB |
| 04-01.txt | AC | 2717 ms | 3648 KiB |
| 04-02.txt | AC | 2716 ms | 3856 KiB |
| 04-03.txt | AC | 2639 ms | 3884 KiB |
| 04-04.txt | AC | 2648 ms | 3632 KiB |
| 04-05.txt | AC | 2688 ms | 3684 KiB |
| 04-06.txt | AC | 2722 ms | 3788 KiB |