Search found 4 matches

by dubukuangye
Wed Jul 21, 2010 4:04 am
Forum: Volume 109 (10900-10999)
Topic: 10920 - Spiral Tap
Replies: 12
Views: 9437

Re:

i did it O(1) , the upper right corners are all square of consecutive odd numbers(1 9 25 49 81 etc.). i first sqrt the number and get in which interval the number lies(i.e 40 lies in the interval [25, 49) ) four straight lines connect 25 and 49, then it's easy to find in which line, in which positi...
by dubukuangye
Sat Jul 17, 2010 9:12 am
Forum: Volume 115 (11500-11599)
Topic: 11537 - Secret Problemsetters' Union
Replies: 4
Views: 3689

Re: 11537 - Secret Problemsetters' Union

I also get RE. #include <iostream> #include <queue> using namespace std; const int MAX = 100; int B, N, A0, X, K; int main(){ int case_num, bank_num;; char order; cin >> case_num; for(int i=0; i<case_num; i++){ cin >> bank_num; priority_queue<int> bank[101]; while( true ){ cin >> order; if( order=='...
by dubukuangye
Wed Jul 14, 2010 1:04 pm
Forum: Volume 116 (11600-11699)
Topic: 11661 - Burger Time?
Replies: 37
Views: 15776

Re: 11661-Burger Time. ...Why WA?????

naseef_07cuet wrote:I already got accepted before your post.
By the way thank you.
I keep record of every position of D and R. Then use sort algorithm and search for the minimun.
This taks O(NlgN),so i get WA. Can you guys tell me the AC algorithm?

Go to advanced search