这篇博客是从旧博客 WordPress 迁移过来,内容可能存在转换异常。
太麻烦了,一起贴出来算了。 HDOJ 2052 Picture
// Author: Tanky Woo
// HDOJ 2052
#include
#include
using namespace std;
int m, n;
int main()
{
while(scanf("%d %d", &m;, &n;) != EOF)
{
printf("+");
for(int i=0; iHDOJ 2053 Switch Game
```cpp
// Author: Tanky Woo
// HDOJ 2053
#include
#include
using namespace std;
int arr[100001];
int main()
{
int n;
while(scanf("%d", &n;) != EOF)
{
memset(arr, 0, sizeof(arr));
for(int i=1; i<=n; ++i)
for(int j=1; j<=n&&j;*i<=n; ++j)
arr[j*i] = !arr[j*i];
printf("%d\n", arr[n]);
}
return 0;
}
HDOJ 2054之前贴过了~~·就不贴了
// Author: Tanky Woo
// HDOJ 2055
#include
#include
using namespace std;
int main()
{
int nCases;
scanf("%d", &nCases;);
char ch;
int m;
while(nCases--)
{
getchar();
scanf("%c %d", &ch;, &m;);
int sum = 0;
if(ch>='a' && ch<='z')
sum -= (ch-'a'+1);
else
sum += (ch-'A'+1);
sum += m;
printf("%d\n", sum);
}
return 0;
}