Tag: Codeforces Round #411 (Div. 2)
Codeforces Round #411 (Div....
#include <set>
#include <vector>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int...
Codeforces Round #411 (Div....
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<set>
using namespace std;
const int MX=600111;
int n,m;
int pool,*c,s;
int hed,nxt,t,ec,vis,vism,no;
set<int>cur;
inline void...
Codeforces Round #411 (Div....
#include<bits/stdc++.h>
using namespace std;
int c,d,i,n,m,k,x,j=1000000007;
string s;
main(){
cin>>s;
for(i=s.size()-1;i>=0;i--){
if(s=='b')c++;else{
k+=c;c*=2;k%=j;c%=j;
}
}
cout<<k;
}
Codeforces Round #411 (Div....
#include<iostream>
main(){int n;std::cin>>n;std::cout<<(n-1)/2;}
Codeforces Round #411 (Div....
#include <cstdio>
int n;
int main (){
scanf("%d", &n);
for (int i =...
Codeforces Round #411 (Div....
#include <iostream>
int l,r;
int main() {
std::cin>>l>>r;
std::cout<<(l==r ? l:2);
return 0;
}