Search Results

Search found 3 results on 1 pages for 'cinn'.

Page 1/1 | 1 

  • Do you use ASCII art to decorate your code?

    - by CiNN
    Do you use ASCII art to decorate your code? .-"""-. ' \ |,. ,-. | |()L( ()| | license goes here |,' `".| | |.___.',| ` .j `--"' ` `. / ' ' \ / / ` `. / / ` . / / l | . , | | ,"`. .| | _.' ``. o | `..-'l | `.`, | `. | `. __.j ) |__ |--""___| ,-' `"--...,+"""" `._,.-' mh www /n n\ /\ |/^\| / \ warning notes | , | ^||^ \_/ || _U_ || /` `''-----'P3 / |. .|''-----"|| \'| | || \| | || E | || /#####\ || /#####\ || ||| || ||| || ||| || ||| gem || molom Ll /~~~\/~~\/~~~\/~~~\/~~\/~~~\ /~~~\/~~\/~~~\/~~~\/~~\/~~~\ | /\/ /\/ /\ || /\/ /\/ /\ | | /\ \/\ \/\ || /\ \/\ \/\ | \ \/ /\/ /\/ /\ \/ /\/ /\/ / function name \ \/\ \/\ \/ /\ \/\ \/\ \/ / \ \/\ \/\ \/ \ \/\ \/\ \/ \/ /\/ /\/ / \/ /\/ /\/ / ,_/\ \/\ \/\ \__/\ \/\ \/\ \______________________/ /\/ /\/ /\__/ /\/ /\/ /\_, (__/\__/\__/\____/\__/\__/\________________________/\__/\__/\____/\__/\__/\__)

    Read the article

  • I need to speed this code at least 2 times!

    - by Dominating
    include include include include using namespace std; inline void PrintMapName(multimap pN, string s) { pair::iterator, multimap::iterator ii; multimap::iterator it; ii = pN.equal_range(s); multimap tmp; for(it = ii.first; it != ii.second; ++it) { tmp.insert(pair(it-second,1)); } multimap::iterator i; bool flag = false; for(i = tmp.begin(); i != tmp.end(); i++) { if(flag) { cout<<" "; } cout<first; if(flag) { cout<<" "; } flag = true; } cout< int main() { multimap phoneNums; multimap numPhones; int N; cinN; int tests; string tmp, tmp1,tmp2; while(N 0) { cintests; while(tests 0) { cintmp; if(tmp == "add") { cintmp1tmp2; phoneNums.insert(pair(tmp1,tmp2)); numPhones.insert(pair(tmp2,tmp1)); } else { if(tmp == "delnum") { cintmp1; multimap::iterator it; multimap::iterator tmpr; for(it = phoneNums.begin(); it != phoneNums.end();it++) { tmpr = it; if(it-second == tmp1) { phoneNums.erase(it,tmpr); } } numPhones.erase(tmp1); } else { if(tmp == "delname") { cintmp1; phoneNums.erase(tmp1); multimap::iterator it; multimap::iterator tmpr; for(it = numPhones.begin(); it != numPhones.end();it++) { tmpr = it; if(it-second == tmp1) { numPhones.erase(it,tmpr); } } } else { if(tmp =="queryname") { cintmp1; PrintMapName(phoneNums, tmp1); } else//querynum { cintmp1; PrintMapName(numPhones, tmp1); } } } } tests--; } N--; } return 0; }

    Read the article

1