add vector
This commit is contained in:
22
vector/data/four.memcheck/answer.txt
Normal file
22
vector/data/four.memcheck/answer.txt
Normal file
@ -0,0 +1,22 @@
|
||||
Supplementary test for large amounts of data ...
|
||||
550658
|
||||
15523
|
||||
552292
|
||||
13889
|
||||
553926
|
||||
12255
|
||||
555560
|
||||
10621
|
||||
557194
|
||||
8987
|
||||
558828
|
||||
7353
|
||||
560462
|
||||
5719
|
||||
562096
|
||||
4085
|
||||
563730
|
||||
2451
|
||||
565364
|
||||
817
|
||||
Finished!
|
32
vector/data/four.memcheck/code.cpp
Normal file
32
vector/data/four.memcheck/code.cpp
Normal file
@ -0,0 +1,32 @@
|
||||
//provided by ivy
|
||||
|
||||
#include "vector.hpp"
|
||||
#include "class-matrix.hpp"
|
||||
#include "class-bint.hpp"
|
||||
#include <iostream>
|
||||
|
||||
void complex_test()
|
||||
{
|
||||
std::cout << "Supplementary test for large amounts of data ..." << std::endl;
|
||||
sjtu::vector<Diamond::Matrix<Util::Bint>> myVec;
|
||||
for (int i = 1; i <= 1926; ++i)
|
||||
myVec.push_back(Diamond::Matrix<Util::Bint>(i % 8 + 1, i % 17 + 1, Util::Bint(i * 817)));
|
||||
int o = 1234;
|
||||
while (o--)
|
||||
myVec.pop_back();
|
||||
myVec = myVec;
|
||||
int _ = 20, __ = myVec.size();
|
||||
while (_--)
|
||||
{
|
||||
if (_ % 2 == 0)
|
||||
std::cout << myVec[_][0][0] << std::endl;
|
||||
else
|
||||
std::cout << myVec[__ - _][0][0] << std::endl;
|
||||
}
|
||||
std::cout << "Finished!" << std::endl;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
complex_test();
|
||||
}
|
Reference in New Issue
Block a user