# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
584262 | LucaIlie | 버섯 세기 (IOI20_mushrooms) | C++17 | 221 ms | 356 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "mushrooms.h"
#include <bits/stdc++.h>
using namespace std;
int count_mushrooms( int n ) {
int k = n, bs, nrA, p;
vector <int> a, s( n );
s[0] = 0;
nrA = 1;
for ( int i = 1; i < k; i++ ) {
s[i] = use_machine( { 0, i } );
nrA += (s[i] == 0);
}
/*if ( nrA > k / 2 ) {
bs = nrA + 1;
p = 0;
} else {
bs = k - nrA + 1;
p = 1;
}
for ( int i = 0; i < k; i++ ) {
if ( s[i] == p )
a.push_back( i );
}
for ( int i = k; i < n; i += bs ) {
int j;
vector <int> m;
j = i;
m.push_back( j );
for ( int l: a ) {
m.push_back( l );
m.push_back( j );
j++;
if ( j == n )
break;
}
if ( p )
nrA += use_machine( m ) / 2;
else
nrA += j - i + 1 + use_machine( m ) / 2;
}*/
return nrA;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |