2011-04-18から1日間の記事一覧

4月の単語

increase by ~% ~%増加する。->~まで増加するではないので、注意.

sortの使い方

#include template void sort( RandomAccessIterator start, RandomAccessIterator end ); template void sort( RandomAccessIterator start, RandomAccessIterator end, Compare cmp ); 構造体をソートするには、 vectorType> c; bool cmp(const Type& a, c…

#include

for_each 便利そうだけど当分使いそうもない。 template UnaryFunction for_each( InputIterator first, InputIterator last, UnaryFunction f ); template struct increment : public unary_function { //継承してる void operator()(T& x) { x++; } }; //x…

findの使い方

まずはfindから。 string型には、もう定義されてる #include size_type find( const string& str, size_type index = 0 ) const; size_type find( const charT* str, size_type index = 0 ) const; size_type find( const charT* str, size_type index, size…

SRM div2 500

一応自分が書いたコード #include #include #include #include #include #include #include using namespace std; class MovieSeating { private: long long permutation(int n, int r); public: long long getSeatings(int numFriends, vector hall) { int …

SRM 471 div2 500

Problem Statement Elly is great fan of consistency. She would like to have order in even the simplest things in life – like listening to music. She has chosen several songs from which she wants to compose a playlist. The names of these son…