Yes I have used only cin/cout everywhere.
After every cout I am flushing the output, so in my opinion it should not
matter if the output is flushed automatically, since i am always flushing it.
Below is the code which passed :
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define MAX 200005
#define MOD 998244353
#define pb push_back
#define mp make_pair
#define f first
#define s second
ll n, m, i, j, k, t, l, r,tmp, ans, cnt,curr, flag, sum, mn, mx,
mxi,x,pre,strt,en;
string s, a, b;
vector<pair<ll,ll> > v;
int main()
{
//ios_base::sync_with_stdio(false);cin.tie(NULL);
// #ifndef ONLINE_JUDGE
// freopen("in.txt", "r", stdin);
// #endif
cin>>t>>n>>m;
while(t--){
n=365;
mx = 0;
while(n--){
curr=0;
for(i=0;i<18;i++)cout<<18<<" ";cout<<"\n";
fflush(stdout);
for(i=0;i<18;i++){cin>>l;curr+=l;}
mx = max(mx, curr);
}
cout<<mx<<"\n";
fflush(stdout);
cin>>i;
if(i==-1)return 0;
}
return 0;
}
If I uncomment the fastio statement, it gives TLE.
--
You received this message because you are subscribed to the Google Groups
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-code/acd91df7-566a-47e1-a3ad-11523d51afd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.