Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
U

User 12049999

@User 12049999
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • memory allocation error
    U User 12049999

    sry c and i are integer types. I was making it look proper. in the begining they were all in different places

    C / C++ / MFC help c++ graphics algorithms performance

  • memory allocation error
    U User 12049999

    the code shows std::bad_alloc error dont know what to do about it when remove the push_back it dissapears. please help on what to do. this happens only when I am entering a huge string s else it runs perfectly fine. is there another efficient way to find all the possible substring, arrange them lexicographicaly and then concatinate them back into one string????pls help thnx in advance #include <cmath> #include <set> #include <cstdio> #include <vector> #include <iostream> #include<string> #include <algorithm> using namespace std; bool sortByString(string &t1, string &t2) { return t1 < t2; } int main() { string s,sub,i,c,q; int T; cin>>T; while(T--){ cin >> s; int length = s.length(); cin>>q; vector<string> ss; for (c = 0; c < length; c++) { for (i =length-c;i>=1; i--) { ss.push_back(s.substr(c,i)); } } s=""; set<string> se(ss.begin(),ss.end()); ss.assign(se.begin(),se.end()); vector<string>::iterator p; for( p=ss.begin();p!=ss.end();++p) s.append(*p); cout<<s[q-1]<<endl; } return 0; }

    C / C++ / MFC help c++ graphics algorithms performance

  • grid search
    U User 12049999

    I know the brute force method. can someone help me find a good solution!! Input Format The first line contains an integer, T, which is the number of test cases. T test cases follow, each having a structure as described below: The first line contains two space-separated integers, R and C, indicating the number of rows and columns in the grid G, respectively. This is followed by R lines, each with a string of C digits, which represent the grid G. The following line contains two tab-separated integers, r and c, indicating the number of rows and columns in the pattern grid P. This is followed by r lines, each with a string of c digits, which represent the pattern P. Constraints 1≤T≤5 1≤R,r,C,c≤1000 1≤r≤R 1≤c≤C example INPUT 2 10 10 7283455864 6731158619 8988242643 3830589324 2229505813 5633845374 6473530293 7053106601 0834282956 4607924137 3 4 9505 3845 3530 15 15 400453592126560 114213133098692 474386082879648 522356951189169 887109450487496 252802633388782 502771484966748 075975207693780 511799789562806 404007454272504 549043809916080 962410809534811 445893523733475 768705303214174 650629270887160 2 2 99 99 output Yes No pls help!!

    Algorithms css regex help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups