A - Vasya and Football
纯模拟。。比较坑的是会有不符合足球常识的地方。。
代码如下:
#include <iostream>#include <cstdio>#include <string>#include <cstring>#include <stdlib.h>#include <math.h>#include <ctype.h>#include <queue>#include <map>#include <set>#include <algorithm>using namespace std;#define LL __int64const int INF=0x3f3f3f3f;struct node{ int num, time, f; char ah;}fei[100];int cmp(node x, node y){ return x.time<y.time foul c if return main char s1 s2 c1 c2 int n i j t cnt="0," num flag scanf for fei break sort>=2){ if(fei[i].ah=='h') printf("%s ",s1); else printf("%s ",s2); printf("%d %d\n",fei[i].num,fei[i].time); } } return 0;}</y.time></algorithm></set></map></queue></ctype.h></math.h></stdlib.h></cstring></string></cstdio></iostream>
B - Vasya and Wrestling
水题。。先比较和然后再根据题意比较字典序即可。实在没啥好说的。。
代码如下:
#include <iostream>#include <cstdio>#include <string>#include <cstring>#include <stdlib.h>#include <math.h>#include <ctype.h>#include <queue>#include <map>#include <set>#include <algorithm>using namespace std;#define LL __int64const int INF=0x3f3f3f3f;LL a[210000], b[210000];int main(){ LL cnt1=0, cnt2=0, n, x, s1=0, s2=0, t; int i; scanf("%I64d",&n); while(n--){ scanf("%I64d",&x); if(x>0){ a[cnt1++]=x; s1+=x; } else{ b[cnt2++]=-x; s2-=x; } if(n==0) t=x>0?1:2; } if(s1>s2) printf("first\n"); else if(s1<s2 printf else int flag="0;" for if>b[i]){ flag=1; break; } else if(a[i]<b flag="2;" break if puts else>cnt2) puts("first"); else if(cnt1<cnt2 puts else if return>C - Vasya and Basketball <p></p> <p>也是一水题。。不过我直接跪了。。各种细节手残。。居然错了11次。。。。。中间还交到D题去了一次。。。</p> <p>先把各种出现过的数存起来,排序,然后分别二分判断两人有多少个二分,有多少三分的,找最大值即可。</p> <p>代码如下:</p> <p></p> <pre name="code" class="sycode">#include <iostream>#include <cstdio>#include <string>#include <cstring>#include <stdlib.h>#include <math.h>#include <ctype.h>#include <queue>#include <map>#include <set>#include <algorithm>using namespace std;#define LL __int64const int INF=0x3f3f3f3f;int a[210000], b[210000], n, m, c[420000], f[420000];int bin_search(int d[], int x, int high){ int low=1, mid, ans=0; while(low>1; if(d[mid] <br> <br> D - Vasya and Chess <br> <p></p> <p>猜想题、、所以我是猜的、、证明不会。。</p> <p>代码如下:<br> </p> <pre name="code" class="sycode">#include <iostream>#include <cstdio>#include <string>#include <cstring>#include <stdlib.h>#include <math.h>#include <ctype.h>#include <queue>#include <map>#include <set>#include <algorithm>using namespace std;#define LL __int64const int INF=0x3f3f3f3f;int main(){ int n; scanf("%d",&n); if(n%2==0) printf("white\n1 2\n"); else printf("black\n"); return 0;}</algorithm></set></map></queue></ctype.h></math.h></stdlib.h></cstring></string></cstdio></iostream>

本文討論了HTML&lt; Progress&gt;元素,其目的,樣式和與&lt; meter&gt;元素。主要重點是使用&lt; progress&gt;為了完成任務和LT;儀表&gt;對於stati

本文討論了html&lt; datalist&gt;元素,通過提供自動完整建議,改善用戶體驗並減少錯誤來增強表格。Character計數:159

本文討論了HTML&lt; meter&gt;元素,用於在一個範圍內顯示標量或分數值及其在Web開發中的常見應用。它區分了&lt; meter&gt;從&lt; progress&gt;和前

本文討論了視口元標籤,這對於移動設備上的響應式Web設計至關重要。它解釋瞭如何正確使用確保最佳的內容縮放和用戶交互,而濫用可能會導致設計和可訪問性問題。

本文解釋了HTML5&lt; time&gt;語義日期/時間表示的元素。 它強調了DateTime屬性對機器可讀性(ISO 8601格式)的重要性,並在人類可讀文本旁邊,增強Accessibilit

本文討論了使用HTML5表單驗證屬性,例如必需的,圖案,最小,最大和長度限制,以直接在瀏覽器中驗證用戶輸入。

本文討論了&lt; iframe&gt;將外部內容嵌入網頁,其常見用途,安全風險以及諸如對象標籤和API等替代方案的目的。


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

AI Hentai Generator
免費產生 AI 無盡。

熱門文章

熱工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

SAP NetWeaver Server Adapter for Eclipse
將Eclipse與SAP NetWeaver應用伺服器整合。

MinGW - Minimalist GNU for Windows
這個專案正在遷移到osdn.net/projects/mingw的過程中,你可以繼續在那裡關注我們。 MinGW:GNU編譯器集合(GCC)的本機Windows移植版本,可自由分發的導入函式庫和用於建置本機Windows應用程式的頭檔;包括對MSVC執行時間的擴展,以支援C99功能。 MinGW的所有軟體都可以在64位元Windows平台上運作。

Dreamweaver CS6
視覺化網頁開發工具

WebStorm Mac版
好用的JavaScript開發工具