| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 959484 | Bidoneczek11 | Art Collections (BOI22_art) | C++17 | 0 ms | 344 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "art.h"
using namespace std;
//#define int long long
#define ll long long
#define ld long double
#define pb push_back
#define nd second
#define st first
#define sz size
#define forr(i, n) for(int i=1;i<=n;i++)
const ll infl=1e18+90;
const int inf=1e9+90;
int X;
int s[8]{0, 7, 4, 5, 2, 1, 3, 6};
/*
void answer(vector<int> a)
{
for(auto it:a) cout<<it<<" ";
cout<<"\n";
}
int publish(vector<int> a)
{
cerr<<"wchodze dla a = ";
for(auto it:a) cerr<<it<<" ";
cerr<<"\n";
int wyn=0;
for(int i=0;i<X;i++)
{
for(int j=i+1;j<X;j++)
{
//cerr<<"s["<<i<<"] = "<<s[i]<<" s["<<j<<"] = "<<s[j]<<"\n";
if(s[a[i]]<s[a[j]])
{
//cerr<<"dla i, j = "<<i<<" "<<j<<"\n";
wyn++;
}
}
}
cerr<<"zwracam wyn = "<<wyn<<"\n";
return wyn;
}
*/
vector<int> wek;
void solve(int n)
{
X=n;
for(int i=1;i<=n;i++) wek.pb(i);
int x=publish(wek);
for(int i=n-2;i>=0;i--)
{
swap(wek[i], wek[n-1]);
int x2=publish(wek);
swap(wek[i], wek[n-1]);
int r=x2-x;
r+=n-1-i;
r/=2;
int licz=i;
while(r>0)
{
swap(wek[licz], wek[licz+1]);
licz++;
r--;
}
x=x2;
}
reverse(wek.begin(), wek.end());
answer(wek);
}
/*
int main()
{
solve(7);
}
*/
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
