- 过河
- 2015-03-31 17:19:48 @
测试数据 #0: Accepted, time = 0 ms, mem = 276 KiB, score = 10
测试数据 #1: WrongAnswer, time = 0 ms, mem = 276 KiB, score = 0
测试数据 #2: Accepted, time = 0 ms, mem = 280 KiB, score = 10
测试数据 #3: WrongAnswer, time = 0 ms, mem = 280 KiB, score = 0
测试数据 #4: WrongAnswer, time = 15 ms, mem = 276 KiB, score = 0
测试数据 #5: WrongAnswer, time = 0 ms, mem = 280 KiB, score = 0
测试数据 #6: WrongAnswer, time = 0 ms, mem = 276 KiB, score = 0
测试数据 #7: WrongAnswer, time = 15 ms, mem = 280 KiB, score = 0
测试数据 #8: WrongAnswer, time = 0 ms, mem = 276 KiB, score = 0
测试数据 #9: WrongAnswer, time = 0 ms, mem = 280 KiB, score = 0
#include<iostream>
using namespace std;
int main()
{
long length,jump;
int a, n, mini, maxi;
int rocks = 0;
int stop = 0;
int time = 0;
cin >> length >> mini >> maxi >> rocks;
long rockplaces[101];
for(a = 0 ; a < rocks ; a++)
{
cin >> rockplaces[a];
}
n = -1;
jump = mini;
while (n < rocks)
{
n++;
if (rockplaces[n] % jump == 0)
{
jump++;
if (jump > maxi)
{
jump = mini;
stop++;
}
}
}
cout << stop << endl;
return 0;
}