#include <string.h> int main() { char a[10010]; int sum[10010]={0}; int n; scanf("%d",&n); int j=0,i=0; while(n--) { int b[10010]={0}; scanf("%s",a); int len=strlen(a); for(i=l
#include <bits/stdc++.h> using namespace std; long long a[1000005]; priority_queue<long long ,vector<long long >,greater<long long>> q; int main() { int n; cin>>n; for(int i=0;i<n
CF 683 div.2 A Add Candies 题目:
题目:
题目:Nezzar’s favorite digit among 1,…,9 is d. He calls a positive integer lucky if d occurs at le
题目:Alice and Bob play ping-pong with simplified rules.During the game, the player serving the ball commences a play.
题目:You were dreaming that you are traveling to a planet named Planetforces on your personal spaceship. Unfortunately, its piloting system wa
题目:Polycarp often uses his smartphone. He has already installed n applications on it. Application with number
题目:题解:注意n==2时候的特殊情况#include d",&a[i
题目:#include<iostream>#include<cstdio>#include<cstdlib>#include<cstring>#include<cmath>#include<algorithm>#includp>#include<sstream&
题目:You are given an array a consisting of n integers. Initially all elements of a are either 0 or 1. You need to pro
题目:At the school where Vasya is studying, preparations are underway for the graduation ceremony. One of the planne
题目:Nezzar has n balls, numbered with integers 1,2,…,n. Numbers a1,a2,…,an are written on them, respec
题目:题解:#include <bits/stdc++.h>using namespace std;int k;int main(){ cin >> k; int a = k / 5000"; int b = k % 50000; for (int i = 50000; i >=1 ; i--) {
题目:题解:注意有0的情况#include <bits/stdc++.h>using namespace std;int main(){ char a[1000005 if(a[i]>'j'&&a[i]<='z'&&a
题
题目:You are given one intege
题目:#include<bits/stdc++.h>using namespace std;string s[1010];long long dp[100010];int mod
题目:Masha works in an advertising agency. In order to promote the new brand, she wants to conclude contracts with som
题目:You are standing on the OX-axis at point 0 and you want to move to an integer point x>0.You can make sev
题目:There is a game called “Unique Bid Auction”. You can read more about it here: https://en.wikipedia.org/wiki/Unique_
题目:Let’s define a function f(x) (x is a positive integer) as follows: write all digits of the decimal representation of x back
题目:You are given a sequence a, initially consisting of n integers.You want to transform this sequence so that a
题目: #include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 1000010;
题目:题解:寻找个数的时候,每次合并的时候加上被加集合的个数,注意应该是根节点不一样的时候#include <bits/stdc++.
题目:题解:因为每次选部分人,所以从2个人选到有n个人,是组合数c(m,n)第二步,要使一组的最小的大于另外一组最
题目:题解:#include <bits/stdc++.h>using namespace std;int p[100005];int find(int x){ if(p[x]!=x) p[x]=find(p[x]); <=n;i++) p[i]=i; while(m--) {
题目:#include <bits/stdc++.h>using namespace std;int a[35];int main(){ int n; int
Copyright © 2005-2025 51CTO.COM 版权所有 京ICP证060544号