这道题我比赛的时候懵了,那么简单一道题,我还想成了网络流相关。。。sb了,,,
#include <iostream>
#include <fstream>
#include <cstring>
#include <cstdio>
using namespace std ;
ifstream fin ( "input.txt" ) ;
ofstream fout ( "output.txt" ) ;
int n ;
char student[105] ;
int map[205][205] , p[205] ;
int main()
{
int i , j ;
fin >> n ;
fin >> student ;
for( i = 0 ; i < n / 2 ; i ++ )
{
if( student[i] == 'R' && student[i+n/2] == 'L' ) fout << i+1+n/2 << " " << i+1<< endl ;
else fout << i+1 << " " << i+1+n/2 << endl ;
}
return 0 ;
}
分享到:
相关推荐
Codeforces部门2,A # And a2oj Ladder 4 some problems Ladder URL:http://a2oj.com/Ladder.jsp?ID=4难度等级:2问题提示: 1- 4A. Watermelon: http://codeforces.com/problemset/problem/4/A 2- 71A. Way Too ...
lucifer1004大佬的博客cf上分攻略故里大佬的githubcf思维题刷题数:44- (1421)codeforces 676 div2 A,B done
CodeForces-A2OJ-Div-2.A 我根据A2OJ阶梯解决CodeForces问题的方法
接受串子-接受字符串相等-接受Codeforces回合#684(Div.2) 2/6 1440A-购买琴弦-接受1440B -中位数的总和-已接受1440C1-二进制表(简易版)-已接受1440C2-二进制表(硬版)-已接受 Codeforces回合#683(分区2) 1/...
Oops! Google Chrome could not connect to codeforces.com Try reloading: codeforces.com Additional suggestions: Access a cached copy of codeforces.com Search on Google:
cf CodeForces和其他网站的问题... A目录包含来自CodeForces的Div2 A问题的更多解决方案。 名称以“ _fail”结尾的文件是无效的解决方案,代表我自己尝试解决这些问题的努力。 我认为他们值得做笔记。 它们是我的宝贝。
葫芦聚聚说可以n^2搞。。 还好没卡我n^3 的做法。。 核心思路就是f[i]表示 前i个数最小能分成几个数。 然后由于前i个数都分好了,我们只需要取min f[k]+1( 满足k<i>n; for(int i=1;i>a[i],d
给一个长度为n的数组,两种操作,一个是把任意一个ai变成ai+2a_i变成a_i+2ai变成ai+2,另一个是如果所有数都大于0,可以把所有数减1,问通过这些操作能否把所有数变为0 思路: 如果任意两个数之差为奇数,那么就...
输入一个正整数x,找出这样的2个正整数a和b,使得gcd(a,b)+lcm(a,b)=x 解题思路 找最特殊的情况a=1,b=x-1即可 这样a,b两个数最大公因数为1,最小公倍数x-1,满足题意√ 附上代码 #include #define int long long #...
将所有数字看成2进制,从最高位看起,如果第i位上为1的数只有一个的话,那么这个数必然对答案有贡献,就把它排在第一个,后面任意排。 例:11,6,4,0 二进制表示为:1011,110,100,0 右起第四位为1的只有1011,...
传送门 题意: 开始位置在0,问能否跳到n+1位置 每步只能跳d 在1——n每个位置有方向,L,R,求d的最小值 思路: 只用找相邻两个R之间的最大值即可 ...#define rep(i,a,b) for(int i=a;i=b;i--) typedef long long l
A. EhAb AnD gCd 直接输出1,n-1即可 #include #include #include #include #include #include #include #include #include #include #define pb push_back #define lb lower_bound #define ub upper_bound #...
A #include using namespace std; typedef long long ll; int main(){ int t; cin>>t; while(t--){ ll x; cin>>x; cout<<1>>t; while(t--){ st.clear(); ll n; cin >>n; ll re
目录传送门题意:思路:代码: 传送门 题意: 思路: 就是让判断给出的数据是否合理 两个p,c p,c肯定是是增加的,要么不变 p不变的话,c肯定不能变 始终p应该是大于等于c的 如果两个同时增加,p增加的应该大于等于c...
传送门 题意: 找规律,题意就是有多少种方式填充该图形 画两个就发现,输出n即可 代码: #include #include #include #include #include #include #include #include ...#define SZ(x) ((int)(x)
B. Longest Palindrome time limit per test1 second memory limit per test256 megabytes ... He learned that a palindrome is a string that is the same as its reverse. For example, strings
Codeforces Round #620 (Div. 2) [codeforces 1304A] Two Rabbits 整除+模 总目录详见https://blog.csdn.net/mrcrack/article/details/103564004 在线测评地址https://codeforces.ml/contest/1304/problem/A ...
传说门 刚好今晚是中国场! 其实这道题比较水,但当时思路错,一心想着化简公式,浪费了好多时间a....#pragma GCC optimize(2) #include #define ll long long #define endl '\n' using namespace std; const int manx=
He learned that a palindrome is a string that is the same as its reverse. For example, strings “pop”, “noon”, “x”, and “kkkkkk” are palindromes, while strings “moon”, “tv”, and “abab” ...