\u62c2\u6653<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n <\/p>\n \u539f\u672c\u89c9\u5f97\u5e94\u8be5\u662f\u5e76\u67e5\u96c6\uff0c\u3002\u3002\u3002\u7136\u540e\u53d1\u73b0\u6ca1\u6709\u5f3a\u5f31\u5173\u7cfb\u4f20\u9012\u3002\u3002\u3002\u55ef\uff0c\uff0c\uff0c\u8fd8\u662f\u60f3\u9ebb\u70e6\u4e86\u3002\u3002<\/p>\n \u4f46\u8fd9\u9898\u8fd8\u662f\u4e00\u4e2a\u5f88\u597d\u7684\u601d\u8def\u9898\u3002\u3002<\/p>\n <\/p>\n<\/p>\n #include<cstdio>\n#include<algorithm>\n#include<iostream>\n#include<cstring>\n#include<cmath>\n#include<map>\nusing namespace std;\n\nint vis[1005][1005];\/\/\/\u8bb0\u5f55\u6bd4\u8d5b\u60c5\u51b5\uff0c\u5c31\u662f\u8bb0\u5f55\u8c01\u548c\u8c01\u6bd4\u8d5b\u8fc7\n\nint main()\n{\n\n char namea[25];\n char nameb[25];\n\n map<string,int>m;\/\/\/\u786e\u7acbmap\u5bf9\u7acb\u5173\u7cfb\n\n int n;\n while(cin>>n)\n {\n m.clear();\/\/\/\u522b\u5fd8\u6e05\u7a7a\n memset(vis,0,sizeof(vis));\n\n int flag=0;\n\n for(int i=0; i<n; i++)\n {\n scanf(\"%s %s\",namea,nameb);\n\n if(!m[namea])\n {\n m[namea]=flag++;\/\/\/\u5982\u679c\u6ca1\u6709\u6bd4\u8d5b\u8fc7\uff0c\u5c31\u81ea\u589e\u3002\n }\n if(!m[nameb])\n {\n m[nameb]=flag++;\n }\n vis[m[namea]][m[nameb]]=1;\n }\n int n2;\n scanf(\"%d\",&n2);\n\n while(n2--)\n {\n\n scanf(\"%s %s\",namea,nameb);\n \/*\n unknow\u60c5\u51b5\u6709\u4ee5\u4e0b\u51e0\u79cd\n !m[namea]||!m[nameb] \u4ee3\u8868\u4e24\u8005\u90fd\u6ca1\u6709\u53bb\u6bd4\u8d5b\n vis[m[namea]][m[nameb]]&&vis[m[nameb]][m[namea]] \u4ee3\u8868A\u6218\u80dc\u4e86B B\u53c8\u6218\u80dc\u4e86A\uff0c\u4e92\u76f8\u77db\u76fe\n vis[m[namea]][m[nameb]]==0&&vis[m[nameb]][m[namea]]==0 \u4ee3\u8868\u4e24\u8005\u6ca1\u6709\u5fc5\u8fc7\u8d5b\n *\/\n\n\n if(!m[namea]||!m[nameb]||(vis[m[namea]][m[nameb]]&&vis[m[nameb]][m[namea]])||(vis[m[namea]][m[nameb]]==0&&vis[m[nameb]][m[namea]]==0))\n {\n printf(\"unknown\\n\");\n }\n else if(vis[m[namea]][m[nameb]])\n {\n printf(\"win\\n\");\n }\n else if(vis[m[nameb]][m[namea]])\n {\n printf(\"lose\\n\");\n }\n\n }\n }\n return 0;\n}\n\n<\/code><\/pre>\n<\/p>\n<\/p>\n <\/p>\n <\/p>\n <\/p>\n","protected":false},"excerpt":{"rendered":"HRBUST 1314 \u706b\u5f71\u5fcd\u8005\u4e4b\uff5e\u7eb2\u624b\u3010MAP\u3011\u706b\u5f71\u5fcd\u8005\u4e4b\uff5e\u7eb2\u624bTimeLimit:3000MSMemoryLimit:65536KTotalSubmit:246(78users)TotalAcc...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"_links":{"self":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/7435"}],"collection":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/comments?post=7435"}],"version-history":[{"count":0,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/posts\/7435\/revisions"}],"wp:attachment":[{"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/media?parent=7435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/categories?post=7435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mushiming.com\/wp-json\/wp\/v2\/tags?post=7435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
|