/*** | |
Md. Nazmul Hasan | |
Shahjalal University of Science & Technology,Sylhet. | |
hasan08sust@gmail.com | |
***/ | |
#include<iostream> | |
#include<cstdio> | |
#include<stack> | |
#include<queue> | |
#include<map> | |
#include<vector> | |
#include<algorithm> | |
#include<cstring> | |
#include<sstream> | |
#include<cmath> | |
#include <iomanip> | |
using namespace std ; | |
typedef long long ll ; | |
typedef int in ; | |
typedef unsigned long long ull ; | |
const double pi = 2*acos(0) ; | |
#define maxi 40000 | |
#define pf printf | |
#define sc scanf | |
#define pb push_back | |
#define MEM(x,y) (memset((x),(y),sizeof(x))) | |
#define MIN(x,y) ((x) < (y) ? (x) : (y)) | |
#define MAX(x,y) ((x) > (y) ? (x) : (y)) | |
#define load(array,size) for(int i=0 ; i<size ; i++) cin>>array[i] ; | |
#define new_line pf("\n") | |
#define clear_data(array) memset(array,0,sizeof(array)) | |
#define highest_int 2147483647 | |
int main() | |
{ | |
int n,t,a,d,p,l; | |
sc("%d %d",&n,&t); | |
int x = 86400; | |
int cnt=0; | |
l=0; | |
for(int i=1 ; i<=n ; i++){ | |
sc("%d",&a); | |
d = (x-a); | |
p = t-d; | |
if(l) | |
continue; | |
if(p==0){ | |
cnt++; | |
l=1; | |
} | |
if(p>0){ | |
cnt++; | |
t = p; | |
} | |
if(p<0){ | |
cnt++; | |
l=1; | |
} | |
} | |
pf("%d\n",cnt); | |
return 0; | |
} |
31 October 2017
Codeforces 884 A Book Reading
Subscribe to:
Post Comments (Atom)
-
/*** Md. Nazmul Hasan Shahjalal University of Science & Technology,Sylhet. hasan08sust@gmail.com ***/ #include<iostream> #i...
-
n = 1 while n: str = input () # print('Case no# %d :'%n) if str == ' * ' : break if str == ' Hajj ...
-
/*** Md. Namzul Hasan Shahjalal University of Science & technology,sylhet. hasan08sust@gmail.com ***/ #include<bits/stdc++.h...
No comments:
Post a Comment