Search found 5 matches

by kapysh
Tue Oct 24, 2006 8:42 pm
Forum: Volume 5 (500-599)
Topic: 527 - The partition of a cake
Replies: 11
Views: 2583

sorry for so bad view of source code. This is more "looking" variant:

#include <iostream>
#include <cmath>
#include<vector>

using namespace std;

struct point{
double x;
double y;
bool equal(point p){
double dist=sqrt((x-p.x)*(x-p.x)+(y-p.y)*(y-p.y));
if(dist<0.000001)
return true;
return ...
by kapysh
Tue Oct 24, 2006 8:36 pm
Forum: Volume 5 (500-599)
Topic: 527 - The partition of a cake
Replies: 11
Views: 2583

527 WA

Anybody, please, help me!!! I don't know where is my mistake.
Formula is: N=k+n+1, where k - number of cutting lines, n - sum of number of different points of intersection with next lines (number of lines are as in input) for every cut line.

Can anybody give me tests?

this is my code
#include ...
by kapysh
Wed Jul 19, 2006 10:54 am
Forum: C++
Topic: How use STL?
Replies: 2
Views: 2549

sorry, I don't list all topics
by kapysh
Wed Jul 19, 2006 10:53 am
Forum: C++
Topic: CE
Replies: 1
Views: 2106

CE

Please help me. What compile error has occured in this code:
#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>

using namespace std;

int main()
{
int N,i,j,k,l,max;
vector<int> mas[40004];
cin>>N;
while(N!=0)
{
for(i=0;i<40004;i++)
{
mas .clear();
mas .reserve(100 ...
by kapysh
Wed Jul 19, 2006 10:24 am
Forum: C++
Topic: How use STL?
Replies: 2
Views: 2549

How use STL?

Sorry for stupid question, but i donn't understand how rightly use STL in my c++ programs.
I wrote this:
#include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>

using namespace std;

int main()
{
int N,i,j,k,l,max;
vector<int> mas[40004];
...

and if says "Compilation Error ...

Go to advanced search