国产99久久精品_欧美日本韩国一区二区_激情小说综合网_欧美一级二级视频_午夜av电影_日本久久精品视频

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

BestCoderRound#11(Div.2)題解集合_html/css

來源:懂視網 責編:小采 時間:2020-11-27 15:55:57
文檔

BestCoderRound#11(Div.2)題解集合_html/css

BestCoderRound#11(Div.2)題解集合_html/css_WEB-ITnose:Alice and Bob Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 155 Accepted Submission(s): 110 Problem Description Bob and Alice got separated in the Square, they agreed that if the
推薦度:
導讀BestCoderRound#11(Div.2)題解集合_html/css_WEB-ITnose:Alice and Bob Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 155 Accepted Submission(s): 110 Problem Description Bob and Alice got separated in the Square, they agreed that if the

Alice and Bob Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 155 Accepted Submission(s): 110


Problem Description

Bob and Alice got separated in the Square, they agreed that if they get separated, they'll meet back at the coordinate point (x, y). Unfortunately they forgot to define the origin of coordinates and the coordinate axis direction. Now, Bob in the lower left corner of the Square, Alice in the upper right corner of the the Square. Bob regards the lower left corner as the origin of coordinates, rightward for positive direction of axis X, upward for positive direction of axis Y. Alice regards the upper right corner as the origin of coordinates, leftward for positive direction of axis X, downward for positive direction of axis Y. Assuming that Square is a rectangular, length and width size is N * M. As shown in the figure:

Bob and Alice with their own definition of the coordinate system respectively, went to the coordinate point (x, y). Can they meet with each other ?
Note: Bob and Alice before reaching its destination, can not see each other because of some factors (such as buildings, time poor).


Input

There are multiple test cases. Please process till EOF. Each test case only contains four integers : N, M and x, y. The Square size is N * M, and meet in coordinate point (x, y). ( 0 < x < N <= 1000 , 0 < y < M <= 1000 ).


Output

If they can meet with each other, please output "YES". Otherwise, please output "NO".


Sample Input

 

10 10 5 510 10 6 6


Sample Output

 

YESNO


Source

BestCoder Round #11 (Div. 2)


Recommend

heyang | We have carefully selected several similar problems for you: 5053 5052 5051 5050 5049

題意:

給一個矩形區域告訴你它的長和寬。然后兩個坐標系。一個為左下角為原點。右上為正方向。一個右上角為原點。右下為正方向。現在給你一個坐標(x,y)問你在兩種坐標系中他們是不是表示同一個點。

思路:

把不同的坐標系轉換到同一坐標系就行了。我是把左上角轉換到右下角的。

詳細見代碼:

#include#include#include#includeusing namespace std;const int INF=0x3f3f3f3f;const int maxn=100010;typedef long long ll;int main(){ int n,m,x,y; while(~scanf("%d%d%d%d",&n,&m,&x,&y)) { if(x==n-x&&y==m-y) printf("YES\n"); else printf("NO\n"); } return 0;}

Bob and math problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 456 Accepted Submission(s): 169


Problem Description

Recently, Bob has been thinking about a math problem.
There are N Digits, each digit is between 0 and 9. You need to use this N Digits to constitute an Integer.
This Integer needs to satisfy the following conditions:

  • 1. must be an odd Integer.
  • 2. there is no leading zero.
  • 3. find the biggest one which is satisfied 1, 2.

  • Example:
    There are three Digits: 0, 1, 3. It can constitute six number of Integers. Only "301", "103" is legal, while "130", "310", "013", "031" is illegal. The biggest one of odd Integer is "301".


    Input

    There are multiple test cases. Please process till EOF.
    Each case starts with a line containing an integer N ( 1 <= N <= 100 ).
    The second line contains N Digits which indicate the digit $a_1, a_2, a_3, \cdots, a_n. ( 0 \leq a_i \leq 9)$.


    Output

    The output of each test case of a line. If you can constitute an Integer which is satisfied above conditions, please output the biggest one. Otherwise, output "-1" instead.


    Sample Input

     

    30 1 335 4 232 4 6


    Sample Output

     

    301425-1


    Source

    BestCoder Round #11 (Div. 2)


    Recommend

    heyang | We have carefully selected several similar problems for you: 5053 5052 5051 5050 5049

    題意:

    給你n個數字要你組成 n位數的最大的一個奇數。不行就輸出-1.

    思路:

    開始讀錯題意了。以為輸出的不一定要用到所有數字。于是判完后就掛了。真搞不懂怎么過開始的數據的。。

    這題貪心構造就行了。先找一個最小的奇數來做個位如果沒有的話就-1。然后把剩下的數排序。如果剩下的還有數字且最大的為0的話肯定輸出-1了。不是的話就按降序輸出在加上那會找的奇數就行了。

    詳細見代碼:

    #include#include#include#includeusing namespace std;const int INF=0x3f3f3f3f;const int maxn=100010;typedef long long ll;int arr[150],brr[150];int main(){ int n,i,p,ct; while(~scanf("%d",&n)) { ct=0,p=-1; for(i=0;i

    Boring count Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
    Total Submission(s): 250 Accepted Submission(s): 98


    Problem Description

    You are given a string S consisting of lowercase letters, and your task is counting the number of substring that the number of each lowercase letter in the substring is no more than K.


    Input

    In the first line there is an integer T , indicates the number of test cases.
    For each case, the first line contains a string which only consist of lowercase letters. The second line contains an integer K.

    [Technical Specification]
    1<=T<= 100
    1 <= the length of S <= 100000
    1 <= K <= 100000


    Output

    For each case, output a line contains the answer.


    Sample Input

     

    3abc1abcabc1abcabc2


    Sample Output

     

    61521


    Source

    BestCoder Round #11 (Div. 2)


    Recommend

    heyang | We have carefully selected several similar problems for you: 5053 5052 5051 5050 5049

    題意:

    給你一個長度不超過1e5由小寫組成的字符串。問你它有多少個子串。滿足子串的每個字符出現的次數都不超過k。

    思路:

    對于一個滿足條件的左端點le。把右端點ri的字符一個一個的加進去。如果還是滿足條件。這個新加進的字符將會貢獻ri-le+1個以該子符為右端點的子串。如果不滿足條件了就左移le指針知道滿足條件即可。比賽時早就想到思路了。可各種邏輯錯誤1小時+才1A。

    詳細見代碼:

    #include#include#include#includeusing namespace std;const int INF=0x3f3f3f3f;const int maxn=100002;typedef long long ll;char txt[maxn];int vis[27];ll ans=0;int main(){ int t,n,k,le,ri,p; scanf("%d",&t); while(t--) { scanf("%s%d",txt,&k); n=strlen(txt); ans=le=ri=0; memset(vis,0,sizeof vis); p=-1; while(ri<=n) { if(p==-1) { vis[txt[ri]-'a']++; if(vis[txt[ri]-'a']>k) p=ri; else if(ri

    Argestes and Sequence Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
    Total Submission(s): 192 Accepted Submission(s): 44


    Problem Description

    Argestes has a lot of hobbies and likes solving query problems especially. One day Argestes came up with such a problem. You are given a sequence a consisting of N nonnegative integers, a[1],a[2],...,a[n].Then there are M operation on the sequence.An operation can be one of the following:
    S X Y: you should set the value of a[x] to y(in other words perform an assignment a[x]=y).
    Q L R D P: among [L, R], L and R are the index of the sequence, how many numbers that the Dth digit of the numbers is P.
    Note: The 1st digit of a number is the least significant digit.


    Input

    In the first line there is an integer T , indicates the number of test cases.
    For each case, the first line contains two numbers N and M.The second line contains N integers, separated by space: a[1],a[2],...,a[n]?initial value of array elements.
    Each of the next M lines begins with a character type.
    If type==S,there will be two integers more in the line: X,Y.
    If type==Q,there will be four integers more in the line: L R D P.

    [Technical Specification]
    1<=T<= 50
    1<=N, M<=100000
    0<=a[i]<=$2^{31}$ - 1
    1<=X<=N
    0<=Y<=$2^{31}$ - 1
    1<=L<=R<=N
    1<=D<=10
    0<=P<=9


    Output

    For each operation Q, output a line contains the answer.


    Sample Input

     

    15 710 11 12 13 14Q 1 5 2 1Q 1 5 1 0Q 1 5 1 1Q 1 5 3 0Q 1 5 3 1S 1 100Q 1 5 3 1


    Sample Output

     

    511501


    Source

    BestCoder Round #11 (Div. 2)


    Recommend

    heyang | We have carefully selected several similar problems for you: 5053 5052 5051 5050 5049

    題意:

    給你一個長度不超過1e5的數列。你可以進行兩種操作。

    1.S x y。把第x個數變成y。

    2.Q l r d p 。詢問[l,r]中數的第d個數字是p的有多少個。

    思路:
    看到這題。喜出望外。今天是可以ak的節奏啊。(不知道1002會掛。--||)。感覺典型線段樹的應用。每個節點一個數組val[rt][i][j]。表示節點代表的區間里第i個數字為j的有多少個。然后歡快的寫完了。寫完編譯運行一次通過。無任何錯誤和警告測樣例完全正確!然后愉快的交了。然后就mle了。。當時就傻了。一看題目內存限制。暈。居然有數據結構題目卡內存的。然后想了下樹狀數組開1e7空間就算是short也超了,但是想到了離線處理每一位的修改和詢問。但這時已經20:20。依稀的記得20:30就要開hack了。就放棄了掙扎了。后來醒悟后還是沒時間改了。雖然正解有我說的離線處理。但是總覺得還是蠻麻煩的就用分塊寫了。就是分成sqrt(n)塊。塊內直接暴力。塊間利用整塊信息維護快速算出答案。時間復雜度O(n*sqrt(n))。寫完一交居然rank1.估計O(10*n*log(n))的做法常數太大了。

    詳細見代碼:

    #include#include#include#include#includeusing namespace std;const int INF=0x3f3f3f3f;const int maxn=100003;typedef long long ll;#define lson L,mid,ls#define rson mid+1,R,rsint val[maxn][11],da[400][11][10],x;int main(){ int t,n,m,i,j,le,ri,d,p,x,y,bk,ans,st,ed,lim; char cmd[10]; scanf("%d",&t); while(t--) { scanf("%d%d",&n,&m); bk=ceil(sqrt(1.0*n)); memset(da,0,sizeof da); memset(val,0,sizeof val); for(i=1;i<=n;i++) { scanf("%d",&x); for(j=1;j<=10;j++) { val[i][j]=x%10; x/=10; } p=(i-1)/bk; for(j=1;j<=10;j++) da[p][j][val[i][j]]++; } for(i=0;i

    聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

    文檔

    BestCoderRound#11(Div.2)題解集合_html/css

    BestCoderRound#11(Div.2)題解集合_html/css_WEB-ITnose:Alice and Bob Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 155 Accepted Submission(s): 110 Problem Description Bob and Alice got separated in the Square, they agreed that if the
    推薦度:
    標簽: html css div
    • 熱門焦點

    最新推薦

    猜你喜歡

    熱門推薦

    專題
    Top
    主站蜘蛛池模板: 国产精品久久久久久久专区 | 黄网站色视频免费观看 | 欧美色老头 | 国产精品久久久久久久久久久久 | 婷婷在线视频观看 | 久久久国产成人精品 | 久久久久久久久久久9精品视频 | 99精品国产成人一区二区 | 久国产精品视频 | 国产日韩欧美另类重口在线观看 | 国产91在线 | 中文 | 国产一区二区三区免费 | 一级全黄毛片 | 91久久青草精品38国产 | 国内精品伊人久久久久 | 日韩精品免费看 | 日韩在线观看第一页 | 欧美videos极品另类 | 美女一区 | 精品视频免费看 | 国产高清一区二区三区 | 一区二区三区在线视频观看 | 欧美日本免费一区二区三区 | 免费国产线观看免费观看 | 青青国产在线 | 亚洲欧洲中文字幕 | 91精品一区二区三区在线观看 | 国产视频高清在线观看 | 尤物视频黄 | 国产成人深夜福利短视频99 | 日韩欧美一区二区三区免费看 | 亚洲 欧美 日韩在线 | 欧美日韩精品一区二区三区视频在线 | 毛片免费观看成人 | 国产日韩视频一区 | 国产精品久久久久久久久免费 | 午夜国产电影 | 久久久青青久久国产精品 | 国产真实乱人视频在线看 | 99精品欧美一区二区三区综合在线 | 国产精品久久一区一区 |