P2955 [USACO09OCT]Even? Odd? G
数据范围,emmm,果断字符串做
#include <stdio.h>
#include <string.h>
#define scan(x) scanf("%d", &x)
int main()
{
char s[10000];
int a, x;
scan(a);
while (a--)
{
scanf("%s", s);
x = s[strlen(s) - 1] - '0';
if
more...1646. 获取生成数组中的最大值
打卡题
int getMaximumGenerated(int n){
if(n<2)
return n==0?0:1;
int max=0;
int *nums=(int *)malloc(sizeof(int)*(n+1));
nums[0]=0;nums[1]=1;
for(int j=2;j<=n;j++){
if(j&1)
nums[j]=nums[j/2]+
more...