<span id="mktg5"></span>

<i id="mktg5"><meter id="mktg5"></meter></i>

        <label id="mktg5"><meter id="mktg5"></meter></label>
        最新文章專題視頻專題問答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:59
        文檔

        BestCoderRound#11(Div.2)前三題題解_html/css

        BestCoderRound#11(Div.2)前三題題解_html/css_WEB-ITnose:題目鏈接: huangjing hdu5054 Alice and Bob 思路: 就是(x,y)在兩個參考系中的表示演完全一樣。那么只可能在這個矩形的中點。 題目: Alice and Bob Time Limit: 2000/1000 MS (Java/Others) Memory Li
        推薦度:
        導讀BestCoderRound#11(Div.2)前三題題解_html/css_WEB-ITnose:題目鏈接: huangjing hdu5054 Alice and Bob 思路: 就是(x,y)在兩個參考系中的表示演完全一樣。那么只可能在這個矩形的中點。 題目: Alice and Bob Time Limit: 2000/1000 MS (Java/Others) Memory Li

        題目鏈接:

        huangjing

        hdu5054 Alice and Bob

        思路:

        就是(x,y)在兩個參考系中的表示演完全一樣。那么只可能在這個矩形的中點。

        題目:

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


        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: 5057 5052 5051 5050 5049


        代碼:

        #include#include#include#include#include#include#include#include#include#define eps 1e-9#define ll long long#define INF 0x3f3f3f3fusing namespace std;int main(){ int x,y,n,m; while(scanf("%d%d%d%d",&n,&m,&x,&y)!=EOF) { if(2*x==n&&2*y==m) printf("YES\n"); else printf("NO\n"); } }

        hdu 5055 Bob and math problem

        題意:

        就是給出n個數字,然后要你找到一個滿足如下條件的數。

        (1)這個數是奇數。

        (2)這個數是是最大的數。

        (3)還有一個被cha的點是所有的數字都要用到。我就是0 0 1 被cha了。我還故意特判這種情況,都是題目沒有讀懂啊。

        思路:

        貪心的做法,首先看所有的位是否存在基數,如果基數都沒有,那么肯定是不存在這種數的,其次如果有,那么就將最小的基數找出來做各位,然后將所有的位進行排序,然后從低位向高位賦值,那么就得到這個樹了,最后判斷一下,如果首位為0,那么這個數就是不存在的,因為要求輸出所有的位。

        題目:

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


        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. 1. must be an odd Integer.
      2. 2. there is no leading zero.
      3. 3. find the biggest one which is satisfied 1, 2.

      4. 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 _1, a_2, a_3, \cdots, a_n. ( 0 \leqwhich indicate the digit $a 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: 5057 5052 5051 5050 5049

        代碼:

        #include#include#include#include#include#include#include#include#include#define eps 1e-9#define ll long long#define INF 0x3f3f3f3fusing namespace std;const int maxn=100+10;int a[maxn],odd[maxn];char str[maxn];int n;int main(){ int ans,pd; while(scanf("%d",&n)!=EOF) { memset(str,0,sizeof(str)); int cnt=0,first=0; for(int i=1;i<=n;i++) { scanf("%d",&a[i]); if(a[i]%2) odd[++cnt]=a[i]; } sort(odd+1,odd+1+cnt); sort(a+1,a+1+n); int ly=n-1; if(cnt==0) puts("-1"); else { str[ly]=odd[1]+'0'; ly--; for(int i=1;i<=n;i++) { if(a[i]==odd[1]&&!first) { first=1; continue; } else { str[ly]=a[i]+'0'; ly--; } } if(str[0]=='0') puts("-1"); else { for(int i=0;i<=n-1;i++) printf("%c",str[i]); printf("\n"); } } } return 0;}


        hdu 5056 Boring count

        題意:

        給出一個字符串,然后求出它所有的子串中每個字母的數目不超過k個的所有的子串的數目。

        思路:

        枚舉每一個字符,然后以每個字符i為子串末尾,然后得到的滿足條件的子串的最長長度。就算字母相同,只要位置不相同就算不同的。2333333333,那么思路就是維護一個起點st,每當第i個字符的數目大于k后 ,那么就將st后移,同時將當前的每個cnt[i]減減,直到移動到與i相同的字符你,那么從st到i這段字符就滿足條件了。。覺得這個思路真是神奇。。

        題目;

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


        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: 5057 5052 5051 5050 5049

        代碼:

        #include#include#include#include#include#include#include#include#include#define eps 1e-9#define ll long long#define INF 0x3f3f3f3fusing namespace std;const int maxn=100000+10;char str[maxn];int cnt[28];int main(){ ll ans; int t,st,k,ly; scanf("%d",&t); while(t--) { memset(cnt,0,sizeof(cnt)); st=ans=0; scanf("%s%d",str,&k); for(int i=0;str[i]!='\0';i++) { ly=str[i]-'a'; cnt[ly]++; if(cnt[ly]>k) { while(str[st]!=str[i]) { cnt[str[st]-'a']--; st++; } cnt[ly]--; st++; } ans+=i-st+1; } printf("%I64d\n",ans); } return 0;}

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

        文檔

        BestCoderRound#11(Div.2)前三題題解_html/css

        BestCoderRound#11(Div.2)前三題題解_html/css_WEB-ITnose:題目鏈接: huangjing hdu5054 Alice and Bob 思路: 就是(x,y)在兩個參考系中的表示演完全一樣。那么只可能在這個矩形的中點。 題目: Alice and Bob Time Limit: 2000/1000 MS (Java/Others) Memory Li
        推薦度:
        標簽: 11 html div
        • 熱門焦點

        最新推薦

        猜你喜歡

        熱門推薦

        專題
        Top
        主站蜘蛛池模板: 免费黄网在线观看| 国产成在线观看免费视频| 国产精品久久免费视频| 亚洲精品无码专区| 麻豆国产入口在线观看免费| 日韩亚洲产在线观看| 精品少妇人妻AV免费久久洗澡 | 伊人久久亚洲综合影院| 特级一级毛片免费看| 亚洲成片观看四虎永久| 抽搐一进一出gif免费视频| 久久精品国产亚洲香蕉| 国产成人精品免费午夜app| 亚洲w码欧洲s码免费| 日韩免费无码一区二区视频| 美女被爆羞羞网站免费| 亚洲精品夜夜夜妓女网| 可以免费观看的毛片| 亚洲一区二区三区无码国产| 日韩免费无码一区二区视频| 一个人看的免费观看日本视频www 一个人看的免费视频www在线高清动漫 | 国内精品一级毛片免费看| 亚洲毛片基地日韩毛片基地| 成人毛片免费视频| 日亚毛片免费乱码不卡一区| 国产成人A人亚洲精品无码| 亚洲免费在线观看视频| 日本亚洲欧美色视频在线播放| 亚洲日本韩国在线| 亚洲免费视频观看| 美女被免费网站视频在线| 久久综合日韩亚洲精品色| 在线精品免费视频无码的| 久久不见久久见免费影院www日本| 亚洲成人午夜在线| 日韩免费一区二区三区| 久久国产乱子精品免费女| 亚洲色大18成人网站WWW在线播放 亚洲色大成WWW亚洲女子 | 亚洲国产一区视频| 日本h在线精品免费观看| 美女黄网站人色视频免费|