2015-07-26 14:05:40

传送门

总结:前三题都是可做的。赛中三题,由于最近的多校,没补后面的题了... 第二题有点坑爹... hack 数据是针对某些 dfs 顺序的。用 string 的就可能被卡。

 

A题:简单题。将其补全成正三角形就 ok 了。

 

#include <cstdio>
#include <ctime>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;

#define getmid(l,r) ((l) + ((r) - (l)) / 2)
#define MP(a,b) make_pair(a,b)
#define PB push_back

typedef long long ll;
typedef pair<int,int> pii;
const double eps = 1e-8;
const int INF = (1 << 30) - 1;

int a,b,c,d,e,f;

int main(){
    scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f);
    int D = e + d + c;
    int ans = D * D - a * a - e * e - c * c;
    printf("%d\n",ans);
    return 0;
}
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
  • 2021-07-03
  • 2022-02-12
  • 2022-12-23
猜你喜欢
  • 2022-02-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案