Submission #14435

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
144352015-05-15 01:12:14aintaJakarta Skyscrapers (APIO15_skyscraper)C++98
100 / 100
193 ms137992 KiB
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<map>
#define N_ 7600000
using namespace std;
int n, m, Num[N_], D[N_], Q1[N_], Q2[N_];
vector<int>E[30100];
map<int, int>Map;
bool be[N_], ed[N_];
struct A{
int a, b;
}w[30100];
int cnt;
void Make(int a, int b, int x){
int i;
be[cnt + 1] = true;
for (i = b; i < n; i += a){
++cnt;
Num[cnt] = i;
if (x == i) E[x].push_back(cnt);
}
ed[cnt] = true;
}
void BFS(int a){
int i, h = 0, t = 0, tt = 0, x;
for (i = 0; i <= cnt; i++)D[i] = 999999999;
D[a] = 0;
Q1[++t] = a;
while (t){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...