| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
最蠢的ac方法#include <iostream>
#include<cmath>
#include<stdio.h>
#include<cstring>
#include <algorithm>
#include <cctype>
#include <utility>
#include <map>
#include <string>
#include <cstdlib>
using namespace std;
int a[10000000];
char na[70][17];
int zhuang[70];
int main()
{
int n;
scanf("%d", &n);
int hao = 1;
for (int i = 1; i <= 10000000; i++)
{
if (hao > n)
hao = 1;
a[i] = hao;
hao++;
}
for (int i = 1; i <= n; i++)
{
scanf("%s", na[i]);
}
int w, s;
scanf("%d", &w);
getchar();
scanf("%d", &s);
int bao = 1;
for (int i = w; i < 10000000; i++)
{
while (zhuang[a[i]] != 0)
{
i++;
}
if (bao == s)
{
zhuang[a[i]] = 1;
puts(na[a[i]]);
bao = 1;
n--;
if (n == 0)
break;
}
else
{
bao++;
}
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator