Welcome, Guest! Sign Up RSS

Clever Space

Friday, 11.22.2024
Main » 2014 » November » 06

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<string>
#include<algorithm>
#include<queue>
#include<list>
#define FOR(i,a,b) for(i=(a);i<=(b);i++)
#define ROF(i,a,b) for(i=(a);i>=(b);i--)
#define mmt(a,b) memset(a,b,sizeof(a))
#define pb push_back
#define mp make_pair
#define y1 fuck
using namespace std;
typedef long long LL;
typedef long double LD;
int n,lim;
LL f(int k)
{
  if (lim>k-1) return k-1;
  return max(k-1-((k-lim-1)<<1),0);
}
int main()
{
  int n,i;
  scanf("%d",&n);
  lim=n/2-1;
  if (n%2==1) lim++;
  LL ans=0;
  FOR(i,2,n-2)
  ... Read more »

Views: 273 | Added by: dhy0077 | Date: 11.06.2014