#1493379

Solution for 2406: Al dente by sc

Source Code Status Test Cases
    Policy: public     Reviewed: 72    
00.00 sec    1164 KB    22 lines     331 bytes    2015-08-26 18:46
#include <iostream>

using namespace std;

int main() {
  int n, t, e;
  int x[100];
  cin >> n >> t >> e;
  for (int i = 0; i < n; ++i) {
    cin >> x[i];
  }
  for (int i = 0; i < n; ++i) {
    if (((t - e) / x[i] + 1) * x[i] <= t + e) {
      cout << i + 1 << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}


Compile Error Logs:
You are not authorized to see the message.

Status
Judge: 104/104 C++ CPU: 00.00 sec Memory: 1164 KB Length: 331 B 2015-08-26 18:46 2015-08-26 18:46
Results for testcases
Case # Verdict CPU Time Memory In Out Case Name
Case #1: : Accepted 00.00 sec 1160 KB
Case #2: : Accepted 00.00 sec 1160 KB
Case #3: : Accepted 00.00 sec 1160 KB
Case #4: : Accepted 00.00 sec 1160 KB
Case #5: : Accepted 00.00 sec 1160 KB
Case #6: : Accepted 00.00 sec 1160 KB
Case #7: : Accepted 00.00 sec 1160 KB
Case #8: : Accepted 00.00 sec 1160 KB
Case #9: : Accepted 00.00 sec 1160 KB
Case #10: : Accepted 00.00 sec 1160 KB
Case #11: : Accepted 00.00 sec 1160 KB
Case #12: : Accepted 00.00 sec 1156 KB
Case #13: : Accepted 00.00 sec 1160 KB
Case #14: : Accepted 00.00 sec 1160 KB
Case #15: : Accepted 00.00 sec 1160 KB
Case #16: : Accepted 00.00 sec 1160 KB
Case #17: : Accepted 00.00 sec 1160 KB
Case #18: : Accepted 00.00 sec 1160 KB
Case #19: : Accepted 00.00 sec 1156 KB
Case #20: : Accepted 00.00 sec 1160 KB
Case #21: : Accepted 00.00 sec 1160 KB
Case #22: : Accepted 00.00 sec 1160 KB
Case #23: : Accepted 00.00 sec 1160 KB
Case #24: : Accepted 00.00 sec 1160 KB
Case #25: : Accepted 00.00 sec 1160 KB
Case #26: : Accepted 00.00 sec 1160 KB
Case #27: : Accepted 00.00 sec 1160 KB
Case #28: : Accepted 00.00 sec 1156 KB
Case #29: : Accepted 00.00 sec 1160 KB
Case #30: : Accepted 00.00 sec 1160 KB
Case #31: : Accepted 00.00 sec 1160 KB
Case #32: : Accepted 00.00 sec 1160 KB
Case #33: : Accepted 00.00 sec 1160 KB
Case #34: : Accepted 00.00 sec 1160 KB
Case #35: : Accepted 00.00 sec 1160 KB
Case #36: : Accepted 00.00 sec 1160 KB
Case #37: : Accepted 00.00 sec 1160 KB
Case #38: : Accepted 00.00 sec 1160 KB
Case #39: : Accepted 00.00 sec 1160 KB
Case #40: : Accepted 00.00 sec 1160 KB
Case #41: : Accepted 00.00 sec 1160 KB
Case #42: : Accepted 00.00 sec 1160 KB
Case #43: : Accepted 00.00 sec 1160 KB
Case #44: : Accepted 00.00 sec 1160 KB
Case #45: : Accepted 00.00 sec 1160 KB
Case #46: : Accepted 00.00 sec 1160 KB
Case #47: : Accepted 00.00 sec 1160 KB
Case #48: : Accepted 00.00 sec 1160 KB
Case #49: : Accepted 00.00 sec 1160 KB
Case #50: : Accepted 00.00 sec 1160 KB
Case #51: : Accepted 00.00 sec 1164 KB
Case #52: : Accepted 00.00 sec 1160 KB
Case #53: : Accepted 00.00 sec 1160 KB
Case #54: : Accepted 00.00 sec 1160 KB
Case #55: : Accepted 00.00 sec 1160 KB
Case #56: : Accepted 00.00 sec 1160 KB
Case #57: : Accepted 00.00 sec 1160 KB
Case #58: : Accepted 00.00 sec 1160 KB
Case #59: : Accepted 00.00 sec 1160 KB
Case #60: : Accepted 00.00 sec 1160 KB
Case #61: : Accepted 00.00 sec 1160 KB
Case #62: : Accepted 00.00 sec 1160 KB
Case #63: : Accepted 00.00 sec 1160 KB
Case #64: : Accepted 00.00 sec 1160 KB
Case #65: : Accepted 00.00 sec 1160 KB
Case #66: : Accepted 00.00 sec 1160 KB
Case #67: : Accepted 00.00 sec 1156 KB
Case #68: : Accepted 00.00 sec 1160 KB
Case #69: : Accepted 00.00 sec 1160 KB
Case #70: : Accepted 00.00 sec 1160 KB
Case #71: : Accepted 00.00 sec 1160 KB
Case #72: : Accepted 00.00 sec 1160 KB
Case #73: : Accepted 00.00 sec 1160 KB
Case #74: : Accepted 00.00 sec 1160 KB
Case #75: : Accepted 00.00 sec 1160 KB
Case #76: : Accepted 00.00 sec 1160 KB
Case #77: : Accepted 00.00 sec 1156 KB
Case #78: : Accepted 00.00 sec 1160 KB
Case #79: : Accepted 00.00 sec 1160 KB
Case #80: : Accepted 00.00 sec 1160 KB
Case #81: : Accepted 00.00 sec 1160 KB
Case #82: : Accepted 00.00 sec 1160 KB
Case #83: : Accepted 00.00 sec 1160 KB
Case #84: : Accepted 00.00 sec 1160 KB
Case #85: : Accepted 00.00 sec 1160 KB
Case #86: : Accepted 00.00 sec 1160 KB
Case #87: : Accepted 00.00 sec 1160 KB
Case #88: : Accepted 00.00 sec 1160 KB
Case #89: : Accepted 00.00 sec 1160 KB
Case #90: : Accepted 00.00 sec 1160 KB
Case #91: : Accepted 00.00 sec 1160 KB
Case #92: : Accepted 00.00 sec 1160 KB
Case #93: : Accepted 00.00 sec 1160 KB
Case #94: : Accepted 00.00 sec 1160 KB
Case #95: : Accepted 00.00 sec 1160 KB
Case #96: : Accepted 00.00 sec 1160 KB
Case #97: : Accepted 00.00 sec 1160 KB
Case #98: : Accepted 00.00 sec 1160 KB
Case #99: : Accepted 00.00 sec 1160 KB
Case #100: : Accepted 00.00 sec 1160 KB
Case #101: : Accepted 00.00 sec 1160 KB
Case #102: : Accepted 00.00 sec 1160 KB
Case #103: : Accepted 00.00 sec 1160 KB
Case #104: : Accepted 00.00 sec 1160 KB
< prev | / | next >  
 
Judge Input #  ( | ) Judge Output #  ( | )


Comments
 
 Under Construction.
 
Categories
 
 
Free Tags