Montazer's blog

By Montazer, history, 2 years ago, In English,

how can i submit my code for this problem ??! http://codeforces.com/problemset/problem/234/A this is my code : . . . . . . . .

include <bits/stdc++.h>

using namespace std; int main () { int n; string s; vector l , r; cin >> n >> s; for (int x=0 ; x<n ; x++){ if (s[x]=='L') l.push_back(x+1); else r.push_back(x+1);} if (r.size()%2==0){ for (int x=0 ; x<r.size() ; x+=2) cout << r[x] << " " << r[x+1] << endl; for (int x=0 ; x<l.size() ; x+=2) cout << l[x] << " " << l[x+1] << endl; } else { cout << l[0] << " " << r[0] << endl; for (int x=1 ; x<r.size() ; x+=2) cout << r[x] << " " << r[x+1] << endl; for (int x=1 ; x<l.size() ; x+=2) cout << l[x] << " " << l[x+1] << endl; }}

Read more »

 
 
 
 
  • Vote: I like it  
  • -19
  • Vote: I do not like it  

By Montazer, history, 3 years ago, In English,

Hello everyone... http://apio2016.org/results/ APIO 2016 results.. Congratulations Japan , Iran , etc...

Read more »

 
 
 
 
  • Vote: I like it  
  • -22
  • Vote: I do not like it