#7743: TLE C++


t29115926 (named)


#include<iostream>
using namespace std;

int main()
{
int a;
cin>>a;
while(a>=0&&a<=20)
{
for(int t=1;t<=a;t++)
{
int q,w,e,r;
for(int g=1;g<=a;g++)
{
cin>>q>>w>>e>>r;
if(w-q == e-w && e-w == r-e)
cout<<q<<" "<<w<<" "<<e<<" "<<r<<" "<<r+(e-w)<<'\n';
if(w/q == e/w && e/w == r/e)
cout<<q<<" "<<w<<" "<<e<<" "<<r<<" "<<r*(e/w)<<'\n';
else
break;
}
}
}
}
 
 
 
為何不行= =
還有TLE是甚麼狀況 
#7749: Re:TLE C++


kktest (test)


>while(a>=0&&a<=20)

恆成立,沒有終止條件

首頁有說明各訊息的意思