initial commit
This commit is contained in:
27
data/Integer2/5.cpp
Normal file
27
data/Integer2/5.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
Time: 2021-10-20
|
||||
Test: add & minus (signed)
|
||||
std Time: 0.14s
|
||||
Time Limit: 1.00s
|
||||
*/
|
||||
|
||||
#include "int2048.h"
|
||||
|
||||
sjtu::int2048 a;
|
||||
std::string s;
|
||||
|
||||
int main()
|
||||
{
|
||||
int n;
|
||||
std::cin >> n;
|
||||
for (int i = 1; i <= n; i++)
|
||||
{
|
||||
std::cin >> s;
|
||||
if (i & 1)
|
||||
a += s;
|
||||
else
|
||||
a -= s;
|
||||
|
||||
std::cout << a << '\n';
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user