1. 程式人生 > >CodeForces 1B. Spreadsheets(模擬)

CodeForces 1B. Spreadsheets(模擬)

In the popular spreadsheets systems (for example, in Excel) the following numeration of columns is used. The first column has number A, the second — number B, etc. till column 26 that is marked by Z. Then there are two-letter numbers: column 27 has number AA, 28 — AB, column 52 is marked by AZ. After ZZ there follow three-letter numbers, etc.

The rows are marked by integer numbers starting with 1. The cell name is the concatenation of the column and the row numbers. For example, BC23 is the name for the cell that is in column 55, row 23.

Sometimes another numeration system is used: RXCY, where X and Y are integer numbers, showing the column and the row numbers respectfully. For instance, R23C55 is the cell from the previous example.

Your task is to write a program that reads the given sequence of cell coordinates and produce each item written according to the rules of another numeration system.

相關推薦

CodeForces 1B. Spreadsheets模擬

In the popular spreadsheets systems (for example, in Excel) the following numeration of columns is used. The first column has number A, the second — numb

CodeForces 705C Thor 模擬

C. Thor time limit per test 2 seconds memory limit per test 256 megabytes input standard

CodeForces 888C K-Dominant Character模擬

exist mini tput eof one blog mina nsis i++ You are given a string s consisting of lowercase Latin letters. Character c is called k-domina

Codeforces 1025A Doggo Recoloring模擬

ast class cout str eps color 模擬 tor get 題目鏈接:CF 1025A 題意:每次可以把有兩個以上相同的字符轉換成另一個字符。問最後能不能得到只有一種字符的字符串。 題解:只要存在一種字符有兩個以上,那麽一定能。註意n==1的情況也是OK

CodeForces - 1051C 】Vasya and Multisets 模擬

題幹: Vasya has a multiset ss consisting of nn integer numbers. Vasya calls some number xxnice if it appears in the multise

Codeforces Round #515 (Div. 3) B模擬

題意:在數列中值為1的位置有1個加熱器,它能覆蓋它的左邊第 r-1 位置到它的右邊 r-1 的位置,問最少多少個加熱器能覆蓋整個區間。 思路:模擬這個過程,首先now=1,然後遍歷所有位置,找到最遠的滿足now這個位置能加熱的點,再另now=i+r-1+1,之所以要+1,是因為,i+r-1這個位

Codeforces Round #515 (Div. 3) D模擬

題意:有m個箱子,每個箱子容量為k,問你最多能裝多少個物品,你只能依次捨棄前面的,後面的必須全部裝完。 思路:題目意思是裝過東西的箱子如果你又拿了一個箱子,那麼以前的箱子就裝不了了,即使還能裝。所以倒著遍歷物品,模擬一下就行了。 #include<bits/stdc++.h> u

Codeforces Round #515 (Div. 3) C 模擬

題意: 三種操作: L id ,將編號為id的書放在最左邊; R id,將編號為id的書放在最右邊; ?id,查詢編號為id的書左右兩邊哪一邊的數量最小,輸出最小值。 思路: 用l和r表示下一個左或右的位置,然後模擬就行了。 #include<bits/stdc++

CodeForces - 266B 】Queue at the School 模擬

題幹: During the break the schoolchildren, boys and girls, formed a queue of n people in the canteen. Initially the children stood in the

Codeforces Round #224 (Div. 2): C. Arithmetic Progression模擬

  題意: 給你n個數字,你需要再新增一個數字,使得最後所有數字排序之後任意相鄰兩個數之差全部相等,問可以新增多少種不同的數字   思路: 一看就是水題但是情況不少,沒了 例如所有數字全部相等,只有兩個數字,且它們的差是偶數/奇數等等 &nb

CodeForces - 266C】Below the Diagonal模擬

You are given a square matrix consisting of n rows and n columns. We assume that the rows are numbered from 1 to 

Codeforces 1077B Disturbed People 模擬

  B. Disturbed People time limit per test 1 second memory limit per test 256 megabytes input standard input output standard o

CodeForces 1082B Vova and Trophies模擬

傳送門 題目大意就是讓一個'S'和'G'更換一下位置,然後更換後的字串裡連續'G'串的最大長度。 用一個Gnt1記錄第一段一共有多少個'G‘,Gnt2記錄第二段有幾個'G',立一個flag來記錄序列是否終止,即遇到'S'更新flag的值,同時也更新前邊隔段的數值為零。用ans記錄當前為止相鄰

Educational Codeforces Round 51 (Rated for Div. 2).A. Vasya And Password模擬

A. Vasya And Password time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output

Codeforces Round #518 (Div. 2): E. Multihedgehog模擬

題意: 1-刺蝟圖滿足: 是一棵樹 存在一箇中心節點u與其它所有點相連 包括中心節點在內,至少4個節點 2-刺蝟圖滿足: 是一棵樹 存在一箇中心節點u與其它所有1-刺蝟圖的中心節

CodeForces - 796B-Find The Bone模擬

Zane the wizard is going to perform a magic show shuffling the cups. There are n cups, numbered from 1 to n, placed along t

Codeforces 1077B Disturbed People 模擬

B. Disturbed People time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output

Codeforces Round #445 (Div. 2): D. Restoration of string模擬

A substring of some string is called the most frequent, if the number of its occurrences is not less than number of occurrences of any other substring.

CodeForces 803B】Distances to Zero模擬

 B. Distances to Zero time limit per test 2 seconds memory limit per test 256 megabytes inp

Codeforces Round #528 (Div. 2, based on Technocup 2019 Elimination Round 4)-A. Right-Left Cipher模擬

題目連結:http://codeforces.com/contest/1087/problem/A 題意:給你一個加密後的字串讓你解密。加密的過程是 思路:從中間開始向兩邊輸出,如果是偶數再多輸出一位。   #include<bits/stdc++.h> u