update
This commit is contained in:
parent
40f06be8bc
commit
7d5dce8055
BIN
day3/T433080/T433080.pdf
Normal file
BIN
day3/T433080/T433080.pdf
Normal file
Binary file not shown.
BIN
day3/T490194/T490194.pdf
Normal file
BIN
day3/T490194/T490194.pdf
Normal file
Binary file not shown.
BIN
day3/U184510/U184510.pdf
Normal file
BIN
day3/U184510/U184510.pdf
Normal file
Binary file not shown.
BIN
day3/U86432/U86432.pdf
Normal file
BIN
day3/U86432/U86432.pdf
Normal file
Binary file not shown.
@ -1,5 +1,15 @@
|
|||||||
#include <bits/stdc++.h>
|
#include <bits/stdc++.h>
|
||||||
using std::cout,std::cin,std::vector,std::endl;
|
#define uint unsigned int
|
||||||
|
using std::cout,std::vector,std::endl;
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
std::ostream& operator<<(std::ostream& os,vector<T> &v){
|
||||||
|
os<<"vector<?> [";
|
||||||
|
for(size_t i=0;i<v.size();i++){
|
||||||
|
os<<v[i]<<(i!=v.size()-1?",":"]\n");
|
||||||
|
}
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
|
||||||
std::ostream& operator<<(std::ostream& os,vector<int> &v){
|
std::ostream& operator<<(std::ostream& os,vector<int> &v){
|
||||||
os<<"vector<int> [";
|
os<<"vector<int> [";
|
||||||
@ -10,8 +20,13 @@ std::ostream& operator<<(std::ostream& os,vector<int> &v){
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main(){
|
int main(){
|
||||||
vector<int> v;
|
vector<int> v(10);
|
||||||
v.push_back(1);
|
for(uint i=0;i<v.size();i++){
|
||||||
v.push_back(2);
|
v[i]=i;
|
||||||
|
}
|
||||||
cout<<v<<endl;
|
cout<<v<<endl;
|
||||||
|
vector<std::string> vs;
|
||||||
|
vs.push_back("123");
|
||||||
|
vs.push_back("1024");
|
||||||
|
cout<<vs<<endl;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user