UV 1510, hp1510

Source: Internet
Author: User

UV 1510, hp1510

Link: Ultraviolet A 1510-Neon Sign

Given n points, any three points are not collocated, and there is a line between the two points to give the color of the line. Ask how many triangles have the same color on the three sides.

Solution: For each vertex, record the number of black edges and the number of red edges of the vertex. Consider the triangle with the vertex as the vertex, select one from the red edge, and choose one from the Black edge, the triangle may not be satisfied. Because a triangle of different colors is filled with two vertices, this is considered twice. You can use the total number to remove different colors.

#include <cstdio>#include <cstring>#include <algorithm>using namespace std;typedef long long ll;const int maxn = 1005;ll n, r[maxn], l[maxn];void init () {    scanf("%lld", &n);    int x;    memset(l, 0, sizeof(l));    memset(r, 0, sizeof(r));    for (int i = 0; i < n; i++) {        for (int j = i + 1; j < n; j++) {            scanf("%d", &x);            if (x) {                r[i]++;                r[j]++;            } else {                l[i]++;                l[j]++;            }        }    }}ll solve () {    ll sum = (ll)n * (n-1) * (n-2) / 6;    ll del = 0;    for (int i = 0; i < n; i++)        del += l[i] * r[i];    return sum - del / 2;}int main () {    int cas;    scanf("%d", &cas);    while (cas--) {        init();        printf("%lld\n", solve());    }    return 0;}

Which brand of sunscreen is good?

1 H2O suizhi Macao sunscreen day cream SPF15

2 BIOTHERM yanyang youth UV body sunscreen spray SPF15

3 CLARINS sunscreen moisturizing SPF15

4 Clinique smart facial sunscreen

5 Vizi refreshing sun protection

6 Kiehls chyls Haiyuan evolved sunscreen lotion SPF15

7 Estee Lauder full-day protection compound emulsion SPF15

8 yalton silver-grade sunscreen SPF15

9 Magnolia oil whitening sunscreen SPA15

10 the body shop/body shop aloe vera soothing moisturizing sunscreen SPF15
The face shop is well isolated.

You can use green ~~~ Acne marks

It's hard to buy ~~~ Online Shopping

But the price is cheap ~~~ About 35

ZA can also be ~~~ There is also the efficacy of whitening

It also has a 26-fold sunscreen factor ~~~ Counter 68, 35 GB

Price: less than 50
Jia Xue (not very oily, the effect is OK)
Ding Jiayi (general performance in all aspects)
Small nurse (relatively oily)
Avon (bad taste)

About 50:
Shiseido (a large number of brands, a large number of sunscreen products, and a large volume of goods, but the effect is still good)
High silk (there is a moisturizing effect suitable for oily skin MM, the effect is very good)
Yuxi (I have never used it, but many people like it)
Jia nabao (praised by a MM who is very picky about cosmetics)

More than 100
Lanzhi cream (Korean brand is generally very mild, not allergic, suitable for sensitive skin MM)
Clinique city block cream (the effect is really good and you don't have to worry about it. This year, we launched a new package. When the skin is used up, it can be used directly as the Foundation)

It's very long, but it's worth reading at 1.1 points.

Sunlight is the main cause of skin aging and the formation of skin surface spots. Even in spring, if you let the sun shine for ten minutes, the skin will be premature aging for ten days. Only by doing well in sunscreen, effectively preventing the production of melanin, sun exposure, no injury, In order to always maintain the youth.

Is Sun Protection required in spring? Yes, sun protection must start in spring. Expert research has proved that sunlight ultraviolet is composed of long-wave ultraviolet A, medium-wave ultraviolet B, and short-wave UVC. Among them, the most penetrating ultraviolet A, regardless of whether the weather is clear or not, exists around you all year round. It can penetrate through the skin to attack the dermis layer, so that the collagen and elastic protein in the skin are severely damaged. Over time, it causes skin relaxation, wrinkles, microvessels and other problems.
It turns out that although spring is not as hot as summer, ultraviolet radiation is not weaker than summer. This season, the global ozone layer content is the least, so the ultraviolet content increases, and the skin's metabolism cycle is generally 28 days, at the end of April and early May after a strong ultraviolet radiation, sunspots will appear in May, so skin whitening and sun protection should begin from spring.

How to Choose sunscreen

Choosing a proper sunscreen before the arrival of summer will protect delicate skin from the sun. This is a top priority for women to love. So how should I choose sunscreen?
1. We recommend that you perform an accurate skin test before purchasing sunscreen. Oily skin should choose water-based sunscreen products with strong penetration; dry skin should choose cream-like sunscreen products; neutral skin generally does not have strict regulations, with emulsion-like sunscreen is suitable for a variety of skin use.
2. Calculate the SPF value. Generally, the higher the SPF index, the higher the protection. In general environments, SPF8 to 12 is recommended for normal skin. For white skin, we recommend that you use SPF30 sunscreen. For light-allergic people, the SPF value should be between 12 and 20.
3. Learn about the applicable groups of different sunscreen products. Different sunscreen products have different targets. The best way is to try it on the inside of your wrist before you buy it. If the skin is red, swollen, painful, or itchy within 10 minutes, it indicates that you have an allergic reaction to this product. You can try a product that is a multiple lower than the sunscreen index. If there is a reaction, it is best to give up the brand of sunscreen.

Brand Competitions
Yulan oil whitening sunscreen cream (SPF15)
Sunscreen index:★★★
Product Features: "Triple skin whitening" not only helps to create a clear skin color, but also can block the skin from sunning, it can nourish the inner skin and improve skin health.
Ranksoft sunscreen (SPF20)
Sunscreen index:★★★
Features: lightweight, breathable, fast absorption, and persistent resistance to ultraviolet rays are recommended. There is another S... the remaining full text>


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.