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; datalist&gt;元素,通过提供自动完整建议,改善用户体验并减少错误来增强表格。Character计数:159

本文讨论了HTML&lt; Progress&gt;元素,其目的,样式和与&lt; meter&gt;元素。主要重点是使用&lt; progress&gt;为了完成任务和LT;仪表&gt;对于stati

本文讨论了HTML&lt; meter&gt;元素,用于在一个范围内显示标量或分数值及其在Web开发中的常见应用。它区分了&lt; meter&gt;从&lt; progress&gt;和前

本文讨论了视口元标签,这对于移动设备上的响应式Web设计至关重要。它解释了如何正确使用确保最佳的内容缩放和用户交互,而滥用可能会导致设计和可访问性问题。

本文讨论了&lt; iframe&gt;将外部内容嵌入网页,其常见用途,安全风险以及诸如对象标签和API等替代方案的目的。

本文讨论了使用HTML5表单验证属性,例如必需的,图案,最小,最大和长度限制,以直接在浏览器中验证用户输入。

本文解释了HTML5&lt; time&gt;语义日期/时间表示的元素。 它强调了DateTime属性对机器可读性(ISO 8601格式)的重要性,并在人类可读文本旁边,增强Accessibilit


热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

Atom编辑器mac版下载
最流行的的开源编辑器

Dreamweaver Mac版
视觉化网页开发工具

安全考试浏览器
Safe Exam Browser是一个安全的浏览器环境,用于安全地进行在线考试。该软件将任何计算机变成一个安全的工作站。它控制对任何实用工具的访问,并防止学生使用未经授权的资源。

DVWA
Damn Vulnerable Web App (DVWA) 是一个PHP/MySQL的Web应用程序,非常容易受到攻击。它的主要目标是成为安全专业人员在合法环境中测试自己的技能和工具的辅助工具,帮助Web开发人员更好地理解保护Web应用程序的过程,并帮助教师/学生在课堂环境中教授/学习Web应用程序安全。DVWA的目标是通过简单直接的界面练习一些最常见的Web漏洞,难度各不相同。请注意,该软件中

mPDF
mPDF是一个PHP库,可以从UTF-8编码的HTML生成PDF文件。原作者Ian Back编写mPDF以从他的网站上“即时”输出PDF文件,并处理不同的语言。与原始脚本如HTML2FPDF相比,它的速度较慢,并且在使用Unicode字体时生成的文件较大,但支持CSS样式等,并进行了大量增强。支持几乎所有语言,包括RTL(阿拉伯语和希伯来语)和CJK(中日韩)。支持嵌套的块级元素(如P、DIV),