Skip to content

Instantly share code, notes, and snippets.

View mehmetaltuner's full-sized avatar
🦄

Mehmet Altuner mehmetaltuner

🦄
  • Clay Token
  • Istanbul Technical University
View GitHub Profile
typedef long long int lli;
lli pwr(lli a, lli b){
if(b == 1)
return a;
if(b == 0)
return 0;
lli sub_pwr = pwr(a, b/2);
#include <bits/stdc++.h>
using namespace std;
string ltrim(const string &);
string rtrim(const string &);
void print(int c, int n){
while(n--)
printf("%d", c);
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <climits>
using namespace std;
typedef long long int lli;
int main() {
int n, w = 0, c = 0;
scanf("%d", &n);
for(int i=0; i<n/2; i++){
char x;
scanf("%c", &x);
if(x == 'W')
w++;
}
#include <bits/stdc++.h>
#define pb push_back
#define fi first
#define sc second
#define inf 1000000000000000LL
#define MP make_pair
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define dbg(x) cerr<<#x<<":"<<x<<endl
#define N 100005
//http://www.lightoj.com/volume_showproblem.php?problem=1112
#include <bits/stdc++.h>
#define ALL(e) e.begin(), e.end()
#define pb push_back
#define dbg(x) (cerr << #x << ":" << x)
#define fi first
#define sc second
#define N 1003
#include <bits/stdc++.h>
#define ALL(e) e.begin(), e.end()
#define RALL(e) e.rbegin(), e.rend()
#define mp(a, b) make_pair(a, b)
#define pb push_back
#define dbg(x) (cerr << #x << ":" << x)
#define mid (l + r) / 2
#define fi first
#define sc second
#define N 1000000009