Search found 1 match

by landuomu
Sun Oct 18, 2009 9:54 am
Forum: Volume 101 (10100-10199)
Topic: 10170 - The Hotel with Infinite Rooms
Replies: 20
Views: 12426

Re: 10170 - The Hotel with Infinite Rooms

hi I get TLE for this problem. Below is my code. For the largest possible option(1 10^15), I took 28s. How can I improve my algorithm? Thank you.

#include <cstdio>
using namespace std;

int main() {
long long s=0,d=0,day,dayleft;

while (scanf("%lld %lld",&s,&d)==2) {
day=1;
dayleft=s;
while ...

Go to advanced search