You are not logged in. Please login at www.codechef.com to post your questions!

×

# November Cook-Off

 -1 My solution of ONCHESS I got the error. asked 20 Nov '17, 00:15 37●5 accept rate: 0% 2 Mate, Improve formatting or provide solution link. :) (20 Nov '17, 00:16) Please format your code properly. Select whole code and press Ctrl + K to format it. (20 Nov '17, 00:17)

 4 Please use a better title for asking questions. answered 20 Nov '17, 13:32 0★admin ♦♦ 19.7k●350●498●541 accept rate: 35%
 1 How are you removing details of players who are paired? That's where ur solution is failing i guess. (May be at other points too, can't tell because of bad formatting) PS:Improve formatting, only then others would be able to help answered 20 Nov '17, 00:26 3.8k●23●83 accept rate: 22%
 1 You didn't check if rating of j is compatible with i. i.e. mini[i]<=rating[j]&&rating[j]<=maxi[i]  Also the first if condition is not necessary, you don't need to check constraints of input. answered 20 Nov '17, 00:37 716●2●10 accept rate: 31%
 0 1)Timings must be exactly equal, change that line to if(time[i]==time[j]) 2)(israted[i]=="rated"||israted[i]=="unrated")&&(israted[j]=="rated"||israted[j]=="unrated")) is always true, you should check whether both are either "rated" or "unrated" Why are you checking the constraints? The inputs will always satisfy the constraints. Remove unnecessary lines. Read the question 100 times and then start writing code for it !!! answered 20 Nov '17, 00:43 2★ramini 61●5 accept rate: 8% 1 Reading this Q 100 times is a pain though.... (20 Nov '17, 02:08) Read the question 100 times and the competition over!! (21 Nov '17, 06:02) kunnu1202★
 0 please anyone help me !! i have solved this que but it shows wrong answer and i am not able to find any error in my solution... i had also solved the que POLY of NOV challenge for 2nd subtask.. why this happens to me.. please give me some tricks or a way to know where i am wrong... code for ONCHESS https://www.codechef.com/viewsolution/16321625 #include using namespace std; struct abc{ int r; int mn; int mx; int ch; }; typedef struct abc s; int main() { int T,n,tmp,i,j; char str[8]; cin >> T ; while(T--) { cin >> n ; s a[n]; for(i=0;i<8;i++) { str[i]=0; } for(i=0;i> a[i].r >> a[i].mn >> a[i].mx >> tmp >> str ; if(tmp%2) { if(tmp%3) a[i].ch=0; else a[i].ch=4; } else { if(tmp%4) a[i].ch=8; else a[i].ch=12; } if(str[0]=='u') { a[i].ch += 16; } for(j=0;j<8;j++) { str[j]=0; } cin >> str; if(str[0]=='r') { a[i].ch +=2; for(j=0;j= a[j].mn && a[i].r <= a[j].mx && a[j].r >= a[i].mn && a[j].r <= a[i].mx ) { a[j].ch=-500; a[i].ch=-500; cout << j+1 << endl ; break; } } } if(j!=i) continue; } else { a[i].ch+=1; if(str[0]=='b') a[i].ch*=(-1); for(j=0;j= a[j].mn && a[i].r <= a[j].mx && a[j].r >= a[i].mn && a[j].r <= a[i].mx) { a[j].ch=-500; a[i].ch=-500; cout << j+1 << endl ; break; } } } if(j!=i) continue; } cout << "wait" << endl; } } return 0; }  answered 20 Nov '17, 01:57 1●1 accept rate: 0% i had also solved the que POLY of NOV challenge for 2nd subtask.. why this happens to me.. Of what relevance is this line here? (20 Nov '17, 02:09) @vijju123 I think he's trying to say that he solved a very hard "poly" problem(Show off) but why he couldn't solve this problem!! (20 Nov '17, 09:14) kunnu1202★ He solved it only for 30 points, which was easily available on internet. Whats there to show off lol :/ (20 Nov '17, 10:18) It was on the internet? Dang I missed the chance (ಥـْـِـِـِـْಥ) (21 Nov '17, 07:34) kunnu1202★
 0 You can try looking at this solution. It is almost as same as yours. https://www.codechef.com/viewsolution/16320877 answered 20 Nov '17, 10:07 9●2 accept rate: 0%
 0 *** > strong text ***Hey, YOU can go through my codes.It is very simple. #include #include using namespace std; int main() { int t; cin>>t; while(t--) { int i,j,n,rat[102]={0},min[102]={0},max[102]={0},t[102]={0}; char israt[102][10],col[102][10],b[10]="black",w[10]="white",ran[10]="random"; cin>>n; for(i=1;i<=n;i++) cin>>rat[i]>>min[i]>>max[i]>>t[i]>>israt[i]>>col[i]; int check[102]={0}; for(i=1;i<=n;i++) { int flag=0; if(i==1) cout<<"wait"<=min[i]) && (rat[i] <=max[j]) && (rat[i] >=min[j]) && (t[i]==t[j]) && (strcmp(israt[i],israt[j])==0) && check[j]==0) { if((strcmp(col[i],ran)==0 && strcmp(col[j],ran)==0) || (strcmp(col[j],b)==0 && strcmp(col[i],w)==0 ) || (strcmp(col[j],w)==0 && strcmp(col[i],b)==0)) { flag=1; cout<
 toggle preview community wiki:
Preview

### Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×530

question asked: 20 Nov '17, 00:15

question was seen: 752 times

last updated: 27 Nov '17, 14:36