Submission #658682
Source Code Expand
#include <iostream> #include <algorithm> #include <vector> #include <cstdio> #include <cmath> #include <stack> using namespace std; typedef unsigned char byte; typedef long long int LLint; typedef unsigned long long int uLLint; LLint d[1001][1001]; int main(){ int x,y; LLint w,h,f; cin>>w>>h; if (w<h) swap(w,h); for (x=2;x<=w;x++){ d[x][2]=x; d[2][x]=x; } for (y=3;y<=h;y++) for (x=3;x<=w;x++){ d[x][y]=(d[x-1][y]+d[x][y-1])%1000000007LL; } cout<<d[w][h]<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - 経路 |
User | m_buyoh |
Language | C++11 (GCC 4.9.2) |
Score | 100 |
Code Size | 619 Byte |
Status | RE |
Exec Time | 293 ms |
Memory | 8612 KB |
Judge Result
Set Name | Sample | Dataset1 | Dataset2 | All | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 50 / 50 | 50 / 50 | 0 / 1 | ||||||||||
Status |
|
|
|
|
Set Name | Test Cases |
---|---|
Sample | s0.txt, s1.txt |
Dataset1 | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, s0.txt |
Dataset2 | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, s0.txt, s1.txt |
All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt, 024.txt, 025.txt, 026.txt, 027.txt, 028.txt, 029.txt, 030.txt, 031.txt, 032.txt, s0.txt, s1.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
000.txt | AC | 24 ms | 916 KB |
001.txt | AC | 26 ms | 796 KB |
002.txt | AC | 24 ms | 928 KB |
003.txt | AC | 24 ms | 796 KB |
004.txt | AC | 25 ms | 800 KB |
005.txt | AC | 26 ms | 800 KB |
006.txt | AC | 26 ms | 800 KB |
007.txt | AC | 26 ms | 920 KB |
008.txt | AC | 24 ms | 924 KB |
009.txt | AC | 25 ms | 796 KB |
010.txt | AC | 25 ms | 928 KB |
011.txt | AC | 46 ms | 7584 KB |
012.txt | AC | 30 ms | 3740 KB |
013.txt | AC | 47 ms | 8228 KB |
014.txt | AC | 42 ms | 7332 KB |
015.txt | AC | 48 ms | 8100 KB |
016.txt | AC | 45 ms | 7968 KB |
017.txt | AC | 41 ms | 6360 KB |
018.txt | AC | 42 ms | 7464 KB |
019.txt | AC | 29 ms | 3744 KB |
020.txt | AC | 38 ms | 5788 KB |
021.txt | AC | 50 ms | 8612 KB |
022.txt | RE | 277 ms | 4764 KB |
023.txt | RE | 280 ms | 4768 KB |
024.txt | RE | 278 ms | 4772 KB |
025.txt | RE | 286 ms | 4896 KB |
026.txt | RE | 282 ms | 4772 KB |
027.txt | RE | 281 ms | 4768 KB |
028.txt | RE | 283 ms | 4764 KB |
029.txt | RE | 282 ms | 4768 KB |
030.txt | RE | 282 ms | 4772 KB |
031.txt | RE | 282 ms | 4764 KB |
032.txt | RE | 293 ms | 4776 KB |
s0.txt | AC | 26 ms | 796 KB |
s1.txt | AC | 28 ms | 2980 KB |