#include
上一页 1 2 3 4 5 6 7 ··· 21 下一页
摘要: 1137 矩阵乘法 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注 收藏 关注 给出2个N * N的矩阵M1和M2,输出2个矩阵相乘后的结果。 给出2个N * N的矩阵M1和M2,输出2个矩阵相乘后的结果。 Input 第1行:1个数N,表示矩阵的大小(2  阅读全文
posted @ 2018-07-10 14:54 0一叶0知秋0 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 1136 欧拉函数 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注 收藏 关注 对正整数n,欧拉函数是少于或等于n的数中与n互质的数的数目。此函数以其首名研究者欧拉命名,它又称为Euler's totient function、φ函数、欧拉商数等。例如:φ( 阅读全文
posted @ 2018-07-10 14:41 0一叶0知秋0 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1073 约瑟夫环 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注 收藏 关注 N个人坐成一个圆环(编号为1 - N),从第1个人开始报数,数到K的人出列,后面的人重新从1开始报数。问最后剩下的人的编号。 例如:N = 3,K = 2。2号先出列,然后是1号 阅读全文
posted @ 2018-07-10 14:07 0一叶0知秋0 阅读(186) 评论(0) 推荐(0) 编辑
摘要: # -×- coding: utf -8 -*- """ 输入英文名字,变成首字母大写,其他字母小写的标准格式 """ def normalize1(name): return name[0].upper() + name[1:].lower() def normalize2(name): str1 = '' for i, n in enumerate(name... 阅读全文
posted @ 2018-06-19 17:52 0一叶0知秋0 阅读(2954) 评论(0) 推荐(0) 编辑
摘要: ZOJ Problem Set - 1013 Once upon a time, there lived Catherine Ironfist, the Queen of Enroth. One day, she received the news of her father's death. So 阅读全文
posted @ 2018-06-10 22:28 0一叶0知秋0 阅读(209) 评论(0) 推荐(0) 编辑
摘要: import java.util.*; import java.math.*; public class Main{ public static void main(String args[]){ Scanner cin = new Scanner(System.in); BigInteger a, b; //以文件EOF结束 ... 阅读全文
posted @ 2018-06-10 17:54 0一叶0知秋0 阅读(174) 评论(0) 推荐(0) 编辑
摘要: ZOJ Problem Set - 1008 Hart is engaged in playing an interesting game, Gnome Tetravex, these days. In the game, at the beginning, the player is given 阅读全文
posted @ 2018-06-07 19:52 0一叶0知秋0 阅读(210) 评论(0) 推荐(0) 编辑
摘要: ZOJ Problem Set - 1006 Cryptography deals with methods of secret communication that transform a message (the plaintext) into a disguised form (the cip 阅读全文
posted @ 2018-06-06 19:53 0一叶0知秋0 阅读(180) 评论(0) 推荐(0) 编辑
摘要: ZOJ Problem Set - 1005 In the movie "Die Hard 3", Bruce Willis and Samuel L. Jackson were confronted with the following puzzle. They were given a 3-ga 阅读全文
posted @ 2018-06-05 20:50 0一叶0知秋0 阅读(156) 评论(0) 推荐(0) 编辑
摘要: ZOJ Problem Set - 1004 How can anagrams result from sequences of stack operations? There are two sequences of stack operators which can convert TROT t 阅读全文
posted @ 2018-06-05 20:04 0一叶0知秋0 阅读(247) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 21 下一页