Codeforces Round #182 (Div. 2)
Codeforces div round
2023-09-11 14:16:05 时间
//A 好久没做了,5.1一过寝室不熄灯了,今天做了一场还是只做了2题。 弱。
#include iostream
#include stdio.h
using namespace std;
int a[200005],b[200005];
int main()
// freopen( 1.txt , r ,stdin);
int n,m,
Codeforces Round #723 (Div. 2)B. I Hate 1111 Description You are given an integer x. Can you make x by summing up some number of 11,111,1111,11111,…? (You can use any number among them any number of times). For instance, 33=11+11+11 144=111+11+11+11
//A 好久没做了,5.1一过寝室不熄灯了,今天做了一场还是只做了2题。 弱。 #include iostream #include stdio.h using namespace std; int a[200005],b[200005]; int main() // freopen("1.txt","r",stdin); int n,m,numx=0,numy=0,x,y; cin n m; for(int i=0; i i++) cin a[i]; if(a[i]==1) numx++; else numy++; for(int j=0; j j++) cin x y; if((y-x)%2!=0 (y-x+1) =2*min(numx,numy)) // 满足这个条件才输出1 cout 1 endl; else cout 0 endl; return 0; #include iostream #include stdio.h #include cstring using namespace std; int v[100005],c[100005],t[100005],sum[100005]; int main() //freopen("1.txt","r",stdin); memset(sum,0,sizeof(sum)); int n,m; cin n m; cin c[0] t[0]; sum[0]=c[0]*t[0]; for(int i=1; i i++) cin c[i] t[i]; sum[i]=c[i]*t[i]+sum[i-1]; for(int j=0; j j++) cin v[j]; int k=0; for(int j=0; j j++) for(int i=k; i i++) // 第一次TLE了,这里标记一下从上次的i开始节省了时间。 if(v[j] =sum[i]) cout i+1 endl; k=i; break; return 0;
Codeforces Round #723 (Div. 2)B. I Hate 1111 Description You are given an integer x. Can you make x by summing up some number of 11,111,1111,11111,…? (You can use any number among them any number of times). For instance, 33=11+11+11 144=111+11+11+11
相关文章
- Codeforces Round #277(Div. 2) (A Calculating Function, B OR in Matrix, C Palindrome Transformation)
- 【Codeforces Round #693 (Div. 3) E】Correct Placement
- 【Codeforces Round #693 (Div. 3) B】Fair Division
- 【Codeforces Round #694 (Div. 1) D】Strange Housing
- 【Codeforces Round #635 (Div. 2) E】Kaavi and Magic Spell
- 【Codeforces Round #669 (Div. 2) D】Discrete Centrifugal Jumps
- 【Divide by Zero 2017 and Codeforces Round #399 (Div. 1 + Div. 2, combined) B】 Code For 1
- 【Codeforces Round #462 (Div. 1) A】 A Twisty Movement
- 【Codeforces Round #459 (Div. 2) A】Eleven
- 【Codeforces Round #459 (Div. 2) C】The Monster
- 【Codeforces Round #456 (Div. 2) A】Tricky Alchemy
- 【Codeforces Round #453 (Div. 2) A】 Visiting a Friend
- 【Codeforces Round #301 (Div. 2) D】 Bad Luck Island
- 【Codeforces Round #437 (Div. 2) C】 Ordering Pizza
- 【Codeforces Round #433 (Div. 2) B】Maxim Buys an Apartment
- 【 Codeforces Round #430 (Div. 2) A 】 Kirill And The Game
- 【Codeforces Round #429 (Div. 2) C】Leha and Function
- 【Codeforces Round #428 (Div. 2) A】Arya and Bran
- Codeforces Round #FF (Div. 1)-A,B,C
- Codeforces Round #313 (Div. 2) ABC
- Codeforces Round #FF (Div. 2) D. DZY Loves Modification 贪心+优先队列
- Codeforces Round #296 (Div. 2) B. Error Correct System
- Codeforces Round #277.5 (Div. 2)B——BerSU Ball
- Codeforces Round #107 (Div. 2)---A. Soft Drinking
- Codeforces Round #424 (Div. 2, rated, based on VK Cup Finals)
- Codeforces Round #420 (Div. 2)
- Codeforces Round #412 Div. 2 补题 D. Dynamic Problem Scoring