Codeforces Round #274 (Div. 2) 解题报告_html/css_WEB-ITnose
题目地址:http://codeforces.com/contest/479
这次自己又只能做出4道题来。
A题:Expression
水题。
枚举六种情况求最大值即可。
代码如下:
#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 __int64int main(){ LL a, b, c, d[10]; while(scanf("%I64d%I64d%I64d",&a,&b,&c)!=EOF) { d[0]=a*b*c; d[1]=(a+b)*c; d[2]=a+b+c; d[3]=a*(b+c); d[4]=a+b*c; d[5]=a*b+c; sort(d,d+6); printf("%I64d\n",d[5]); } return 0;}</algorithm></set></map></queue></ctype.h></math.h></stdlib.h></cstring></string></cstdio></iostream>
B题: Towers
水题。
每次都是将最多的拿出一个给最少的,直到最大的与最少的相差小于或等于1.
代码如下:
#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 __int64struct node{ int x, num;}fei[1000];int cmp(node x, node y){ return x.x<y.x a b main int n m i j cnt ans while for scanf fei sort if break printf return> <br> C题: Exams <p></p> <p>还是水。。小贪心</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 __int64struct node{ int x, y;}fei[6000];int cmp(node x, node y){ if(x.x==y.x) return x.y<y.y return x.x main int n i j ans k x1 x2 while for scanf sort if>=k) { k=fei[i].y; } else { k=fei[i].x; } } printf("%d\n",k); } return 0;}</y.y></algorithm></set></map></queue></ctype.h></math.h></stdlib.h></cstring></string></cstdio></iostream>
D题:
还是水。。。。二分。
分别考虑4种情况,x,y,x+y,y-x。然后用二分找差值为这四个数的。
代码如下:
#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 __int64int a[110000];int bin_search(int x, int y, int high){ int low=0, mid; while(low>1; if(y-a[mid]==x) return 1; else if(y-a[mid]>x) low=mid+1; else high=mid-1; } return 0;}int main(){ int n, l, x, y, i, j, k, flag1, flag2; while(scanf("%d%d%d%d",&n,&l,&x,&y)!=EOF) { flag1=flag2=0; for(i=0; i<n i scanf if flag1="1;" flag2="1;" printf else for break int flag="0;">=0||a[i]+x=0) { printf("1\n%d\n",a[i]-y); } else if(flag&&a[i]+x <br> <br> <p></p> <p><br> </p> </n></algorithm></set></map></queue></ctype.h></math.h></stdlib.h></cstring></string></cstdio></iostream>

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











HTML은 간단하고 배우기 쉽고 결과를 빠르게 볼 수 있기 때문에 초보자에게 적합합니다. 1) HTML의 학습 곡선은 매끄럽고 시작하기 쉽습니다. 2) 기본 태그를 마스터하여 웹 페이지를 만들기 시작하십시오. 3) 유연성이 높고 CSS 및 JavaScript와 함께 사용할 수 있습니다. 4) 풍부한 학습 리소스와 현대 도구는 학습 과정을 지원합니다.

이 기사는 HTML & lt; Progress & Gt에 대해 설명합니다. 요소, 그 목적, 스타일 및 & lt; meter & gt의 차이; 요소. 주요 초점은 & lt; progress & gt; 작업 완료 및 & lt; meter & gt; Stati의 경우

HTML은 웹 구조를 정의하고 CSS는 스타일과 레이아웃을 담당하며 JavaScript는 동적 상호 작용을 제공합니다. 세 사람은 웹 개발에서 의무를 수행하고 화려한 웹 사이트를 공동으로 구축합니다.

이 기사는 HTML & LT; Datalist & GT에 대해 논의합니다. 자동 완성 제안을 제공하고, 사용자 경험을 향상시키고, 오류를 줄임으로써 양식을 향상시키는 요소. 문자 수 : 159

이 기사는 HTML & lt; meter & gt에 대해 설명합니다. 범위 내에 스칼라 또는 분수 값을 표시하는 데 사용되는 요소 및 웹 개발의 일반적인 응용 프로그램. & lt; meter & gt; & lt; Progress & Gt; 그리고 Ex

anexampleStartingtaginhtmlis, whithbeginsaparagraph.startingtagsareessentialinhtmlastheyinitiate rements, definetheirtypes, andarecrucialforstructurituringwebpages 및 smanstlingthedom.

WebDevelopmentReliesonHtml, CSS 및 JavaScript : 1) HtmlStructuresContent, 2) CSSSTYLESIT, 및 3) JAVASCRIPTADDSINGINTERACTIVITY, BASISOFMODERNWEBEXPERIENCES를 형성합니다.

GiteEpages 정적 웹 사이트 배포 실패 : 404 오류 문제 해결 및 해결시 Gitee ...
