No older revisions available
No older revisions available
컴파일 에러..ㅡㅜ ¶
~cpp
#include <iostream>
using namespace std;
#include <vector>
unsigned int max[93000];
unsigned int count;
unsigned int found(unsigned int i)
{
unsigned int temp = 0;
while(max[temp] < i)
temp++;
return temp;
}
int main()
{
unsigned int i, length1, length2, testnum, temp = 1;
vector<unsigned int> totallength;
temp = temp << 31;
max[0] = 0;
for(count = 1; max[count-1] < temp; count++)
{
max[count] = max[count-1] + (count+1)/2;
}
cin >> testnum;
for(i = 0; i < testnum; i++)
{
cin >> length1 >> length2;
totallength.push_back(length2-length1);
}
for(i = 0; i < totallength.size(); i++)
cout << found(totallength[i]) << endl;
return 0;
}