답안 #971268

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
971268 2024-04-28T09:23:15 Z groshi Art Collections (BOI22_art) C++17
0 / 100
0 ms 348 KB
#include<bits/stdc++.h>
#include "art.h"
using namespace std;
#define int long long
void solve(int32_t n)
{
    vector<pair<int,int> > Q;
    for(int i=1;i<=n;i++)
    {
        vector<int32_t> pom;
        for(int j=i;j<=n;j++)
            pom.push_back(j);
        for(int j=1;j<i;j++)
            pom.push_back(j);
        Q.push_back({publish(pom),i});
    }
    sort(Q.begin(),Q.end());
    vector<int32_t> wynik;
    for(int i=0;i<Q.size();i++)
        wynik.push_back(Q[i].second);
    answer(wynik);
}

Compilation message

art.cpp: In function 'void solve(int32_t)':
art.cpp:19:18: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   19 |     for(int i=0;i<Q.size();i++)
      |                 ~^~~~~~~~~
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) {
      |        ~~~~~~~~~^~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Incorrect 0 ms 344 KB Not correct
3 Halted 0 ms 0 KB -