国产99久久精品_欧美日本韩国一区二区_激情小说综合网_欧美一级二级视频_午夜av电影_日本久久精品视频

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當(dāng)前位置: 首頁 - 科技 - 知識(shí)百科 - 正文

zoj2027TravellingFee(最短路變形)

來源:懂視網(wǎng) 責(zé)編:小采 時(shí)間:2020-11-09 14:46:54
文檔

zoj2027TravellingFee(最短路變形)

zoj2027TravellingFee(最短路變形):All 6 sides of a cube are to becoated with paint. Each side is is coated uniformly with one color. When a selectionof n different colors of paint is available, how many different cubes can youmake Note that any two cubes are onlyto be cal
推薦度:
導(dǎo)讀zoj2027TravellingFee(最短路變形):All 6 sides of a cube are to becoated with paint. Each side is is coated uniformly with one color. When a selectionof n different colors of paint is available, how many different cubes can youmake Note that any two cubes are onlyto be cal

All 6 sides of a cube are to becoated with paint. Each side is is coated uniformly with one color. When a selectionof n different colors of paint is available, how many different cubes can youmake? Note that any two cubes are onlyto be cal

All 6 sides of a cube are to becoated with paint. Each side is is coated uniformly with one color. When a selectionof n different colors of paint is available, how many different cubes can youmake?

Note that any two cubes are onlyto be called "different" if it is not possible to rotate the one intosuch a position that it appears with the same coloring as the other.

Input

Each line of the input filecontains a single integer n(0

Output

For each line of input produce oneline of output. This line should contain the number of different cubes that canbe made by using the according number of colors.

SampleInput Outputfor Sample Input

1

2

0

1

10


Problem setter: EricSchmidt

Special Thanks: DerekKisman, EPS

題意:求用n中顏色涂立方體的不同種數(shù),能旋轉(zhuǎn)到的算一種

題意:和上一題UVA - 10601 Cubes (組合+置換) 的立方體旋轉(zhuǎn)考慮的分類是一樣的,不過這里我們考慮的是涂面的情況

1.不變置換(1)(2)(3)(4)(5)(6), 共1個(gè);

2.沿對(duì)面中心軸旋轉(zhuǎn) 90度, 270度 (1)(2345)(6), (1)(5432)(6) 同類共 6個(gè);

3.沿對(duì)面中心軸旋轉(zhuǎn) 180度 (1)(24)(35)(6), 同類共 3個(gè);

4.沿對(duì)角線軸旋轉(zhuǎn) 120度, 240度 (152)(346), (251)(643) 同類共 8個(gè);

5.沿對(duì)邊中點(diǎn)軸旋轉(zhuǎn) 180度 (16)(25)(43) 同類共 6個(gè);

[cpp] view plaincopy
在CODE上查看代碼片派生到我的代碼片
  1. #include 
  2. #include 
  3. #include 
  4. #include 
  5. #include 
  6. typedef long long ll;
  7. using namespace std;
  8. ll n;
  9. ll still() {
  10. return n * n * n * n * n * n;
  11. }
  12. ll point() {
  13. return 4 * 2 * n * n;
  14. }
  15. ll edge() {
  16. return 6 * n * n * n;
  17. }
  18. ll plane() {
  19. return 3 * 2 * n * n * n + 3 * n * n * n * n;
  20. }
  21. ll polya() {
  22. ll ans = 0;
  23. ans += still();
  24. ans += point();
  25. ans += edge();
  26. ans += plane();
  27. return ans / 24;
  28. }
  29. int main() {
  30. while (scanf("%lld", &n) != EOF && n) {
  31. printf("%lld\n", polya());
  32. }
  33. return 0;
  34. }

聲明:本網(wǎng)頁內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

zoj2027TravellingFee(最短路變形)

zoj2027TravellingFee(最短路變形):All 6 sides of a cube are to becoated with paint. Each side is is coated uniformly with one color. When a selectionof n different colors of paint is available, how many different cubes can youmake Note that any two cubes are onlyto be cal
推薦度:
  • 熱門焦點(diǎn)

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 国产亚洲一区二区精品 | 亚洲欧美另类专区 | 日韩欧美在线综合网 | 国产精品久久新婚兰兰 | 午夜精品久久久久久91 | 日本亚洲国产精品久久 | 高清国产一区二区三区 | 国产在线一区在线视频 | 欧美日韩亚洲综合另类ac | 真实的国产乱xxxx在线 | 日韩视频网 | 欧美日韩国产高清 | 亚洲一区中文字幕在线 | 久久久久88色偷偷免费 | 欧美日韩亚洲视频 | 国产区亚洲区 | 97精品视频在线 | 国产成人成人一区二区 | 国产图区 | 精品国产欧美一区二区 | 伊人情人综合成人久久网小说 | 亚洲图片国产日韩欧美 | 亚洲精品三区 | 91精品导航 | 久久久青青久久国产精品 | 亚洲视频免费观看 | 97成人免费视频 | 在线观看视频国产 | 亚洲 欧美 国产另类首页 | 国产未成女年一区二区 | 成人亚洲国产综合精品91 | 亚洲国产成人久久一区二区三区 | 国产精品va一级二级三级 | 欧美精品1区 | 日韩一区二区三区在线 | 伊人久久亚洲综合天堂 | 欧美日韩国产精品综合 | 国产一区亚洲二区三区 | 亚洲伊人国产 | 国产网站免费看 | 国产精品成人一区二区不卡 |