- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
11 Posted Topics
Re: At least for n<30 bits (which is probably near the maximum on one fast processor), you could just have a for loop from 0 to 2^n and get the binary representation for each number. | |
Re: The second is stronger than the first, since for the first, it does not need the y to be the same in the P(x,y) for all x. [code] P(x,y): y 010 x001 100 1 - true 0 - false [/code] The above can satisfy [for all x, there exists y … | |
| |
Re: Pseudocode is already supposed to be written in an understandable way. You would just need to be familiar with programming fundamentals like variables and constructs. | |
Re: [QUOTE=Rashakil Fol;1192484] This algorithm is incorrect, by the way. [/QUOTE] Just to clarify to the original poster, one must check that for each node, [b]all[/b] the nodes in the left subtree are less than it, and so also for the right subtree. Remember that one only needs to check the … | |
Re: [quote=Atomika3000;1193199] [code] name = cookiearray[i].split('=')[0]; value = cookiearray[i].split('=')[1]; [/code] [/quote] What is this supposed to do? This would not read and store the cookies. You would need to set a variable to the value like so: [code] name = cookiearray[i].split('=')[0]; value = cookiearray[i].split('=')[1]; window[name]=value; [/code] Also, you would need to … | |
Re: You could do this: [code] // #include<cstring> float t=31.4592; char num[100]; sprintf(num,"%f",t); p=strchr(num,'.'); if( p!=NULL ) num[p-num+2]=0; printf("%s\n",num); [/code] or this: [code] // #include<cmath> float t=31.4592; printf("%.1f\n",floor(t*10)/10); [/code] | |
Re: I doubt it can be done with the command-line, but it could be done with the WSH, which comes preinstalled. [code] var fso,a,s,d,f,t,t0,t1; var dr; dr='c:\\mydocu~1\\test'; fso=new ActiveXObject('scripting.filesystemobject'); d=fso.getfolder(dr); f=new Enumerator(d.files); t=[]; for(;!f.atEnd();f.moveNext()) { t0=f.item().name; if( t0.indexOf(' ')==-1 ) continue; t1=t0.replace(/-/g,'_').replace(/ /g,'-'); if( t0!=t1 ) t.push([t0,t1]); } for(a=0;a<t.length;a++) { fso.movefile(dr+'\'+t[a][0],dr+'\'+t[a][1]); … | |
Re: You could look at this: [url]http://en.wikipedia.org/wiki/XMLHTTP#caching[/url] | |
Re: The equation you gave, if the first term is corrected to t(k), should give a complexity of O(nk log k). Another algorithm that could do this was to use a heap -- it was so that you could get the elements of the final array in order -- so the … | |
Re: It will only do this forever: output "x=.." and input a number |
The End.