-
Notifications
You must be signed in to change notification settings - Fork 2
/
CF96C.cpp
57 lines (51 loc) · 800 Bytes
/
CF96C.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
ID: mfs6174
email: mfs6174@gmail.com
PROG: ti
LANG: C++
*/
#include<iostream>
#include<fstream>
#include<string>
#include<sstream>
#include<cstring>
#include<algorithm>
#include<map>
#include<vector>
#include<queue>
#include<deque>
#include<iomanip>
#include<cmath>
#include<set>
#define sf scanf
#define pf printf
#define llg long long
using namespace std;
//ifstream inf("ti.in");
//ofstream ouf("ti.out");
//freopen("ti.in","r",stdin);
const int maxlongint=2147483647;
int i,j,k,t,n,m,p;
char cc;
int res(char x)
{
int rt=0;
for (int i=0;i<8;i++)
if (x&(1<<i))
rt=rt|(1<<(7-i));
return rt;
}
int main()
{
p=0;
while (sf("%c",&cc)!=EOF)
{
if (cc<32||cc>126)
continue;
t=res(cc);
m=((p-t)%256+256)%256;
cout<<m<<endl;
p=t;
}
return 0;
}