Codeforces Round #252 (Div. 2)-C,D_html/css_WEB-ITnose
Jun 24, 2016 pm 12:03 PM
C題就是一個簡單的模擬,首先給每個人兩個。然后把剩下的都給一個人就好了。
給的時候蛇形給。
#include<stdio.h>#include<string.h>#include<algorithm>#include<iostream>#include<vector>#include<queue>using namespace std;#define LL __int64#define maxn 330000int main(){ int n,m,k; while(~scanf("%d%d%d",&n,&m,&k)) { int leap=1; int stx=1; int sty=1; int ms=n*m-(k*2)+2; printf("%d",ms); while(ms--) { printf(" %d %d",stx,sty); sty+=leap; if(stym) { if(stym)sty=m; stx++;leap=-leap; } } coutm) { if(stym)sty=m; stx++;leap=-leap; } printf("%d %d\n",stx,sty); sty+=leap; if(stym) { if(stym)sty=m; stx++;leap=-leap; } } } return 0;}</queue></vector></iostream></algorithm></string.h></stdio.h>D:首先根據(jù)環(huán),把每一個環(huán)分成一組。記錄下此時至少需要交換all次,才能回歸到恒等排列。
1,如果all大于p。那么我們就應(yīng)該把a(bǔ)ll減少。
對于一個環(huán),任意兩個點交換都可以把環(huán)分成兩份,all-1;
對于每次減少,我們尋找環(huán)的最小值最小的環(huán),然后在這個環(huán)中尋找最小值,然后交換這兩個點。
2,如果all小于p。那么我們應(yīng)該把a(bǔ)ll增大。
那么我們就可以把1號節(jié)點和任意節(jié)點交換,來達(dá)到增大all的目的。
注意,1號節(jié)點不和本身的環(huán)交換。并且1號節(jié)點和任意一個環(huán)只交換一次。
#include<stdio.h>#include<string.h>#include<algorithm>#include<iostream>#include<vector>#include<queue>using namespace std;#define LL __int64#define maxn 3300int a[maxn];int b[maxn];int vis[maxn];vector<int>vec;vector >ans;struct list{ int x,y;} node;vector<list>pr;bool cmp(vector<int>a,vector<int>b){ return a[0]<b listt int x index l friend bool operator return a.x>b.x; }}tt;priority_queue<listt>que;int main(){ int n,m; while(~scanf("%d",&n)) { for(int i=1; i0; i++) { if(b[i]==i) { all--; node.y=i; pr.push_back(node); } if(ans.size()>j&&ans[j][0]==i) { all--; node.y=i; j++; pr.push_back(node); } } } } else { int qian=all; all=all-m; int i=0; while(!que.empty())que.pop(); for(i=0;i<ans.size tt.index="i;" tt.x="ans[i][0];" que.push while tt="que.top();" que.pop i="tt.index;" node.x="ans[i][0];" int minn="9999;" st="0;" for j="1;j<ans[i].size()&&all">0;j++) { if(minn>ans[i][j]) { minn=ans[i][j]; st=j; } } node.y=minn; all--; pr.push_back(node); vec.clear(); minn=9999; vec.push_back(ans[i][st]); for(int j=1;j<st vec.push_back if>1) { ans.push_back(vec); tt.index=ans.size()-1; tt.x=vec[0]; que.push(tt); } vec.clear(); vec.push_back(ans[i][0]); for(int j=st+1;j<ans vec.push_back if>1) { ans[i]=vec; tt.index=i; tt.x=vec[0]; que.push(tt); } i++; } } cout <br> <br> <p></p> <p><br> </p> <p><br> </p> <p><br> </p> <p><br> </p> <p><br> </p> <p><br> </p> <p><br> </p> </ans></st></ans.size></listt></b></int></int></list></int></queue></vector></iostream></algorithm></string.h></stdio.h>

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

HTML ?? ??? ???? ?? ??? ??? ???? ?? ?? ?? ? ???? ?? ??? ????????. 1. ????? ??? ??? ????? ?? ? ?? ?? (? : ??, ??, ???)? ?? ??? ?????. 2. JavaScript? ?? ?? ? ??? ???? ID? ?? ??? ?? ??? ??? ???? ?? ? ????. 3. CSS? ???? ???, ???, ?? ??? ? ??/?? ?? ??? ???? ???? ??? ???? ??? ??? ??????. 4. ???? ????????? : ???? ? ??? ????? ??? ???? JS ???? ???? ????? ???? ??? ???? ??? ??? ??? ???? ??? ?????. ??? ???????

HTMLHEAD? ?? ???? SEO, ?? ?? ? ???? ??? ?????. 1. ??? ??? ??? ????, ???? ???? ???? ??????. 2. OpenGraph ? Twitter ?? ??? ???? ?? ?? ??? ????? ??? ?????? ???? ??? ??? ???? ???????. 3. ?? ?? ? ??? ??? ???? ??? ??? ??? ???? ????????. 4. ?? ???, ?? ?? ? ?? ?? ?? ???? ?? ??? ??? ????? ???????.

Tolearnhtmlin2025, chooSeatUtoriorialThatthatthath and-practicewithmoderndardAndardsandegratescssandjavaScriptBasics.1.

???? ??? HTML ?? ???? ??? ??? ?????? ?? Div Flex ?? ??? ????? ???? ??? ?????? ??? ???????. ??, ?? ???? ?????? ?? CSS? ?? ? ?? ????. ?? ?? ??? ALT ??? ?? ???? ?? URL? ?????? ??? ???? ??? ?? TD? ??????????. ????? ?? ?????? ?? ??? ????? ???????.

HTML ??? ???? ????? ?? ?? ???? ??? ?? ???? ?? ???? ?? ? ? ????. 1. ??, ??? ?? ?? ??? ?? ??? ? ??? ???? ???? ? ?????. 2. ?? ???? ???? ??? ? ?? ??? ?? ? ? ????. 3. ??? ??? ??? ???? ?????? ??? ??? ? SEO ??? ??????. 4. ??? ??? ?, ??? ??? ??? ????? ??????, ???? ?? ????? ???? ??? ?? ???? ???? ???????. 5. ??? ??? ALT ??? ??? ????. 6. ??? ???? ??? ?? ??? ?? ?? ??? ?? ? ? ????. ? ? ?? ??? ???? ???? ?? ???? ???? ?? ? ???? ???? ? ??????.

???, ID, ???, ??? ? ??? HTML?? ?? ????? ???? ??? ?????. ???? ??? ?? ? JavaScript ??? ?????? ?? ?? ??? ??? ??? ???? ? ?????. ID? ?? ?? ? JavaScript ???? ??? ??? ?? ?? ???? ?????. ???? ???? ??? ???? ?? ? ? ??? ?? ???? ????? ??? ???? ???? ????. ??? ??? ??? ?? ???? ???? ? ????, ?? ??? ?? ? ??? ?? ??? ?????. ??? ??? ?? ????? ???? ? ????? ???? ??? ????? ?? ?????. ??? ??? ????? ???? ?? ???? ??? ??? ???? ? ????.

??? ??? ??? HTML ?? ??? ??? ????? ?? ?? ?? ?? ???? ?? ?? ? ? ????. ?? ???? ??? ?????. 1. JavaScript? ???? ?? ?? ? ??? ???? ???? ?? ?? ??? ?? ?? ? ???? ???? ????. 2. Formspree? ?? ?? ???? ? ???? ???? ???? ???? ??? ?? ? ???? ??? ?????. 3. LocalStorage? ???? ??? ?? ??? ????? ?? ??? ?? ???? ??? ???? ? ????? ??? ??? ?? ???? ???? ????.

Native Lazy Loading? ?? ???? ????,?? = "???"??? ??? ???? ??? ????? ? ? ????. 1. JavaScript ?? ?? ?????? ???? ??? HTML?? ?? ?????. 2. ??? ??? ? ?? ??? ???? ?? ??, ?? ??? ??? ??? ? ? ?? ???? ?????. 3. ? ?? ?? ?? ???????? ???? ???? ????. 4. ??? ??? ?, ??? ?? ???? ???? ??? ??? ?? ???????. 5. SRCSET ? ?? ??? ?? ?? ? ??? ??? ????????. 6. ??? ??? ???????. ?? ??? ??????? ???? ????. ?? ??? ?? ??? ? ??? JavaScript ???? ?? ? ? ????.
