Creative Snap C. Creative Snap time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Thanos wants to destroy the avengers base, but he needs to destroy the avengers along with their base. Let we…
Thanos wants to destroy the avengers base, but he needs to destroy the avengers along with their base. Let we represent their base with an array, where each position can be occupied by many avengers, but one avenger can occupy only one position. Leng…
A. Superhero Transformation 题意: 元音和元音,辅音和辅音字母之间可以互相转换,问两个字符串是否想同: 题解:直接判断即可: #include<bits/stdc++.h> using namespace std; ; char s[N]; int n,m,vis1[N],vis2[N]; int judge(char x){return x=='a'||x=='e'||x=='i'||x=='o'||x=='u';} int main(){ // freopen(…
题意 : 一段序列 , 求一段子序列和取余 M 的最大值 其实是一道水题... 前缀和 , 然后就是找 ( sum( r ) - sum( l ) ) % M 的最大值 . 考虑一个 sum( r ) , 在 sum( k ) ( 1 <= k < r ) 中 : sum( a ) > sum( r ) , sum( b ) < sum( r ) , sum( a ) 优于 sum( b ) sum( a ) > sum( b ) > sum( r ) , sum( b…