제출 #1040056

#제출 시각아이디문제언어결과실행 시간메모리
1040056Marco_EscandonArt Collections (BOI22_art)C++17
70 / 100
796 ms1788 KiB

#include<bits/stdc++.h>
using namespace std;
#include "art.h"
typedef int ll;
void solve(int n) {
    vector<ll> sol(n,0);
    for(int i=1; i<=n; i++)
    {
        vector<ll> temp,temp2;
        temp.push_back(i);
        for(int j=1; j<=n; j++)
        {
            if(i!=j) temp.push_back(j);
            if(i!=j) temp2.push_back(j);
        }
        temp2.push_back(i);
        ll a=publish(temp);
        ll b=publish(temp2);
        ll t1=((a+b)-(n-1))/2;
        ll t2=a-t1;
        sol[i-1]=t2;
    }
    vector<ll> sf;
    for(int i=0; i<n; i++)
        for(int j=0; j<n; j++)
            if(sol[j]==i) sf.push_back(j+1);
    answer(sf);
    return;
}

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

interface.cpp: In function 'int publish(std::vector<int>)':
interface.cpp:20:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   20 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~
interface.cpp: In function 'void answer(std::vector<int>)':
interface.cpp:36:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   36 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...