Do the Untwist】的更多相关文章

考察编程基础知识,用到字符和数字相互转化等.形式是描述清楚明文和暗文的转化规则. #include <stdio.h> #include <string.h> #define MAXLEN 71 int length; void toCode(int code[],char text[]){ int i; ;i<length;i++){ if(text[i] == '_') code[i] = ; else if(text[i] == '.') code[i] = ; els…
Do the Untwist Time Limit: 2 Seconds      Memory Limit: 65536 KB Cryptography deals with methods of secret communication that transform a message (the plaintext) into a disguised form (the ciphertext) so that no one seeing the ciphertext will be able…
ZOJ Problem Set - 1006 Do the Untwist Time Limit: 2 Seconds      Memory Limit: 65536 KB Cryptography deals with methods of secret communication that transform a message (the plaintext) into a disguised form (the ciphertext) so that no one seeing the…
  Do the Untwist Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 982    Accepted Submission(s): 638 Problem Description Cryptography deals with methods of secret communication that transform a…
今天在ZOJ上做了道很简单的题目是关于加密解密问题的,此题的关键点就在于求余的逆运算: 比如假设都是正整数 A=(B-C)%D 则 B - C = D*n + A 其中 A < D 移项 B = A+C + D*n 当B<D时,两边对D取摸,  B = B%D = ( A+C + D*n )%D = (A+C)%D 由此可得此题答案,见代码 #include <cstdio> #include <cstring> int main() { ]; ],ctext[]; w…
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=6 题目大意:给你加密方式,请你求出解密. 直接逆运算搞,用到同余定理 #include <cstdio> #include <cstdlib> #include <string> #include <iostream> #include <cstring> #include <algorithm> #inc…
#include <iostream> #include <string> #include <stdlib.h> using namespace std; int main() { string array[30][2]; string a,b; int t=0; while( cin >> a ) { if ( a == "0" ) { break; } else { cin >> b; } array[t][0] = a…
简单模拟~ #include<bits/stdc++.h> using namespace std; ; int a[maxn]; unordered_map<char,int> pos; string s="_abcdefghijklmnopqrstuvwxyz."; int len; char ch[maxn]; int main () { ;i<;i++)pos[s[i]]=i; int n; while (scanf("%d",…
杭电ACM分类: 1001 整数求和 水题1002 C语言实验题——两个数比较 水题1003 1.2.3.4.5... 简单题1004 渊子赛马 排序+贪心的方法归并1005 Hero In Maze 广度搜索1006 Redraiment猜想 数论:容斥定理1007 童年生活二三事 递推题1008 University 简单hash1009 目标柏林 简单模拟题1010 Rails 模拟题(堆栈)1011 Box of Bricks 简单题1012 IMMEDIATE DECODABILITY…
acm之pku题目分类 对ACM有兴趣的同学们可以看看 DP:  1011   NTA                 简单题  1013   Great Equipment     简单题  1024   Calendar Game       简单题  1027   Human Gene Functions   简单题  1037   Gridland            简单题  1052   Algernon s Noxious Emissions 简单题  1409   Commun…