# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
130092 | MohamedAhmed04 | Brunhilda’s Birthday (BOI13_brunhilda) | C++14 | 299 ms | 262148 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
//WA submission to check if it will TLE or not.
#include <bits/stdc++.h>
using namespace std ;
const int MAX = 1e7 + 5 ;
const int OO = 1e9 ;
int dp[MAX] ;
vector<int>d[MAX] ;
int main()
{
int n , q ;
cin>>n>>q ;
int arr[n] ;
for(int i = 0 ; i < n ; ++i)
{
cin>>arr[i] ;
//for(int j = arr[i] ; j < MAX ; j += arr[i])
//{
// if(j > (int)(1e7))
// break ;
// d[j].push_back(arr[i]) ;
//}
}
dp[0] = 0 ;
for(int i = 1 ; i < MAX ; ++i)
{
dp[i] = 0 ;
for(int j = 0 ; j < d[i].size() ; ++j)
dp[i] += d[i][j] / 2;
}
while(q--)
{
int x ;
cin>>x ;
if(dp[x] >= OO)
cout<<"oo\n" ;
else
cout<<dp[x]<<"\n";
}
return 0 ;
}
컴파일 시 표준 에러 (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... |