题意:从n个数中,选择一些数,使得异或最大。 1 #include 2 #include 3 #include 4 #define ll __int64 5 using namespace std; 6 7 ll c[110][110]; 8 int n; 9 ll cc;10 11 voi...
转载 2014-08-20 18:39:00
143阅读
2评论
SGU_275     这个题目可以将每个数分解成64位来看待,于是我们可以从高位向低位扫描,尽可能让当前这位为1,而判断当前这位是否可能为1可以借助高斯消元。 #include<stdio.h> #include<string.h> #include<algorithm> #define MAXN 110 #define MAXM 70 using name
转载 2012-05-13 22:32:00
105阅读
2评论
加密方式1: 加密方法2: ...
转载 2021-10-27 12:27:00
127阅读
2评论
...
转载 2021-10-31 20:31:00
63阅读
2评论
0x00:xor加密原理简单异或密码(英语:simple XOR cipher)是密码学中一种简单的加密算法,它按照如下原则进行运算: A {\displaystyle \oplus } \oplus 0 = A A {\displaystyle \oplus } \oplus A = 0 (A {\displaystyle \oplus } \oplus B) {\displaystyle \o
转载 5月前
0阅读
题意:问整数n以内,有多少对整数a、b满足(1≤b≤a)且gcd(a, b) = xor(a, b)分析:gcd和xor看起来风马牛不相及的运算,居然有一个比较"神奇"的结论:设gcd(a, b) = xor(a, b) = c, 则 c = a - b这里有比较严格的证明。有了这个结论后,我们可以...
转载 2014-12-14 16:27:00
81阅读
2评论
样例解释 1对于第11个样例,合法的数对如下:(0, 1)(0,1)和(1,0)(1,0)。对于第22个样例,合法的数对如下:(0, 10)(0,10),(2, 8)(2,8),(3, 9)(3,9),(8, 2)(8,2),(9, 3)(9,3)和(10, 0)(10,0)。#include <cstdio>#include <cstring>#includ...
原创 2022-03-02 10:50:35
83阅读
样例解释 1对于第11个样例,合法的数对如下:(0, 1)(0,1)和(1,0)(1,0)。对于第22个样例,合法的数对如下:(0, 10)(0,10),(2, 8)(2,8),(3, 9)(3,9),(8, 2)(8,2),(9, 3)(9,3)和(10, 0)(10,0)。#include <cstdio>#include <cstring>#includ...
原创 2021-06-11 10:53:41
216阅读
!strncmp(v6, global, 0x21uLL) 其函数声明为int strncmp ( const char * str1, const char * str2, size_t n ); 功能是把 str1 和 str2 进行比较,最多比较前 n 个字节 若str1与str2的前n个字符 ...
转载 2021-07-19 14:57:00
846阅读
2评论
    K XOR Clique BaoBao has a sequence a​1​​,a​2​​,...,a​n​​. He would like to find a subset S of {1,2,...,n} such that ∀i,j∈S, a​i​​⊕a​j​​<min(a​i​​,a​j​​) and ∣S∣ is maximum, where ⊕ means bitwi
转载 2018-09-16 19:31:00
82阅读
2评论
编写代码 import random # 伪随机数# 让用户选择in_dwb = input('请输入是加密(1) 还是解密(2): ')print(input) # 加密逻辑 def encode(str_1, key): print('666') random.seed(key) str_2 = ...
转载 2021-10-31 03:20:00
89阅读
2评论
参考 http://www.ruanyifeng.com/blog/2017/05/xor.html,用python或Scratch实现里面的代码 提交你的代码(用附件提交 xor学号.py或 xor学号.s2) 提交代码运行结果截图 就我个人的理解,实现XOR加密需要三个步骤 1.算出密码的哈希 ...
转载 2021-10-31 21:02:00
163阅读
2评论
Xor Path思路先是看错题目,以为是所有的路径异或值的和,然后好像用了个假的print函数,一直wa,,,既然是异或,那么当一个点出现的次数是偶数次的时候它会被自己异或成零,也就是队整体的答案没有贡献度,所以我们只要统计有多少条路经过了这个点就行了。
原创 2021-08-26 16:37:34
107阅读
...
转载 2021-10-30 12:46:00
52阅读
2评论
import hashlibhash_md5 = hashlib.md5()x=input("Please input your text:")print( "Text:",x)data = x.encode('utf-8', errors='ignore')hash_md5.update(data ...
转载 2021-10-31 17:15:00
101阅读
2评论
import hashlib h_md5 = hashlib.md5() x= input("请输入要加密的文字") print( "Text:",x) data = x.encode('utf-8',errors='ignore') h_md5.update(data) md5_str = h_m ...
转载 2021-10-31 19:32:00
64阅读
2评论
#代码内容 import hashlib hash_md5 = hashlib.md5() x=input("输入文字:") print( "Text:",x) data = x.encode('utf-8', errors='ignore') hash_md5.update(data) md5_s ...
转载 2021-10-31 13:54:00
91阅读
2评论
​ "E. XOR Guessing" 第一次做这种交互题,刚开始还看不懂,现在已经差不
原创 2022-11-03 15:22:44
86阅读
# XOR in Java: A Brief Introduction XOR, or exclusive OR, is a logical operation that outputs true only when inputs differ (one is true, the other is false). In Java, XOR is represented by the caret
原创 5月前
36阅读
## 实现Java xor的步骤和代码解释 ### 流程图 ```mermaid flowchart TD A(开始) --> B(声明变量) B --> C(读取输入) C --> D(进行位运算) D --> E(输出结果) E --> F(结束) ``` ### 步骤解释和代码示例 1. 声明变量:首先,我们需要声明两个整型变量,用于存储待操作
原创 2023-09-03 07:40:23
21阅读
  • 1
  • 2
  • 3
  • 4
  • 5